Results 1 to 3 of 3

Thread: Call DLL may require Load DLL

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Call DLL may require Load DLL

    [Tuesday, February 15, 2005 8:10 PM]

    I thought I'd mention this in case it can save someone else a couple of hours
    of frustration. The short version of this is if you're calling into a DLL
    that itself makes other external DLL calls, Load DLL may be required for
    those externals.

    In testing a Clarion DLL for use in SB5 I found a called function was failing
    silently. As best as I could tell it wasn't actually being called at all.
    This DLL has dependencies in two other C++ DLLs. After a couple of hours of
    fooling with this it dawned on me that those C++ DLLs were apparently not
    being loaded. Two Load DLL calls in the SB5 script was all that was needed.

    --
    Best regards,

    Mark

  2. #2

    Default Re: Call DLL may require Load DLL

    [Tuesday, February 15, 2005 8:38 PM]

    Good tip, Mark. Can you give us an example snippet? I think SB's scripting
    language may need a few examples to get folks off and running. ;-)

    --
    Russ Eggen
    www.radfusion.com

  3. #3

    Default Re: Call DLL may require Load DLL

    [Tuesday, February 15, 2005 9:20 PM]

    >Good tip, Mark. Can you give us an example snippet? I think SB's scripting
    >language may need a few examples to get folks off and running. ;-)

    Russ,

    Actually, Friedrich already has. :} His "Call Dll Demo 2.sb5" illustrates
    using Load DLL and using its handle in a Call DLL. That's really all that's
    needed for Load DLL.

    In my case, there are two differences from his example. I needed the Load DLL
    calls as my Clarion DLL isn't doing that itself. Friedrich's example uses the
    module handle in the function call. I didn't need that. So my Call DLL is
    just a normal function call into the Clarion DLL.

    What I wish I could document for others is the "why" of all this, or more
    precisely, the specific conditions under which it is required. My guess is
    that in a freestanding program the CW RTL would handle the loading of all the
    required DLLs, and that bit is missing this utility DLL I have.

    --
    Best regards,

    Mark

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. String Functions RSlash call display
    By NewsArchive in forum SetupBuilder - NNTP
    Replies: 1
    Last Post: 05-18-2005, 08:23 AM
  2. Bug: Call DLL *long not reflecting modified value on return
    By NewsArchive in forum SetupBuilder - NNTP
    Replies: 2
    Last Post: 02-23-2005, 04:09 AM
  3. Call DLL showstopper
    By sphair in forum SetupBuilder
    Replies: 3
    Last Post: 11-16-2004, 10:37 AM
  4. Load DLL and Free DLL
    By sphair in forum SetupBuilder
    Replies: 3
    Last Post: 11-04-2004, 07:50 AM
  5. Cannot load (Main) script
    By sphair in forum SetupBuilder
    Replies: 1
    Last Post: 06-15-2004, 05:07 AM

Posting Permissions

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