SPONSORS:






User Tag List

Results 1 to 6 of 6
  1. #1
    Junior Member
    Join Date
    Feb 2000
    Location
    Santa Monica, CA
    Posts
    27
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Problem for silktest to hook into a C style .dll

    Hi all,
    I am trying to call one of the functions inside a C wrapper dll. Silk doesn't give me any compilation error or anything. But when I was trying to run my testcase, the script just keep on exiting at the point of the dll calling. Is there any way for me to check if silk see the dll? Below is my sample code: The return value is a long type and I should be able to tell if the test is valid or not.

    dll "c:\Program Files\MyProgram\wrapper.dll"
    long Xfunction(inout string P1, inout string P2, inout string P3)

    Calling:
    long result = Xfunction (P1, P2, P3) "Here is where the script exit.
    if result == 0
    Print("Passed")
    else
    Print ("Failed")

    Thank you very much in advance

    --wwchou


    ------------------

  2. #2
    Senior Member
    Join Date
    Oct 1999
    Location
    Tyngsborough, MA
    Posts
    211
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Problem for silktest to hook into a C style .dll

    is there any error message?

    If a dll isn't in the right place you can get an error message about the dll failed to be loaded.

    Is the function in c exported from the dll?

    ------------------

  3. #3
    Junior Member
    Join Date
    Feb 2000
    Location
    Santa Monica, CA
    Posts
    27
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Problem for silktest to hook into a C style .dll

    Brian, Thanks for your reply. Yes the dll is C export and I have tried to declare for the wrong path but silk didn't detect any error when I compile the script. I thought it might detect it at runtime but NO!. There are no error message at all. BTW, I am using Silktest 5.01, but I don't think it matters...

    I have force it to:
    dll "c:\Program Files\MyProgramWrong\wrapper.dll" (which is the wrong path)



    ------------------

  4. #4
    Junior Member
    Join Date
    Feb 2000
    Location
    Santa Monica, CA
    Posts
    27
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Problem for silktest to hook into a C style .dll

    Is there any setup I need to do for Silk to load the dll?
    Do I have to set the env variable?

    Thanks

    ------------------

  5. #5
    Junior Member
    Join Date
    Feb 2000
    Location
    Santa Monica, CA
    Posts
    27
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Problem for silktest to hook into a C style .dll

    Finally, I have it resolved. I have to put the actual function call to the main() in-order to bring up the ERROR 126 couldn't load dll function......... Don't know why it acted this way.

    ------------------

  6. #6
    Junior Member
    Join Date
    Oct 2001
    Location
    Pleasanton, California, USA
    Posts
    23
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Problem for silktest to hook into a C style .dll

    I did not understand what do you mean by

    "call one of the functions inside a C wrapper dll" ??

    Could you please explain in detail please ?

    ------------------
    Any help will be appreciated, Thank you.

    Silk1997@hotmail.com
    Any help will be appreciated, Thank you.
    Silk1997@hotmail.com

 

 

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 07:16 PM.

Copyright BetaSoft Inc.