| 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 | |
| 103 | inline void DispatchACPCommand(ACP_COMMAND_TYPE_INTERNAL cmdType, AcpState *acpState, AcpCommand Cmd) |
| 104 | { |
no test coverage detected