COM Re-Registry Help!

GBalcom

Much to learn!
Local time
Today, 11:11
Joined
Jun 7, 2012
Messages
460
Hello,
First off, I'm posting here because this seems to be the most active place on the site for COM knowledge. Please move if needed.

In 2019, I had a developer create a .NET dll and .tlb for me that, through COM, allowed me to interact with our google calendar in Access VBA. This has been stable for years (my program runs automatically on our server every day), except that a few years ago, the update calendar event function changed behavior. Instead of updating the existing event, it would create a new one. The old developer is no longer available, so I recently hired a new one. In the .NET source code, he found that update event was somehow broke and required an update to the .NET framework to 4.8 from 4. He also added a new function (GetEvent), which should allow me to look at event in VBA and ensure its valid before I update it. The problem is deployment.

We spent 6 hours working on my local machine yesterday to prototype the changes before pushing them to our server. We found several DLL files from the first developer in various locations, and he really seemed to struggle with which one was actually being used. We unreferenced, and referenced the files many many times, restarted, and many iterations of regasm.exe to try to register the correct assembly. He did finally get it working (local test .accdb), and said the issue was permissions.

Now, I had assumed that if we got it working on a local test db, then I could run another db locally, and it would work fine (because that .tlb was registered on the machine I'm working on previously). But this morning, I tried a copy of my production app running on my local, and found it didn't work. Rather, I had the same results I've always had, no improvement. I can only assume it's using the old .tlb from somewhere.

So, is there a way to unregister the old version of a .dll so that we can fully utilize the new one?

Honestly, I'm in over my head here. Hoping one of you can point us in the right direction. Thank you!
 
So, is there a way to unregister the old version of a .dll so that we can fully utilize the new one?
There are several ways to achieve this.
regasm /u should be the easiest.
Of course, you can also delete all the registered COM Interfaces (Classes) from the Registry manually or with a script. You need to know their names and CLSIDs then though.

Also be aware, that COM Interfaces can be registered in HKLM or HKCU. Regasm will only (un)register them in HKLM, I think.

Considering the struggles you described, it might be a good idea to use regasm /regfile to write the entries to a file and then check the registry manually with that information.
 

Users who are viewing this thread

Back
Top Bottom