VirtualFreeEx (kernel32)
Last changed: -123.192.205.50

.
Summary

C# Signature:

[DllImport("kernel32.dll", SetLastError=true, ExactSpelling=true)]
static extern bool VirtualFreeEx(IntPtr hProcess, IntPtr lpAddress,
   UIntPtr dwSize, uint dwFreeType);

[DllImport("kernel32.dll", SetLastError=true, ExactSpelling=true)]
public static unsafe extern bool VirtualFreeEx(
   IntPtr hProcess, byte* pAddress,
   UIntPtr size, AllocationType freeType);

User-Defined Types:

  [Flags]
  public enum AllocationType
  {
    Commit = 0x1000,
    Reserve = 0x2000,
    Decommit = 0x4000,
    Release = 0x8000,
    Reset = 0x80000,
    Physical = 0x400000,
    TopDown = 0x100000
  }

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