Skip to main content

Posts

Showing posts from October, 2008

Getting .NET COM Interop DLLs Working

I recently finished working on a macro program where the software’s interface is COM.  Everything worked great until I wanted to transfer the macro over to a test client computer.  The program I was writing the macro for requires some registry entries, so I assumed that was all I needed to do.  After about 2 hours of having issues I figured out how to get the macro working on computers other than the one I developed the macro on. What happens automatically when developing COM innerop projects in Visual Studio is that the IDE automatically registers the DLL file behind the scenes, so when the program that is going to use the macro starts up, it can find the DLL file (assuming the “register for COM Interop” is checked in project properties). When transferring over the macro DLL(s), the client computer does not have the correct registry entries, so when the program attempts to load the macro, it will fail because it can’t find the macro DLL(s). Things I learned: regsrv does ...