Signed-off-by: Paul Gofman pgofman@codeweavers.com --- .../api-ms-win-core-memory-l1-1-1.spec | 2 +- .../api-ms-win-core-memory-l1-1-2.spec | 2 +- dlls/kernel32/kernel32.spec | 1 + dlls/kernelbase/kernelbase.spec | 2 +- dlls/kernelbase/memory.c | 6 ++++++ include/winnt.h | 6 ++++++ 6 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/dlls/api-ms-win-core-memory-l1-1-1/api-ms-win-core-memory-l1-1-1.spec b/dlls/api-ms-win-core-memory-l1-1-1/api-ms-win-core-memory-l1-1-1.spec index 3d5dea93aa5..9c1edb2e761 100644 --- a/dlls/api-ms-win-core-memory-l1-1-1/api-ms-win-core-memory-l1-1-1.spec +++ b/dlls/api-ms-win-core-memory-l1-1-1/api-ms-win-core-memory-l1-1-1.spec @@ -11,7 +11,7 @@ @ stdcall MapViewOfFileEx(long long long long long ptr) kernel32.MapViewOfFileEx @ stub MapViewOfFileFromApp @ stdcall OpenFileMappingW(long long wstr) kernel32.OpenFileMappingW -@ stub PrefetchVirtualMemory +@ stdcall PrefetchVirtualMemory(ptr ptr ptr long) kernel32.PrefetchVirtualMemory @ stdcall QueryMemoryResourceNotification(ptr ptr) kernel32.QueryMemoryResourceNotification @ stdcall ReadProcessMemory(long ptr ptr long ptr) kernel32.ReadProcessMemory @ stdcall ResetWriteWatch(ptr long) kernel32.ResetWriteWatch diff --git a/dlls/api-ms-win-core-memory-l1-1-2/api-ms-win-core-memory-l1-1-2.spec b/dlls/api-ms-win-core-memory-l1-1-2/api-ms-win-core-memory-l1-1-2.spec index cb305f228ab..735c6ee8b54 100644 --- a/dlls/api-ms-win-core-memory-l1-1-2/api-ms-win-core-memory-l1-1-2.spec +++ b/dlls/api-ms-win-core-memory-l1-1-2/api-ms-win-core-memory-l1-1-2.spec @@ -16,7 +16,7 @@ @ stdcall MapViewOfFileEx(long long long long long ptr) kernel32.MapViewOfFileEx @ stub MapViewOfFileFromApp @ stdcall OpenFileMappingW(long long wstr) kernel32.OpenFileMappingW -@ stub PrefetchVirtualMemory +@ stdcall PrefetchVirtualMemory(ptr ptr ptr long) kernel32.PrefetchVirtualMemory @ stdcall QueryMemoryResourceNotification(ptr ptr) kernel32.QueryMemoryResourceNotification @ stdcall ReadProcessMemory(long ptr ptr long ptr) kernel32.ReadProcessMemory @ stub RegisterBadMemoryNotification diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec index 9667f82a5da..fbaf9443934 100644 --- a/dlls/kernel32/kernel32.spec +++ b/dlls/kernel32/kernel32.spec @@ -1157,6 +1157,7 @@ @ stdcall PowerClearRequest(long long) @ stdcall PowerCreateRequest(ptr) @ stdcall PowerSetRequest(long long) +@ stdcall -import PrefetchVirtualMemory(ptr ptr ptr long) @ stdcall PrepareTape(ptr long long) @ stub PrivCopyFileExW @ stub PrivMoveFileIdentityW diff --git a/dlls/kernelbase/kernelbase.spec b/dlls/kernelbase/kernelbase.spec index 55208889c35..be40e425783 100644 --- a/dlls/kernelbase/kernelbase.spec +++ b/dlls/kernelbase/kernelbase.spec @@ -1164,7 +1164,7 @@ @ stdcall PerfStopProvider(long) # @ stub PoolPerAppKeyStateInternal @ stdcall PostQueuedCompletionStatus(long long ptr ptr) -# @ stub PrefetchVirtualMemory +@ stdcall PrefetchVirtualMemory(ptr ptr ptr long) @ stub PrivCopyFileExW @ stdcall PrivilegeCheck(ptr ptr ptr) @ stdcall PrivilegedServiceAuditAlarmW(wstr wstr long ptr long) diff --git a/dlls/kernelbase/memory.c b/dlls/kernelbase/memory.c index 847005e8abe..5b0778ff2b3 100644 --- a/dlls/kernelbase/memory.c +++ b/dlls/kernelbase/memory.c @@ -342,6 +342,12 @@ LPVOID WINAPI DECLSPEC_HOTPATCH VirtualAllocFromApp( void *addr, SIZE_T size, return ret; }
+BOOL WINAPI PrefetchVirtualMemory( HANDLE process, ULONG_PTR count, WIN32_MEMORY_RANGE_ENTRY *addresses, ULONG flags ) +{ + FIXME( "process %p, count %p, addresses %p, flags %#x stub.\n", process, (void *)count, addresses, flags ); + + return TRUE; +}
/*********************************************************************** * VirtualFree (kernelbase.@) diff --git a/include/winnt.h b/include/winnt.h index d418355a888..3cc7aaf599f 100644 --- a/include/winnt.h +++ b/include/winnt.h @@ -776,6 +776,12 @@ typedef struct DECLSPEC_ALIGN(8) MEM_EXTENDED_PARAMETER { } DUMMYUNIONNAME; } MEM_EXTENDED_PARAMETER, *PMEM_EXTENDED_PARAMETER;
+typedef struct _WIN32_MEMORY_RANGE_ENTRY +{ + PVOID VirtualAddress; + SIZE_T NumberOfBytes; +} WIN32_MEMORY_RANGE_ENTRY, *PWIN32_MEMORY_RANGE_ENTRY; + #define PAGE_NOACCESS 0x01 #define PAGE_READONLY 0x02 #define PAGE_READWRITE 0x04