Tuesday 17 April 2007

COM Interop

One of the darker areas of the dotnet framework (for me) has been COM interop. Somehow you flag an assembly as COM visible and hey presto - you can instantiate your classes and invoke your methods from a COM host.

Recently I had a problem where a VB6 host was calling into a C#(dotnet1.1) assembly. Everything worked fine on the machine it was built on but things stopped working when it was deployed to other machines. Something was clearly wrong with the registration or location of the dotnet assembly.

I found a good article by Phil Wilson that helped me solve the problem. Best practice is to explicitly declare an interface and the GUID's used to register your class. The article is here.

Hello, World

Hello blogland!
Ok, so now what?