Using PInvoke
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 STEP9.6 Using PInvoke with the Windows API
|
Get MCAD/MCSD.NET Training Guide (Exam 70-316): Developing and Implementing Windows®-Based Applications with Microsoft® Visual C#™ .NET and Microsoft® Visual Studio® .NET 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.