Debugging LoadLibrary problems

This is a discussion on Debugging LoadLibrary problems within the Windows Programming forums, part of the Platform Specific Boards category; (This isn't a problem with LoadLibrary, which has been around for probably Decades, but an issue that it raises when ...

  1. #1
    Registered User
    Join Date
    May 2009
    Location
    British Columbia, Canada
    Posts
    1

    Unhappy Debugging LoadLibrary problems

    (This isn't a problem with LoadLibrary, which has been around for probably Decades, but an issue that it raises when loading a dynamic library, and how to find out exactly what's going on so I can fix the client's problem.)

    I have an application that runs and loads fine locally, on the same OS as the client, and I've found that the app is failing when it is attempting to load a dynamic library. I suspect that one of the library's dependencies is failing on the client computer, but I'm not altogether certain how to determine _which_ dependency.

    I have used a couple of different programming languages including Delphi (no flame wars, please :-D), and when a library is loaded in its debugger, it is somehow able to report back to that debugger each dependent .DLL to be loaded, and whether or not the load failed or succeeded. I think it would be awesome to be able to get this kind of information back in my application, but honestly, if I could get back even just what dependent library failed to load, that would be exactly what the doctor ordered.

    Sincerely,

    Daniel

  2. #2
    int x = *((int *) NULL); Cactus_Hugger's Avatar
    Join Date
    Jul 2003
    Location
    Banks of the River Styx
    Posts
    902
    What language?

    There's a MS tool called "depends" which will should you dependencies of a EXE or DLL. (Though, if it does dynamic loading at runtime with LoadLibrary, it won't show those, so you'll have to start with your DLL. See what it needs, and if your client has those.) What DLL are you loading?
    long time; /* know C? */
    Unprecedented performance: Nothing ever ran this slow before.
    Any sufficiently advanced bug is indistinguishable from a feature.
    Real Programmers confuse Halloween and Christmas, because dec 25 == oct 31.
    The best way to accelerate an IBM is at 9.8 m/s/s.
    recursion (re - cur' - zhun) n. 1. (see recursion)

  3. #3
    Algorithm Dissector iMalc's Avatar
    Join Date
    Dec 2005
    Location
    New Zealand
    Posts
    6,304
    Quote Originally Posted by Cactus_Hugger View Post
    What language?

    There's a MS tool called "depends" which will should you dependencies of a EXE or DLL. (Though, if it does dynamic loading at runtime with LoadLibrary, it won't show those, so you'll have to start with your DLL. See what it needs, and if your client has those.) What DLL are you loading?
    It can show you the explicit LoadLibrary calls too if you use it to profile your app.
    (No, not performance profiling for those who just got a bit too excited)
    My homepage
    Advice: Take only as directed - If symptoms persist, please see your debugger

    Linus Torvalds: "But it clearly is the only right way. The fact that everybody else does it some other way only means that they are wrong"

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. 20q game problems
    By Nexus-ZERO in forum C Programming
    Replies: 24
    Last Post: 12-17-2008, 04:48 PM
  2. No clue how to make a code to solve problems!
    By ctnzn in forum C Programming
    Replies: 8
    Last Post: 10-16-2008, 02:59 AM
  3. Need Help Debugging Array Program
    By dcwang3 in forum C Programming
    Replies: 9
    Last Post: 10-01-2008, 08:56 PM
  4. debugging directx apps
    By confuted in forum C++ Programming
    Replies: 1
    Last Post: 08-16-2003, 08:56 AM
  5. Debugging mode selection during compile time
    By YALINI in forum C Programming
    Replies: 1
    Last Post: 09-03-2001, 09:56 AM

Tags for this Thread


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21