Link to home
Start Free TrialLog in
Avatar of James Cochrane
James CochraneFlag for United States of America

asked on

Cannot unregister a DLL.

I am using the Java ActiveX Bridge which creates and registers a DLL for use in VBA.  Not knowing the the Java Packager was registering the DLL I used REGSVR32 to register the DLL again which created multiple copies of it.  I've tried using REGSVR32 /u and it tells me that it unregisters it.  But I can't seem to get rid of those orphaned instances.  When I try to add the Components in VB6 it tells me they are invalid.  Do I have to alter the registry manually and if so, can you point me in the right direction as to which ones to access?

Thanks
Avatar of jkr
jkr
Flag of Germany image

Altering the registry does not have any effect on instances that are already running, it just means that new instances of that COM object can't be created anymore. You'll have to close/terminate all other processes that are using this class.
ASKER CERTIFIED SOLUTION
Avatar of bastibartel
bastibartel

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Funny, "AlwaysUnloadDll" is not supported on W2k, XP and later: http://msdn.microsoft.com/library/en-us/shellcc/platform/shell/programmersguide/shell_basics/shell_basics_programming/debugging.asp ("Debugging with the Shell"):

"The Shell automatically unloads a DLL when its usage count is zero, but only after the DLL has not been used for a period of time. This inactive period might be unacceptably long at times, especially when a Shell extension DLL is being debugged. For operating systems *prior* to Windows 2000, you can shorten the inactive period by adding the following information to the registry. [...]"