MCPcopy Create free account
hub / github.com/HoShiMin/Kernel-Bridge / KbAllocUserMemory

Function KbAllocUserMemory

User-Bridge/API/User-Bridge.cpp:1016–1027  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1014 namespace MemoryManagement
1015 {
1016 BOOL WINAPI KbAllocUserMemory(ULONG ProcessId, ULONG Protect, ULONG Size, OUT WdkTypes::PVOID* BaseAddress)
1017 {
1018 if (!ProcessId || !Size || !BaseAddress) return FALSE;
1019 KB_ALLOC_USER_MEMORY_IN Input = {};
1020 KB_ALLOC_USER_MEMORY_OUT Output = {};
1021 Input.ProcessId = ProcessId;
1022 Input.Protect = Protect;
1023 Input.Size = Size;
1024 BOOL Status = KbSendRequest(Ctls::KbAllocUserMemory, &Input, sizeof(Input), &Output, sizeof(Output));
1025 *BaseAddress = Output.BaseAddress;
1026 return Status;
1027 }
1028
1029 BOOL WINAPI KbFreeUserMemory(ULONG ProcessId, WdkTypes::PVOID BaseAddress)
1030 {

Callers 1

AllocMethod · 0.70

Calls 1

KbSendRequestFunction · 0.85

Tested by

no test coverage detected