Archive: DLL dependencies


DLL dependencies
Hi,
Is there a way in NSIS to findout the dependencies for
the installing DLL files?
When I install the package on my machine(development),
the binary works fine. But, when I install the same product
on a new machine, I get an error "ActiveX component
can't create object".

I collected the dependencies of all the DLL for my product using
MS VB Package and Deployment Wizard... dependencies option. Is
there a better way to figuring out the dependency DLL files?



:cry:


try to use Process viewer which you can download from here:
http://www.prcview.com

hope it will help you :)


This 'error' appears frequently for users of my program too, for me it's related to several OCX/DLL files which are not correctly registered.
You may have gotten the right dependencies, but not correctly installed all the files.


I get the same error: "ActiveX component
can't create object". Can somebody give me more info which OCX/DLL is causing it? I am using several tools to find the DLL/OCX that is giving me problem, but so far I was unable to find it. I am creating an installer for VB 6 application. I have used Library.nsh to install VB6 runtime.


I agree that it sounds like some DLL or OCX didn't get properly registered. But, it could also mean that a call is being made to another OCX/DLL that is expected to be there but isn't. (For example, Internet Explorer, DirectX, etc.)

In order to get to the bottom of this, you'll need to try to find out is exactly what DLL/OCX you are missing and then try to manually register it. (use REGSVR32 at a Windows RUN box to register files manually. For help, run 'REGSVR32 /?') I'd probably start with the files included in the VB6 runtime.

As far viewing dependencies, I'd use Dependency Walker (http://www.dependencywalker.com/) to analzyer individual DLLS. However, keep in mind that most of these tools will not detect dynamically loaded DLLs.

There's another tool from SysInternals called 'filemon' that might help you analyze the program in question to see what files it's trying to access. (URL: www.sysinternal.com) Then you can compare this list to the list on your developer machine to see what may be missing on the test machine. (filemon allows you to filter a process using wildcards so that you get a list of just the files used by a particular process.)


Thank you Comperio for your advise. I am still trying to figure out the problem. I have used Dependency Walker and Filemon like you suggested.

I think I figured out what the problem is.

Here is the output of the Dependency Walker where my program crashes:

LoadLibraryW("OLE32.DLL") called from "OLE32.DLL" at address 0x774FD899.
LoadLibraryW("OLE32.DLL") returned 0x774E0000.

I checked the search path on the computer where my application runs using VB installer.

Search Path: C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Common Files\GTK\2.0\bin

The search path on the test machine is the following:

Search Path: C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem

It is missing C:\Program Files\Common Files\GTK\2.0\bin, so I guess that's why it cannot find some DLL which are located in Program Files\Common Files folder.

How do I add the missing directory to the Search path of my application using NSIS? Which registry contains an entry to the path variable?


This should help:
http://nsis.sourceforge.net/wiki/Set...ment_Variables


I am still trying to figure out the problem to this error.
The path stuff is fine and it was not the problem. I hate DLL errors, they are very hard to track down.

Using Regmon, which is a tool for monitoring accesses to registry I figured out that my program blows up when
it is trying to access the HKCR\CLSID\9289FAC-xxxx registry. This registry does not exist. Using VB installer, when I installed my application I checked that this registry contains AccuObjects.clsCompany which is inside AccuObjects.dll (dll that contains compiled code for my company's application). When I checked on the test PC AccuObjects.dll with all the classes is there in the registry but under different CLSID. How can I fix this problem? All the application's DLLs are there but under different CLSID then what the system looks for when I run my application.

In my NSIS code I registered all DLLs for my application using Library.nsh. This is very time consuming to track and fix this DLL errors.


Using another tool ListDlls, I figured out that 2 Dlls for my applications are not hetting loaded. I registered them manually using regsvr32 command. Why are they not getting loaded eventhough they are registered? Any ideas would be great.