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. Without these, you will find numerous issues with trying to automate Microsoft Office XP from a .NET application. The good news is that COM objects created with Visual Basic 6.0 interact very well with .NET applications, making the migration of your old applications a scenario you should not fear. It is recommended, however, that you take the time to create and distribute PIAs for these objects as vendors would theirs.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.226.120