Red Gate logo

Introduction to PInvoke

PInvoke Visual Studio add-in

Find and contribute PInvoke signatures

PInvoke.net, meaning Platform Invoke, is a wiki used by around 50,000 .NET developers a month to find and contribute PInvoke signatures (also known as Declare statements in VB), type definitions, and any other information related to calling Win32, or other unmanaged APIs in managed code (languages such as C# or VB.NET).

As a wiki, it is user driven and acts as a repository where developers can contribute or retrieve information as they wish.

Features of PInvoke

Copy and paste your way to productivity

Certain things just can't be done in pure .NET, and the developer has to drill down to the Windows API. This is achieved through .NET's Platform Invoke (PInvoke) functionality, which requires declarations to be supplied by the developer.

Manually defining and using PInvoke signatures is an error-prone process that can introduce extremely subtle bugs. PInvoke.net supplies you with tried and tested signatures and type definitions, so that you don't have to spend time writing them from scratch.

Visual Studio integration for the quick and easy insertion of PInvoke signatures

PInvoke Visual Studio Addin screenshot

Download the PInvoke.net add-in for Visual Studio and save yourself the effort of having to open up a web browser to search for the PInvoke.net website. You can now insert a PInvoke signature with the click of a button while you're working on your application in Visual Studio.

Read a concrete example of how PInvoke can help