SPONSORS:






User Tag List

Results 1 to 4 of 4
  1. #1
    Senior Member
    Join Date
    Aug 1999
    Location
    Cambridge, UK
    Posts
    470
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Submitting a record as parameter to a dll

    I am trying to call a dll function, one of whose parameters is a pointer to a record, which is to be altered. The code looks like this:
    [-] dll "c:\temp\mp3ext\Release\MP3ext.dll"
    [ ] int GetMP3Info(string mp3fullpath, MP3InfoData resultinfo)

    As the manual says, I actually submit a full record as the second parameter to the function. It also says that "4Test records are always passed by reference to a dll", but this is ambiguous; does it mean that I should actually declare the function using the "out" keyword like this:
    [-] dll "c:\temp\mp3ext\Release\MP3ext.dll"
    [ ] int GetMP3Info(string mp3fullpath, out MP3InfoData resultinfo)

    or does it mean that even if I don't use the "out" keyword, it acts as if I had done?

    I have been trying to use this dll function (it extracts mp3 tag information from files), but am having difficulties; if I don't use the "out" keyword then the data submitted doesn't get changed. If I do use the "out" keyword then the agent crashes.
    Assuming that the dll is alright, does anybody have a clue what the problem is here?

  2. #2
    Member
    Join Date
    Dec 1999
    Location
    Seattle, WA
    Posts
    64
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Submitting a record as parameter to a dll

    Haven't done much with DLL calls from silk, but doubt this will work because SilkTest does not support pointers, hence the restriction to passing by ref.

    For fun though, you might try using the "inout" keyword, but I think you'll get the same result as just "out".

    ------------------
    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>It doesn't matter if I go to heaven or to hell, I have friends in both places.<HR></BLOCKQUOTE>
    <BLOCKQUOTE]<font size=1 face=Verdana, Arial, Helvetica]quote:</font]<HR]It doesn't matter if I go to heaven or to hell, I have friends in both places.<HR]</BLOCKQUOTE]

  3. #3
    Member
    Join Date
    Dec 1999
    Location
    Columbus, OH
    Posts
    78
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Submitting a record as parameter to a dll

    I have used the iout keyword in a case where the dll function required a record below is a sample of how it works. I hope this helps.
    [This message has been edited by AJ (edited 03-15-2000).]

  4. #4
    Senior Member
    Join Date
    Aug 1999
    Location
    Cambridge, UK
    Posts
    470
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Submitting a record as parameter to a dll

    Tried that I'm afraid. And the agent crashed. Looks like there is a problem with the dll, but why can't the agent recognise the problem and raise an exception happily, instead of just falling over?
    Grrr.

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 12:51 AM.

Copyright BetaSoft Inc.