Instantiate and invoke a Web service or component.
Call native functions by using platform invoke.
So far in this chapter, you've seen interoperability between managed code and unmanaged code by way of method calls to classes in COM libraries. There's a second way that the .NET Framework can interoperate with unmanaged code, though: through functional calls to unmanaged libraries. The PInvoke feature of .NET allows .NET code to call functions from unmanaged libraries such as the Windows API.
STEP BY STEP
9.6 Using PInvoke with the Windows API