/
*
NTSYSAPI NTSTATUS ZwQueryVirtualMemory(
[
in
] HANDLE ProcessHandle,
[
in
, optional] PVOID BaseAddress,
[
in
] MEMORY_INFORMATION_CLASS MemoryInformationClass,
[out] PVOID MemoryInformation,
[
in
] SIZE_T MemoryInformationLength,
[out, optional] PSIZE_T ReturnLength
);
*
/
/
*
typedef struct _MEMORY_BASIC_INFORMATION {
PVOID BaseAddress;
PVOID AllocationBase;
ULONG AllocationProtect;
USHORT PartitionId;
SIZE_T RegionSize;
ULONG State;
ULONG Protect;
ULONG
Type
;
} MEMORY_BASIC_INFORMATION,
*
PMEMORY_BASIC_INFORMATION;
*
/
/
/
-
1
当前进程句柄
/
/
查询当前进程指定虚拟地址的内存属性 MEMORY_BASIC_INFORMATION
lStatus
=
ZwQueryVirtualMemory(
-
1
,VirtualMemory,ulZero,OutputBuffer,OutputLen,OutReturnLen);
KeUnstackDetachProcess(&apc);
return
lStatus;