SPONSORS:






User Tag List

Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1
    Member
    Join Date
    May 2001
    Location
    Houston, TX USA
    Posts
    40
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    dll statment in Silk Test ...

    I am having a problem 2 different versions of a dll. I have the following declarations:

    dll "old.dll"
    func1()
    func2()
    dll "new.dll"
    func1()
    func2()

    When I have the above declarations and compile the file I get an error saying that func1() and func2() are already defined. Is there a solution for this problem? I cannot put them in 2 seperate files, because my test cases should use both the dlls.

    ------------------
    SG
    SG

  2. #2
    Senior Member
    Join Date
    Nov 1999
    Location
    Eagle, ID,USA
    Posts
    1,035
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: dll statment in Silk Test ...

    You'll have to give them unique names but you can use an alias for one of them. For example

    dll "old.dll"
    func1()
    func2()
    dll "new.dll"
    func1a()alias "func1"
    func2a()alias "func2"

    ------------------
    Have you ever noticed? Anybody going slower than you is an idiot, and anyone going faster than you is a maniac.

  3. #3
    Senior Member
    Join Date
    Jun 1999
    Location
    Fremont, CA, USA
    Posts
    355
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: dll statment in Silk Test ...

    You need to alias the function names so they are not the same:

    Now you haev four functions: func1_old(), func2_old(), func1(), and func2().



    ------------------
    David Genrich
    david.genrich@e2open.com
    david@linuxpuppy.net

  4. #4
    Member
    Join Date
    May 2001
    Location
    Houston, TX USA
    Posts
    40
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: dll statment in Silk Test ...

    I have the following and I am getting an error when I am trying it out:
    dll "C:\SftTv32U.DLL"
    inprocess int SftTree_GetCount(HWND hwnd)
    dll "C:\SftTree_IX86_U_45.dll"
    inprocess int SftTree_GetCount45(HWND hwnd) alias "int SftTree_GetCount(HWND hwnd)"

    I am calling the function and I am getting an error:

    print(SftTree_GetCount45(hwnd))

    Your help is appreciated.

    ------------------
    SG
    SG

  5. #5
    Senior Member
    Join Date
    Nov 1999
    Location
    Eagle, ID,USA
    Posts
    1,035
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: dll statment in Silk Test ...

    The alias should be just "SftTree_GetCount". Remove the int and (HWND hwnd)

    ------------------
    Have you ever noticed? Anybody going slower than you is an idiot, and anyone going faster than you is a maniac.

  6. #6
    Member
    Join Date
    Aug 2003
    Location
    bangalore
    Posts
    43
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: dll statment in Silk Test ...

    Hi,

    in Inc file
    dll Sfttv32.dll
    inprocess int SftTree_GetCount(hwnd))

    use the Above the inc File

    Integer GetCount()
    retrun SftTree_GetCount(GetHandle))

    in .t file
    integer i
    i=obj.GetCount
    Print(i)
    girish

  7. #7
    Senior Member
    Join Date
    Jan 2001
    Posts
    750
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: dll statment in Silk Test ...

    I did some work on DLL lately.

    One thing to notice is that SilkTest does not do type checking hence it's very important to make sure that what you pass in the function is what it's required. Even if your code compiles in SilkTest it does not guarantee that the function call will succeed.

    One simple example is that regular SilkTest (not international version) use all ANSI strings hence if your DLL is in Unicode you need to do string conversion - MultiByteToWideChar otherwise it will just fail to do the correct things like opening a file. This is a simple example you can imagine other problems.

    Also SilkTest will accept any C/C++ style DLL. Using a standard win32 DLL project + .DEF will work just fine (I am sure of it now).

  8. #8
    Member
    Join Date
    Apr 2001
    Location
    San Francisco, CA
    Posts
    76
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: dll statment in Silk Test ...

    Hi there,

    I've related to DLL question. How can I initiate DLL's class to make a call to it method?
    Letís take "System.XML.dll" as an example which has lots of classes. I'm particularly interested in few XmlDocument and XmlNode. XmlDocument has method Load (String Xml) how can I call this method from SilkTest?

    If I want to initiate that DLL and make a call to Load () method how it should be done syntax wise in SilkTest.

    Iím sure this is incorrect (I have to first initiate XmlDocument object then call method).
    The question is HOW?
    </font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">
    [+] dll &quot;System.Xml.dll&quot;
    [ ] void Load (STRING sXml)</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">I need your help guys !!!

    P.S. Perhaps I might need to write dll wrapper or ...

    System.Xml Class Library
    Regards,
    Osya

  9. #9
    Super Member
    Join Date
    Jul 2003
    Location
    Boulder, CO
    Posts
    1,276
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: dll statment in Silk Test ...

    Osya,

    I am pretty sure that you can only use DLLs that are a collection of functions (not classes) in SilkTest. I am hoping that the extension kit makes it possible to do use DLLs with classes.

    I was wondering the same thing myself so I contacted support. I'll post what they tell me.
    Chris R Mead

    The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

  10. #10
    Super Member
    Join Date
    Jul 2003
    Location
    Boulder, CO
    Posts
    1,276
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: dll statment in Silk Test ...

    I got an answer back and read some more about the extension kit. It seems that the extension kit does make it possible to use DLLs with classes, but requires that the DLLs be modified to communicate with the agent. The support guy also said that testing a DLL with no GUI whatsoever is not really the intent of the Extension Kit.
    Chris R Mead

    The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

 

 
Page 1 of 2 12 LastLast

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 08:58 PM.

Copyright BetaSoft Inc.