Recently I've been experimenting with the Microsoft Windows Image Acquisition Library (WIA), a COM library that therefore requires the use of interop in .NET. In the course of testing some of the different features of this library I triggered a compile error I haven't come across for a long time. As it isn't often I work with COM interop I thought I'd write a quick post detailing how to resolve or work around the compile errors to more firmly cement it in my head for the next time.
In older versions of .NET (or Visual Studio), when you referenced a COM library
an interop DLL was generated - you could always tell these from their filenames
as they would start with
Interop.. I also seem to remember that back in the
days of .NET 1.1 I would manually run a utility program to generate the interop
DLL's, to avoid some form of naming prefix.