Registered - November 2001

A common news group question goes something like:

How Can I Tell If a DLL is Registered?

Some years ago I wrote code to make sure that an application's dependencies are registered. A couple years ago I wrote a function to see if DAO 3.6 is registered [see: What I Learned About DAO 3.6 and Jet 4]. I decided to generalize the code in response to the news group question. So I created two functions: IsRegisteredByName and IsRegisteredByGUID. These functions become the tip-of-the-month.

August 29, 2004 - I discovered that Lotus Notes registers its file location using key 'LocalServer32' rather than 'InprocServer32'. Function 'IsRegisteredByGUID' now first checks 'InprocServer32' then if not found tries 'LocalServer32'.

The Demo

I wrote a demo program to demonstrate the use of the functions. A screen shot of the VB6 demo:

In the first frame, of the above example, object name 'DAO.DBEngine.36' is used to find its GUID which in turn is used to find its fully qualified file name. In the second frame OLE32's GUID is used to find its file name.

Another Example - VB Compiled DLL

In this example I used the class name [iDLL.clsMRU] to determine if a DLL I wrote using VB was registered. Rather than use the GUID, since VB generates a new one each time a DLL is compiled, I used one of the DLL's class names to determine if the DLL is registered.

The Demo Program Uses These Modules

Module - Click for More Info Description Used in the Demo To
modRegistered Contains functions:
  IsRegisteredByName, and
Include this module in your application.
Support the Demo program.
modConnectToWebSite.bas Connect to a web site Show this info when Help/Info is
selected from the demo.
TBRegistry.bas Read and write to the registry Get info from the registry.

Other Resources - Registering using VB

Mike Culley has sample code on his site to register files. Link to then download 'Call Pointer'. Click the form's 'More' button to review the code he uses to register a file.

Download VB 6 Source Code

Click here to download the VB 6 source code [9k]. Updated 2004/08/29, see above.

Previous Tip   Tip Index    Next Tip   First Tip


Updated 2009/05/03