SPONSORS:






User Tag List

Results 1 to 4 of 4
  1. #1
    BKD
    BKD is offline
    Junior Member
    Join Date
    Jul 2000
    Posts
    17
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Calling DLL in 4Test Script

    Hi
    I am calling a DLL in script. After execution of below script I get "Finction not found error". Is there any alternateive way that this can be done?

    script is like this:
    =======================
    dll "c:\sun.dll"
    [ ] Initiate (STRING NegotiationModelName, STRING DataSchemeName, STRING TransitionName, STRING xmlDetails,
    STRING ProductDetails, STRING ConversationText, STRING SourceName, STRING DestinationName, LONG TimeoutInSecs,
    out STRING ID, out STRING CurrentState )
    [ ]
    [-] main()
    [ ] string sID
    [ ] string sCurrentState
    [ ] Initiate ("BKD", "BKD", "BKD", "BKD", "BKD", "BKD", "BKD", "BKD", 0, sID, sCurrentState)
    [ ]

    ================================
    The sun.DLL Is written in VB. This dll has one calss Negotiate with one method as Initiate. Using VB I can access Initiate by referenceing sun.dll calling
    Inegotiate.Initiate.
    If I use silktest, declare dll sun.dll and call Initiate, this gives an error "Finction Initiate not found in sun.dll".

    Is any other approache can be used to work this script.?
    Any sugession, thoughts can be very helpfull!!

    Thanks
    Bkd

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

  2. #2
    Senior Member
    Join Date
    Sep 1999
    Location
    San Jose,CA,USA
    Posts
    340
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Calling DLL in 4Test Script

    BKD

    I looked at your declaration and it looks pretty kosher. The only thing that bothers me is you didn't declare a return type. If this function has no return type use void and try it again.

    I don't really have very high confidence that is the problem however. I seem to recall running into a VB to dll issue with strings. I think that strings are all Unicode in VB and you may need to compensate for that (on your input parameters) by having the dll translate char * to unicode.

    Those are my quick impressions. Please do post the solution when and if you find it. I am sure we will all be better off with your solution.

    Smoke me a kipper, I'll be back for breakfast!
    Sincerely
    Richard Weth
    Sr. QA Engineer

  3. #3
    Member
    Join Date
    Dec 1999
    Location
    Portland, OR, USA
    Posts
    91
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Calling DLL in 4Test Script

    Dear Balaji,

    It sounds like there is something wrong with your DLL.

    In article <200011121638.KAA18665@buttercup.i-dentity.net>,
    BKD <balaji.deshpande@reuters.com.nospam> wrote:
    > Hi
    > If I use silktest, declare dll sun.dll and call Initiate, this gives
    an error "Finction Initiate not found in sun.dll".
    >

    What this means is that the function called initiate is missing from the sun.dll

    Talk to the person who created the DLL. Make sure they have exported the function, that is a fairly common mistake.

    Otherwise there might be a problem with the function name, check the case of all the characters in the name, and the precise spelling.

    Silk looks like it is working properly, since it succeeded in finding the DLL (which is the other common mistake).



    ------------------
    Charles F. Radley - CSQE
    Oregon, USA.
    Quality Control Analyst at Syntel Inc
    Project Test Lead for client Daimler Trucks - North America.
    Interested in testing dot net web services and SOA systems.
    Charles F. Radley
    Oregon, USA.

  4. #4
    Junior Member
    Join Date
    Nov 2000
    Location
    Fremont, CA, USA
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Calling DLL in 4Test Script

    I'm not sure about VB, but I know that C++ mangles (beautifies -- whatever) the names of exports in DLLs, among other things. Try this from a command prompt:

    dumpbin /EXPORTS [DLL NAME]

    I don't think you'll see what you're expecting in there. I've had this sort of problem previously, although I wrote my DLL in C++. Just a thought for you and another thing to check ...

    *** Wait a second. You say that this is a method of a class that you are trying to call? That would explain why it can't find the function; DLL Exports are usually global scope functions, not within a class. I'm not certain that Silk will let you grab something out of a class from a DLL. If this is the case, try declaring the class constructor (or something) and then reference your function as MyDLLClass.MyMethod(). Who knows ... it just might work.


    ------------------
    Tad
    =^{D}

    [This message has been edited by TStein (edited 11-21-2000).]
    Tad
    =^{D}

 

 

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:44 AM.

Copyright BetaSoft Inc.