MCPcopy Create free account
hub / github.com/WinDurango/WinDurango / DispatchGetDriverMemory

Function DispatchGetDriverMemory

projects/WinDurango.KernelX/src/Logan.cpp:82–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80}
81
82_Use_decl_annotations_ DWORD DispatchGetDriverMemory(DWORD IoControlCode, PVOID InBuffer, DWORD InBufferSize,
83 PVOID OutBuffer, DWORD OutBufferSize, PDWORD BytesReturned,
84 LPOVERLAPPED Overlapped)
85{
86 auto In = reinterpret_cast<LOGAN_IOCTL_IN_GET_DRIVER_MEMORY const *>(InBuffer);
87 auto Out = reinterpret_cast<LOGAN_IOCTL_OUT_GET_DRIVER_MEMORY *>(OutBuffer);
88
89 LOGAN_PHYSICAL_MEMORY memory{};
90 g_LoganHeap.GetDriverMemory(In->type, &memory);
91
92 ZeroMemory(Out, sizeof(LOGAN_IOCTL_OUT_GET_DRIVER_MEMORY));
93 Out->address = memory.address;
94 Out->apuAddress = memory.apuAddress;
95 Out->sizeInBytes = memory.sizeInBytes;
96
97 if (BytesReturned)
98 *BytesReturned = sizeof(LOGAN_IOCTL_OUT_GET_DRIVER_MEMORY);
99
100 return ERROR_SUCCESS;
101}
102
103inline void DispatchACPCommand(ACP_COMMAND_TYPE_INTERNAL cmdType, AcpState *acpState, AcpCommand Cmd)
104{

Callers 1

EraDeviceIoControlFunction · 0.85

Calls 1

GetDriverMemoryMethod · 0.80

Tested by

no test coverage detected