Determine .exe Dependencies
I hav开发者_如何学编程e a .exe file which I believe was created with VB6. Are there any tools in Visual Studio 6 or later that would let me see any dynamic libraries required for the application to run?
Try this - Dependancy Walker.
You can see the implicitly linked DLL dependencies with Dumpbin /imports. Or the static view as provided by Dependency Walker. However, VB6 programs typically have a heavy dependency on COM components and they get demand-loaded while the program runs. Those components need to be registered before the program can load and use them.
To see that, you'll need a utility that shows how the program is using the registry. Nothing in the VS6 toolbox for that, you can use SysInternals' ProcMon utility. Pay attention to the program trying to open keys in the HKLM\Software\Classes\CLSID registry key, that's where COM components are registered. You should see it fail to find that key, from which you can determine the CLSID.
That still doesn't really get you anywhere because that's just an opaque number, it doesn't tell you the name or location of the DLL. Use Regedit.exe on a machine on which the program runs correctly. Locate that key, the LocalServer32 value tells you which DLL or OCX implements the COM component.
精彩评论