Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / July 2006

Tip: Looking for answers? Try searching our database.

Programmatically determine DLL dependencies

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mike C# - 20 Jul 2006 20:06 GMT
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 - 20 Jul 2006 20:56 GMT
Mike C# schrieb:
> Hi all,
>
[quoted text clipped - 3 lines]
>
> Thanks

Hi Mark,

You could load the DLL and check it your Modules via EnumProcessModules
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 :/

Signature

Regards,
Vinzenz Feenstra

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

Mike C# - 20 Jul 2006 21:17 GMT
> Hi Mark,
>
[quoted text clipped - 6 lines]
> 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#

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.