Determine dependant dlls
I have a CVI executable that calls functions from a Visual Studio prj that produces a UserDriver.dll.
I had a problem whereby i copied the UserDriver prj and modified it to generate a UserDriverEngRel.dll. I had not modified the .def file and so the .exe was in fact calling UserDriver.dll functions instead of UserDriverEngRel.dll functions.
From the CVI .exe i wish to determine which dlls are used by the .exe and display the build date & time and version issue on the UI so the user can verify that these are correct.
How do i do this?
Thanks for the pointer to the utility which looks really useful, i will try it out in anger tomorrow at work. When i put the post on i was ideally looking for some sort of C function that would perhaps return an array of strings listing the dependant dlls?
Is this possible? or is there a windows type function that would do this?
The depends.exe utility works by walking the import tables recursively, starting with the program executable. There is no built-in Windows function that accomplishes that.
Even so, that's not the whole story because DLLs can get loaded by a call to LoadLibrary() at runtime. A program might depend on foo.dll even if foo.dll is not imported. The problem has no generic solution.