Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We have a VB6 application that uses a COM object to communicate with an email package. The app runs autonomously and every once in a blue moon the COM DLL seems to become unregistered. A quick call to RegSvr32 and the system is back to happy. We tried implementing a quick fix that registers the DLL every time the application is going to need it, but that doesn’t seem to have worked.
This has become quite an annoyance.

In case you are wondering the app just calls a shell command.

Shell "regsvr32 /s " & """" & pathName & """"

Does anyone have a idea of what can cause a COM DLL to become unregistered?

share|improve this question
add comment

4 Answers

I've seen strange things happen with COM DLLs due to virus scanners and anti-spyware software. If you can, try disabling these apps if you have them.

share|improve this answer
    
I'll have to set up a lab for this test but it's worth doing. Nothing is going on our network without a Virus Scanner though. So if it is the case I'm not sure what to do other than try another scanner. –  Dan Blair May 11 '09 at 15:02
add comment

Just a guess but is the DLL, or more likely another version of the same DLL, being registered at different file location? For a COM DLL if it were the same version and were being called normally (by GUID or name) it shouldn't matter, I don't think, but worth checking.

share|improve this answer
    
This shouldn't be the case, the DLL is compiled such that it shouldn't matter, but I'll do a search for earlier versions. –  Dan Blair May 11 '09 at 15:06
add comment

I do have a solution to this problem now. The email package is Outlook and that is key to the issue. The COM object was not actually becoming unregistered in the system it was failing to load in Outlook which seems to be a more common occurance, though still rare. Apparently there are some odd situations where outlook will just stop loading COM add ins all together.

For a link to a KB article KB945743

The solution is to unload the COM object from Outlook and reload it.

share|improve this answer
    
Yeah - what I've run into in the past is that when an add-in to to any of the different Office apps throws an exception that is unhandled, the Office app will automatically disable the add-in from loading. So make sure that you have exception catches all the way up at the top of the add-in interface methods. –  Sam Schutte Aug 19 '09 at 17:56
    
I think you should accept your own answer here? –  Glytzhkof Jun 3 '11 at 1:45
add comment

OR something is unregistering it or another version newer or older of the same com object is running and autoregistering the com in the same path of the executable, this is weird but this can occur

And one of them will not run if both applications are executed, one will fail

VB6 com files are autoregistered if the com file is in the same path of the executable

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.