Some Additional Considerations

The most common problems you will encounter with COM Interop typically surround type conversion. Occasionally, the only way to fix some of these problems is by messing around with the Intermediate Language (IL) directly using a utility called ildasm.exe. In fact, many Primary Interop Assemblies shipped by vendors of COM objects will have probably tweaked the IL of an RCW to either fix slight issues with conversion or to make the RCW easier to consume. This is a non-trivial operation, and I recommend against doing this yourself.

Also, remember that obtaining PIAs for any third-party COM object or ActiveX control is essential. The PIAs for Microsoft Office XP are good examples of essential vendor provided wrappers. ...

Get Microsoft® Visual Basic® .NET 2003 Kick Start now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.