O'Reilly logo

Application Development Using Visual Basic® and .NET by Dana L. Wyatt, Peter Thorsteinson, Robert J. Oberg

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Platform Invocation Services (PInvoke)

Platform Invocation Services, also known as PInvoke, makes unmanaged exported DLL functions available to managed client code. PInvoke allows this to be done from managed code written in any .NET programming language. Notice that PInvoke is not the name of a class or a method, but is just a nickname for Platform Invocation Services. PInvoke looks after marshaling between CLR data types and native data types, and bridges other differences between the managed and unmanaged runtime environments. Although PInvoke is primarily used to access the Win32 APIs, it can be used to call into your own legacy DLLs that you may find are still useful. Unfortunately, PInvoke is in most circumstances a one-way street. You ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required