| 422 | namespace VirtualMemory |
| 423 | { |
| 424 | BOOL WINAPI KbAllocKernelMemory(ULONG Size, BOOLEAN Executable, OUT WdkTypes::PVOID* KernelAddress) |
| 425 | { |
| 426 | if (!Size || !KernelAddress) return FALSE; |
| 427 | KB_ALLOC_KERNEL_MEMORY_IN Input = {}; |
| 428 | KB_ALLOC_KERNEL_MEMORY_OUT Output = {}; |
| 429 | Input.Size = Size; |
| 430 | Input.Executable = Executable; |
| 431 | BOOL Status = KbSendRequest(Ctls::KbAllocKernelMemory, &Input, sizeof(Input), &Output, sizeof(Output)); |
| 432 | *KernelAddress = Output.KernelAddress; |
| 433 | return Status; |
| 434 | } |
| 435 | |
| 436 | BOOL WINAPI KbFreeKernelMemory(IN WdkTypes::PVOID KernelAddress) |
| 437 | { |
no test coverage detected