Fix 32-bit compilation failure

This commit is contained in:
Boring
2022-11-17 13:06:19 +08:00
parent a4bf9430d1
commit dcf5f3ccde
4 changed files with 11 additions and 9 deletions
+5 -4
View File
@@ -291,19 +291,20 @@ VOID InitializeWindowsVersion() {
NTSTATUS MmpAllocateGlobalData() {
NTSTATUS status;
HANDLE hSection = nullptr;
OBJECT_ATTRIBUTES oa;
LARGE_INTEGER li;
WCHAR buffer[128];
HANDLE hSection = nullptr;
UNICODE_STRING us{};
PVOID BaseAddress = 0;
SIZE_T ViewSize = 0;
WCHAR buffer[128];
PTEB teb = NtCurrentTeb();
swprintf_s(
buffer,
L"\\Sessions\\%d\\BaseNamedObjects\\MMPP*%08X",
L"\\Sessions\\%d\\BaseNamedObjects\\MMPP*%p",
NtCurrentPeb()->SessionId,
(unsigned int)(ULONG_PTR)NtCurrentProcessId()
(PVOID)(~(ULONG_PTR)teb->ClientId.UniqueProcess ^ (ULONG_PTR)teb->ProcessEnvironmentBlock->ProcessHeap)
);
RtlInitUnicodeString(&us, buffer);