VirtualAlloc

C# Signature:

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

C# Signature:

[DllImport("kernel32")]
  public static extern IntPtr VirtualAlloc(IntPtr lpAddress, uint dwSize, uint flAllocationType, uint flProtect);

C# Signature:

[DllImport("kernel32.dll", SetLastError = true, ExactSpelling = true)]
    static extern IntPtr VirtualAllocEx(IntPtr hProcess, 
                        IntPtr lpAddress,
                        int dwSize, 
                        AllocationType flAllocationType, 
                        MemoryProtection 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 IntPtr, ByVal flAllocationType As UInteger, _
     ByVal flProtect As UInteger) As IntPtr
End Function

VBA Signature:

Boo Signature:

User-Defined Types:

Sample Code:

Última actualización