Chapter 4. Platform Invoke
In this chapter, we discuss Platform Invoke, a .NET feature for calling unmanaged libraries from managed code.
This chapter covers Platform Invoke—also known as P/Invoke—a .NET feature for calling functions in unmanaged DLLs. Most of the time the .NET Compact Framework provides all the support you need to build programs. Sometimes, however, you will want to do something that the .NET Compact Framework does not support but that a function in a Win32 DLL can do.
To call a function in an unmanaged DLL from managed code, you create a P/Invoke wrapper. A P/Invoke wrapper is a .NET-compatible method declaration used to call a function in an unmanaged DLL. The syntax for creating P/Invoke wrappers is essentially identical to ...
Get .NET Compact Framework Programming with Visual Basic .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.