Native Code Interoperability

Although the .NET Framework comes with a rich set of functionality, a tremendous amount of legacy code still exists. Organizations have spent millions and millions of dollars to create applications, libraries, and COM components. Rather than trying to force everyone to start from scratch, the .NET Framework was designed from the beginning to offer interoperability with existing native code.

Native code interoperability comes in two basic flavors in the runtime—COM component interoperability (known as COM interop) and calling methods in native DLLs (known as Platform Invoke, or PInvoke). COM interop enables classic COM objects to be treated just like managed objects. Since classic COM objects already have some level ...

Get .NET Framework Security 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.