| 82 | |
| 83 | _IRQL_requires_max_(APC_LEVEL) |
| 84 | BOOLEAN SecureMemory(__in_data_source(USER_MODE) PVOID UserAddress, SIZE_T Size, ULONG ProtectRights, OUT PHANDLE SecureHandle) |
| 85 | { |
| 86 | if (!SecureHandle || !Size || AddressRange::IsKernelAddress(UserAddress)) |
| 87 | return FALSE; |
| 88 | |
| 89 | *SecureHandle = MmSecureVirtualMemory(UserAddress, Size, ProtectRights); |
| 90 | return *SecureHandle != NULL; |
| 91 | } |
| 92 | |
| 93 | _IRQL_requires_max_(APC_LEVEL) |
| 94 | BOOLEAN SecureProcessMemory(PEPROCESS Process,__in_data_source(USER_MODE) PVOID UserAddress, SIZE_T Size, ULONG ProtectRights, OUT PHANDLE SecureHandle) |
no test coverage detected