| 1036 | } |
| 1037 | |
| 1038 | BOOL WINAPI KbSecureVirtualMemory( |
| 1039 | ULONG ProcessId, |
| 1040 | WdkTypes::PVOID BaseAddress, |
| 1041 | ULONG Size, |
| 1042 | ULONG ProtectRights, |
| 1043 | OUT WdkTypes::HANDLE* SecureHandle |
| 1044 | ) { |
| 1045 | if (!ProcessId || !BaseAddress || !Size || !SecureHandle) return FALSE; |
| 1046 | KB_SECURE_VIRTUAL_MEMORY_IN Input = {}; |
| 1047 | KB_SECURE_VIRTUAL_MEMORY_OUT Output = {}; |
| 1048 | Input.ProcessId = ProcessId; |
| 1049 | Input.ProtectRights = ProtectRights; |
| 1050 | Input.BaseAddress = BaseAddress; |
| 1051 | Input.Size = Size; |
| 1052 | BOOL Status = KbSendRequest(Ctls::KbSecureVirtualMemory, &Input, sizeof(Input), &Output, sizeof(Output)); |
| 1053 | *SecureHandle = Output.SecureHandle; |
| 1054 | return Status; |
| 1055 | } |
| 1056 | |
| 1057 | BOOL WINAPI KbUnsecureVirtualMemory( |
| 1058 | ULONG ProcessId, |
nothing calls this directly
no test coverage detected