Is there any way to tell if a .dll is registered?

SP33Demon

Lifer
Jun 22, 2001
27,928
142
106
Hi all, just wondering if there was a way to find this out? I think there is a way to do it through the command line, but can't remember how to do it.
 

KB

Diamond Member
Nov 8, 1999
5,406
389
126
There is no easy way. You would have to search the registry for it in HKEY_CLASSES_ROOT. Rather than checking, you can just re-register the DLL everytime using regsvr32. Re-registering doesn't harm anything.
 

MrChad

Lifer
Aug 22, 2001
13,507
3
81
You can search for the filename under HKEY_CLASSES_ROOT in the registry. That's not a guarantee that the DLL will work, but it's better than nothing.

If you know the class name for the COM object contained within the DLL, you can instantiate it using a tool like Oleview (bundled with Visual Studio if you have that installed). Instantiating the object is a better test than searching the registry.
 

SP33Demon

Lifer
Jun 22, 2001
27,928
142
106
Originally posted by: MrChad
You can search for the filename under HKEY_CLASSES_ROOT in the registry. That's not a guarantee that the DLL will work, but it's better than nothing.

If you know the class name for the COM object contained within the DLL, you can instantiate it using a tool like Oleview (bundled with Visual Studio if you have that installed). Instantiating the object is a better test than searching the registry.
Sweet, thanks guys. I figured this was the only way.