|Home » Categories » General|
GN: Using Dependency Walker to Diagnose ActiveX Component Registration Problems
Article Number: 521 | Rating: Unrated | Last Updated: Fri, Nov 9, 2007 at 6:01 PM
Revision Date: 2005-11-02
Sometimes an ActiveX software component will not install, register, or work properly on a specific computer. Symptoms of this problem can include:
1. An error message that refers to one or more files that did not self-register properly during the product installation.
2. An error message saying that registration failed when using regsvr32.exe to manually register an ActiveX component.
Sometimes this type of problem can be diagnosed using the following technique.
Often when an ActiveX component fails to register itself properly it is because some file it that depends upon is not present or is an incorrect version. Trying to figure out what that the missing dependency is can be challenging.
Fortunately, Microsoft provides a utility called Dependency Walker that can be used to analyze program dependencies.
Download the Dependency Walker installation archive from http://www.pqsystems.com/download/DependencyWalkerInstall.exe. Run DependencyWalkerInstall.exe and extract the Dependency Walker files into an empty folder. Then run depends.exe and use File > Open to open the file you want to analyze for dependencies (for 32-bit programs only). You can open files with EXE, DLL, and OCX file extensions.
As an example, let's assume that vsflex8l.ocx is getting an error when you try to register that ActiveX component. You will need to substitute the filename of the ActiveX component that is giving you a registration problem in place of vsflex8l.ocx.
Using Dependency Walker, try opening the vsflex8l.ocx file. If luck is with you, you will see something in red in the lower pane of the depends.exe window. This indicates a dependency problem associated with a file that perhaps is simply missing on your computer. If needed, you can use File > Save As to save a DWI file that you can email to PQ Systems technical support for analysis.
However, in the case of vsflex8l.ocx and other ActiveX components, simply opening the file in depends.exe, like we just did, probably will not tell you the whole story about everything the component actually depends upon. This is because sometimes a software component uses other files only at runtime, so you can't actually see the dependency until the software runs and tries to load the file it depends upon. Depends.exe calls this the process of Profiling a program by watching what gets brought into memory by a program as it runs.
Getting back to the problem at hand, we are having a problem registering vsflex8l.ocx. So, let's analyze the process of registering vsflex8l.ocx and see what depends.exe tells us.
In order to register an ActiveX component you use regsvr32.exe and pass it the ActiveX component to be registered on the command line, e.g.
Here's how to do it using depends.exe. Run depends.exe, then use File > Open to open C:WindowsSystem32 egsvr32.exe (the actual path to regsvr32.exe may vary depending on which version of Windows you are running). Dependency Walker will display the dependency info it was able to detect just by examining regsvr32.exe.
But wait, you say, we want to analyze the dependencies of vsflex8l.ocx, so why are we loading regsvr32.exe into depends.exe? Well, since we want to analyze why vsflex8l.ocx won't register itself, we use regsvr32.exe to ask vsflex8l.ocx to register itself. In order to register vsflex8l.ocx, regsvr32.exe loads vsflex8l.ocx into memory and then call its DllRegisterServer routine. So, in effect, vsflex8l.ocx registers itself, and all regsvr32.exe does is help it out by bringing it into memory and calling its DllRegisterServer routine.
Thus, by having depends.exe profile regsvr32.exe as it registers vsflex8l.ocx, we can watch the dependencies of vsflex8l.ocx as they are loaded into memory and hopefully gain some understanding about what the problem is.
So, getting back to the task at hand, we have loaded regsvr32.exe into depends.exe using File > Open. Now we want to Profile regsvr32.exe as it runs and thus detect what dependent files are required as vsflex8l.ocx is loaded into memory and DllRegisterServer gets called. So, click Profile > Start Profiling (or press F7) and a window similar to that shown below appears.
Make sure that the check boxes are setup as shown above.
Enter C:WindowsSystem32vsflex8l.ocx into the "Program arguments" field, and then click OK. Lots of technical information will be displayed in the lower pane of Dependency Walker. Save the results of the profile and email them to PQ Systems technical support for analysis. Or, it may be obvious from examining the log in the bottom pane of the window what the problem is.
To save the results, click File > Save As and save the results of the Profile into a DWI file.
Summarizing, here are the steps to debug a problem where the ActiveX component vsflex8l.ocx will not register itself:
1. Download Dependency Walker from http://www.pqsystems.com/download/DependencyWalkerInstall.exe and extract the contents into an empty folder. Then run depends.exe from that folder.
2. Use File > Open to open regsvr32.exe. This file is located in the Windows System (or System32) folder (the actual path may vary from one computer to another).
3. Press F7, enter the full path to the ActiveX component that won't register into the "Program arguments" field. In this example, we entered C:WindowsSystem32vsflex8l.ocx. Then click OK.
4. When depends.exe is finished, save the results into a DWI file using File > Save As.
5. Email the DWI file to PQ Systems technical support for analysis.
There are no attachments for this article.
GN: Link to Chart Images from PowerPoint
Viewed 3287 times since Fri, Jan 22, 2010
GN: General guidelines for sending e-mail via an SMTP server using PQ software products
Viewed 7906 times since Mon, Jan 16, 2012
GN: Cannot Read License File due to Data Execution Protection (DEP)
Viewed 2486 times since Fri, Nov 9, 2007
GN: DAO360.DLL or DAO350.DLL Improperly Installed to Root of Drive on Windows XP
Viewed 7193 times since Fri, Nov 9, 2007
GN: PqLicenseMrg.exe Installation Error
Viewed 2405 times since Wed, Oct 28, 2009
GN - Permissions for the PQ Systems registry key
Viewed 2569 times since Fri, Nov 9, 2007
GN: Couldn’t update; currently locked - error on Netware
Viewed 1991 times since Wed, Nov 14, 2007
GN: Using the PQ Application Information Utility
Viewed 4545 times since Thu, Mar 8, 2012
GN - Using the PQ Application Cleaner Utility
Viewed 2832 times since Fri, Nov 9, 2007
GN: How to do an Unattended Install or Uninstall of a PQ Systems product
Viewed 2127 times since Fri, Dec 7, 2007