DkmProcess.AllocateVirtualMemory(UInt64, Int32, Int32, Int32) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
保留和/或提交目标进程的虚拟地址空间内的内存区域。 除非使用 MEM_RESET,该函数将分配的内存初始化为零。 有关其他信息,请参阅 MSDN 中的 VirtualAlloc Win32 API。
public:
System::UInt64 AllocateVirtualMemory(System::UInt64 Address, int Size, int AllocationType, int PageProtection);
public:
unsigned long long AllocateVirtualMemory(unsigned long long Address, int Size, int AllocationType, int PageProtection);
unsigned long AllocateVirtualMemory(unsigned long Address, int Size, int AllocationType, int PageProtection);
public ulong AllocateVirtualMemory (ulong Address, int Size, int AllocationType, int PageProtection);
member this.AllocateVirtualMemory : uint64 * int * int * int -> uint64
Public Function AllocateVirtualMemory (Address As ULong, Size As Integer, AllocationType As Integer, PageProtection As Integer) As ULong
参数
- Address
- UInt64
中目标进程中的地址,应在该位置提交或保留内存。 此值通常为零,在这种情况下,系统会选择地址。
- Size
- Int32
中要分配的内存区域的大小(以字节为单位)。 系统将自动计算到下一页边界。
- AllocationType
- Int32
中指示要执行的分配的类型。 这通常是 MEM_COMMIT | MEM_RESERVE (0x3000),可一步完成保留和提交分配。
- PageProtection
- Int32
中要分配的页面区域的内存保护。 如果正在提交页面,则可以指定 ((例如: PAGE_READWRITE、PAGE_EXECUTE) 的内存保护常量之一。
返回
弄已分配的页面区域的基址。