From c9a55908a5d6587c3864f7d24d73f824932051a0 Mon Sep 17 00:00:00 2001 From: Paul Gofman Date: Sun, 31 May 2020 18:26:21 +0300 Subject: [PATCH] ntoskrnl.exe: Zero copied size in MmCopyVirtualMemory() stub. Signed-off-by: Paul Gofman Signed-off-by: Alexandre Julliard --- dlls/ntoskrnl.exe/ntoskrnl.c | 11 +++++++---- include/ddk/wdm.h | 1 + 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c index cd2143dbf99..8046b14f375 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/ntoskrnl.c @@ -3985,11 +3985,14 @@ PVOID WINAPI PsGetProcessWow64Process(PEPROCESS process) /********************************************************************* * MmCopyVirtualMemory (NTOSKRNL.@) */ -NTSTATUS WINAPI MmCopyVirtualMemory(PEPROCESS fromprocess, PVOID fromaddress, PEPROCESS toprocess, - PVOID toaddress, SIZE_T bufsize, KPROCESSOR_MODE mode, - PSIZE_T copied) +NTSTATUS WINAPI MmCopyVirtualMemory(PEPROCESS fromprocess, void *fromaddress, PEPROCESS toprocess, + void *toaddress, SIZE_T bufsize, KPROCESSOR_MODE mode, + SIZE_T *copied) { - FIXME("stub: %p %p %p %p %lu %d %p\n", fromprocess, fromaddress, toprocess, toaddress, bufsize, mode, copied); + FIXME("fromprocess %p, fromaddress %p, toprocess %p, toaddress %p, bufsize %lu, mode %d, copied %p stub.\n", + fromprocess, fromaddress, toprocess, toaddress, bufsize, mode, copied); + + *copied = 0; return STATUS_NOT_IMPLEMENTED; } diff --git a/include/ddk/wdm.h b/include/ddk/wdm.h index 57e4cf4fe53..df30051b405 100644 --- a/include/ddk/wdm.h +++ b/include/ddk/wdm.h @@ -1735,6 +1735,7 @@ PVOID WINAPI MmAllocateContiguousMemory(SIZE_T,PHYSICAL_ADDRESS); PVOID WINAPI MmAllocateNonCachedMemory(SIZE_T); PMDL WINAPI MmAllocatePagesForMdl(PHYSICAL_ADDRESS,PHYSICAL_ADDRESS,PHYSICAL_ADDRESS,SIZE_T); void WINAPI MmBuildMdlForNonPagedPool(MDL*); +NTSTATUS WINAPI MmCopyVirtualMemory(PEPROCESS,void*,PEPROCESS,void*,SIZE_T,KPROCESSOR_MODE,SIZE_T*); void WINAPI MmFreeNonCachedMemory(PVOID,SIZE_T); void * WINAPI MmGetSystemRoutineAddress(UNICODE_STRING*); PVOID WINAPI MmMapLockedPagesSpecifyCache(PMDLX,KPROCESSOR_MODE,MEMORY_CACHING_TYPE,PVOID,ULONG,MM_PAGE_PRIORITY);