Programmatically determine DLL dependencies

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mike C#

    #1

    Programmatically determine DLL dependencies

    Hi all,

    What's the "best" way to determine an EXE file's DLL dependencies from
    within a program? I basically need to figure out which DLL's are required
    by an EXE like Dependency Walker, from within a C++ application.

    Thanks


  • Vinzenz Feenstra

    #2
    Re: Programmaticall y determine DLL dependencies

    Mike C# schrieb:
    Hi all,
    >
    What's the "best" way to determine an EXE file's DLL dependencies from
    within a program? I basically need to figure out which DLL's are required
    by an EXE like Dependency Walker, from within a C++ application.
    >
    Thanks
    Hi Mark,

    You could load the DLL and check it your Modules via EnumProcessModu les
    on your process. Or something like that.

    Or you can check the Import Address Table of the DLL but you wouldn't
    get any DLLs that are loaded via LoadLibrary from this DLL

    That are just suggestions for ways, but I'm not sure how to do it
    correctly :/

    --
    Regards,
    Vinzenz Feenstra

    And now visit my WeBlog < http://blog.evilissimo.net ;)

    Comment

    • Mike C#

      #3
      Re: Programmaticall y determine DLL dependencies


      "Vinzenz Feenstra" <vinzenz.feenst ra@blog.eviliss imo.netwrote in message
      news:e9on4j$23q $1@online.de...
      Hi Mark,
      >
      You could load the DLL and check it your Modules via EnumProcessModu les on
      your process. Or something like that.
      >
      Or you can check the Import Address Table of the DLL but you wouldn't get
      any DLLs that are loaded via LoadLibrary from this DLL
      >
      That are just suggestions for ways, but I'm not sure how to do it
      correctly :/
      Thanks Vincenz,

      Those sound like reasonable suggestions, I'll check them out. Basically
      what I'm trying to do is write a small program that determines which DLL's
      an EXE needs and then determine if those DLL's are installed in the system
      path. Doesn't seem like it should be too difficult - just grab all the
      required DLL names and then try to load them one by one; if a DLL fails to
      load, then it's not on the system path. Does that sound like a reasonable
      plan?

      Thanks,
      Mike C#


      Comment

      Working...