VirtualAllocEx (kernel32)
Last changed: -73.12.6.55

.
Summary

C# Signature:

[DllImport("kernel32.dll", SetLastError=true, ExactSpelling=true)]
static extern IntPtr VirtualAllocEx(IntPtr hProcess, IntPtr lpAddress,
   uint dwSize, uint flAllocationType, uint flProtect);

VB.NET Signature:

<DllImport("kernel32.dll", SetLastError:=True, ExactSpelling:=True)> _

    Private Function VirtualAllocEx(ByVal hProcess As IntPtr, ByVal lpAddress As IntPtr, _
    ByVal dwSize As Long, ByVal flAllocationType As Long, _
    ByVal flProtect As Long) As IntPtr
    End Function

User-Defined Types:

None.

Notes:

None.

Tips & Tricks:

Please add some!

Sample Code:

Please add some!

Alternative Managed API:

The ManagedWindowsApi project (http://mwinapi.sourceforge.net) provides a ProcessMemoryChunk class to allocate and access memory of a different process.

Documentation