Solved

Cannot unregister a DLL.

Posted on 2006-07-04
3
298 Views
Last Modified: 2013-12-04
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
0
Comment
Question by:techhound
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 86

Expert Comment

by:jkr
ID: 17039818
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.
0
 
LVL 5

Accepted Solution

by:
bastibartel earned 500 total points
ID: 17049478
Set this value to 1 (only on Windows NT 4.0 - I believe):
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\explorer\AlwaysUnloadDll

Get ProcessExplorer
http://www.multiware-distribution.ch/produkte/Northern/PrExplorer.htm
and locate the executable(s) using the dll and kill them

or
try and start in safe mode and remove the dll.


Cheers,
Sebastian
0
 
LVL 86

Expert Comment

by:jkr
ID: 17053654
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. [...]"
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to add a user-defined command button to the Windows 7 Explorer toolbar.  In the previous article (http://www.experts-exchange.com/A_2172.html), we saw how to put the Delete button back there where it belongs.  "Delete" is …
This article surveys and compares options for encoding and decoding base64 data.  It includes source code in C++ as well as examples of how to use standard Windows API functions for these tasks. We'll look at the algorithms — how encoding and decodi…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question