SPONSORS:






User Tag List

Results 1 to 6 of 6

Thread: DLL Referencing

  1. #1
    Senior Member
    Join Date
    Jan 2003
    Location
    Portland, ME USA
    Posts
    603
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    DLL Referencing

    I have a custom dll written in VB6 that has 10 classes contained with the dll, and each class has it's own methods. How do you reference a method in the DLL to a certain class. EXAMPLE

    tools.dll has two class clsIniFunctions and clsTools and i want to be able to use the method from with in the clsTools class called SimpleEncrpt? I have tryed the following:

    dll "Tools3.dll"
    // This function calls the SimpleEncrypt function in the...
    {
    STRING SimpleEncrypt (STRING sSource);
    }

    public window CTools Tools
    {

    }

    private winclass CTools{
    STRING EncrptDecrpt (STRING sSource)
    {
    return SimpleEncrypt (sSource);
    }

    }

    and i make the call to the method as so...

    testcase test ()
    {
    sPassWord = Tools.EncrptDecrpt(sPassWord);
    }


    And i get a function not found in DLL, any suggestions???

    ------------------
    N+ CNA

    [This message has been edited by RCyr (edited 05-13-2003).]

    [This message has been edited by RCyr (edited 05-13-2003).]
    N+ CNA

  2. #2
    Senior Member
    Join Date
    Jul 1999
    Location
    Bellingham, WA USA
    Posts
    1,323
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: DLL Referencing

    > sPassWord = Tools.EncrptDecrpt(sPassWord);

    What does Tools map to?

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

  3. #3
    Senior Member
    Join Date
    Jan 2003
    Location
    Portland, ME USA
    Posts
    603
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: DLL Referencing

    Tools points to the CTools winclass...

    ------------------
    N+ CNA
    N+ CNA

  4. #4
    Senior Member
    Join Date
    Jan 2003
    Location
    Portland, ME USA
    Posts
    603
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: DLL Referencing

    So real question is how do i point to a specific class within a Dll with 4Test?? Has anyone had to anything like this??

    ------------------
    N+ CNA
    N+ CNA

  5. #5
    Senior Member
    Join Date
    Jul 1999
    Location
    Bellingham, WA USA
    Posts
    1,323
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: DLL Referencing

    I apologize. I sat there and looked at your code for the longest time. Now I see it plain as day.

    > public window CTools Tools

    I don't know the answer to the root question, so I'm going to go back to my foggy minded state.

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

  6. #6
    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: DLL Referencing

    I do not pretend to be an expert on these matters. I have used DLLs
    a number of times in Silk and I believe the short answer is you cannot referance
    a method for a class in a dll directly.


    I know you can easilly get to a function in a dll .. but methods require class
    instances .. i.e objects. Having said that I think it very possible to write a
    VB or C++ dll that has a function with return type string .. that loads the dll
    you want .. instatiaties an object calls the method in question .. and returns
    what you need. (just like a regular dll function call only now you write your own
    dll wrapper)

    I realize this may not be exactly what you are looking for. It may also be
    somewhat easier for you to write an executable (in VB or C++) and do essentially
    the same thing and call it via SYS_Execute parsing the return list for the return
    value .. simply employ a print to screen of what you want in the executable.

    By the way if it turns out that my short answer is wrong please do post your solution,
    it's always good to know more on how these interfaces work!

    ------------------
    "Smoke me a kipper, I'll be back for breakfast!"
    Sincerely
    Richard Weth
    Sr. QA Engineer
    mailto:rick_weth@yahoo.com
    Smoke me a kipper, I'll be back for breakfast!
    Sincerely
    Richard Weth
    Sr. QA Engineer

 

 

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 04:14 PM.

Copyright BetaSoft Inc.