#ifndef _NTMMAPI_H
#if (PHNT_MODE != PHNT_MODE_KERNEL)
NTSYSCALLAPI
NTSTATUS
NTAPI
NtLockVirtualMemory(
_In_ HANDLE ProcessHandle,
_Inout_ PVOID *BaseAddress,
_Inout_ PSIZE_T RegionSize,
_In_ ULONG MapType
);
View code on GitHub
#ifndef _NTZWAPI_H
NTSYSCALLAPI
NTSTATUS
NTAPI
ZwLockVirtualMemory(
_In_ HANDLE ProcessHandle,
_Inout_ PVOID *BaseAddress,
_Inout_ PSIZE_T RegionSize,
_In_ ULONG MapType
);
View code on GitHub
Can be one or both of following values:
#define VM_LOCK_1 0x0001 // This is used, when calling KERNEL32.DLL VirtualLock routine
#define VM_LOCK_2 0x0002 // This require SE_LOCK_MEMORY_NAME privilege
Privilege: SE_LOCK_MEMORY_NAME