Commit 61516e22 authored by Alexandre Julliard's avatar Alexandre Julliard

kernel32: Move virtual memory functions to kernelbase.

parent 0b5c0bc7
......@@ -519,7 +519,7 @@
@ stdcall -import FlushFileBuffers(long)
@ stdcall -import FlushInstructionCache(long long long)
@ stdcall FlushProcessWriteBuffers()
@ stdcall FlushViewOfFile(ptr long)
@ stdcall -import FlushViewOfFile(ptr long)
@ stdcall FoldStringA(long str long ptr long)
@ stdcall FoldStringW(long wstr long ptr long)
@ stdcall FormatMessageA(long ptr long long ptr long ptr)
......@@ -889,7 +889,7 @@
@ stdcall GetVolumePathNamesForVolumeNameW(wstr ptr long ptr)
@ stdcall -import GetWindowsDirectoryA(ptr long)
@ stdcall -import GetWindowsDirectoryW(ptr long)
@ stdcall GetWriteWatch(long ptr long ptr ptr ptr)
@ stdcall -import GetWriteWatch(long ptr long ptr ptr ptr)
# @ stub GetXStateFeaturesMask
@ stdcall GlobalAddAtomA(str)
@ stdcall GlobalAddAtomW(wstr)
......@@ -1078,9 +1078,9 @@
@ stdcall -i386 -private MapSLFix(long) krnl386.exe16.MapSLFix
@ stdcall MapUserPhysicalPages(ptr long ptr)
# @ stub MapUserPhysicalPagesScatter
@ stdcall MapViewOfFile(long long long long long)
@ stdcall MapViewOfFileEx(long long long long long ptr)
# @ stub MapViewOfFileExNuma
@ stdcall -import MapViewOfFile(long long long long long)
@ stdcall -import MapViewOfFileEx(long long long long long ptr)
@ stdcall -import MapViewOfFileExNuma(long long long long long ptr long)
@ stdcall Module32First(long ptr)
@ stdcall Module32FirstW(long ptr)
@ stdcall Module32Next(long ptr)
......@@ -1198,7 +1198,7 @@
@ stdcall -import ReadFile(long ptr long ptr ptr)
@ stdcall -import ReadFileEx(long ptr long ptr ptr)
@ stdcall -import ReadFileScatter(long ptr long ptr ptr)
@ stdcall ReadProcessMemory(long ptr ptr long ptr)
@ stdcall -import ReadProcessMemory(long ptr ptr long ptr)
# @ stub ReadThreadProfilingData
@ stdcall -private RegCloseKey(long) advapi32.RegCloseKey
@ stdcall -private RegCreateKeyExA(long str long ptr long long ptr ptr ptr) advapi32.RegCreateKeyExA
......@@ -1280,7 +1280,7 @@
@ stdcall RequestDeviceWakeup(long)
@ stdcall RequestWakeupLatency(long)
@ stdcall -import ResetEvent(long)
@ stdcall ResetWriteWatch(ptr long)
@ stdcall -import ResetWriteWatch(ptr long)
@ stdcall ResolveDelayLoadedAPI(ptr ptr ptr ptr ptr long) ntdll.LdrResolveDelayLoadedAPI
@ stdcall ResolveLocaleName(wstr ptr long)
@ stdcall RestoreLastError(long) ntdll.RtlRestoreLastWin32Error
......@@ -1536,7 +1536,7 @@
@ stdcall UninitializeCriticalSection(ptr)
@ stdcall -import UnlockFile(long long long long long)
@ stdcall -import UnlockFileEx(long long long long ptr)
@ stdcall UnmapViewOfFile(ptr)
@ stdcall -import UnmapViewOfFile(ptr)
# @ stub UnregisterApplicationRecoveryCallback
@ stdcall UnregisterApplicationRestart()
# @ stub UnregisterConsoleIME
......@@ -1557,18 +1557,18 @@
# @ stub VerifyScripts
@ stdcall VerifyVersionInfoA(long long int64)
@ stdcall VerifyVersionInfoW(long long int64)
@ stdcall VirtualAlloc(ptr long long long)
@ stdcall VirtualAllocEx(long ptr long long long)
@ stdcall VirtualAllocExNuma(long ptr long long long long)
@ stdcall -import VirtualAlloc(ptr long long long)
@ stdcall -import VirtualAllocEx(long ptr long long long)
@ stdcall -import VirtualAllocExNuma(long ptr long long long long)
@ stub VirtualBufferExceptionHandler
@ stdcall VirtualFree(ptr long long)
@ stdcall VirtualFreeEx(long ptr long long)
@ stdcall VirtualLock(ptr long)
@ stdcall VirtualProtect(ptr long long ptr)
@ stdcall VirtualProtectEx(long ptr long long ptr)
@ stdcall VirtualQuery(ptr ptr long)
@ stdcall VirtualQueryEx(long ptr ptr long)
@ stdcall VirtualUnlock(ptr long)
@ stdcall -import VirtualFree(ptr long long)
@ stdcall -import VirtualFreeEx(long ptr long long)
@ stdcall -import VirtualLock(ptr long)
@ stdcall -import VirtualProtect(ptr long long ptr)
@ stdcall -import VirtualProtectEx(long ptr long long ptr)
@ stdcall -import VirtualQuery(ptr ptr long)
@ stdcall -import VirtualQueryEx(long ptr ptr long)
@ stdcall -import VirtualUnlock(ptr long)
@ stdcall WTSGetActiveConsoleSessionId()
@ stdcall WaitCommEvent(long ptr ptr)
@ stdcall WaitForDebugEvent(ptr long)
......@@ -1627,7 +1627,7 @@
@ stdcall WritePrivateProfileStringW(wstr wstr wstr wstr)
@ stdcall WritePrivateProfileStructA (str str ptr long str)
@ stdcall WritePrivateProfileStructW(wstr wstr ptr long wstr)
@ stdcall WriteProcessMemory(long ptr ptr long ptr)
@ stdcall -import WriteProcessMemory(long ptr ptr long ptr)
@ stdcall WriteProfileSectionA(str str)
@ stdcall WriteProfileSectionW(str str)
@ stdcall WriteProfileStringA(str str str)
......
......@@ -3484,30 +3484,6 @@ BOOL WINAPI GetProcessWorkingSetSize(HANDLE process, SIZE_T *minset, SIZE_T *max
}
/***********************************************************************
* ReadProcessMemory (KERNEL32.@)
*/
BOOL WINAPI ReadProcessMemory( HANDLE process, LPCVOID addr, LPVOID buffer, SIZE_T size,
SIZE_T *bytes_read )
{
NTSTATUS status = NtReadVirtualMemory( process, addr, buffer, size, bytes_read );
if (status) SetLastError( RtlNtStatusToDosError(status) );
return !status;
}
/***********************************************************************
* WriteProcessMemory (KERNEL32.@)
*/
BOOL WINAPI WriteProcessMemory( HANDLE process, LPVOID addr, LPCVOID buffer, SIZE_T size,
SIZE_T *bytes_written )
{
NTSTATUS status = NtWriteVirtualMemory( process, addr, buffer, size, bytes_written );
if (status) SetLastError( RtlNtStatusToDosError(status) );
return !status;
}
/******************************************************************
* GetProcessIoCounters (KERNEL32.@)
*/
......
......@@ -7,6 +7,7 @@ C_SRCS = \
file.c \
loader.c \
main.c \
memory.c \
path.c \
process.c \
registry.c \
......
......@@ -383,7 +383,7 @@
@ stdcall FlushFileBuffers(long)
@ stdcall FlushInstructionCache(long long long)
@ stdcall FlushProcessWriteBuffers() kernel32.FlushProcessWriteBuffers
@ stdcall FlushViewOfFile(ptr long) kernel32.FlushViewOfFile
@ stdcall FlushViewOfFile(ptr long)
@ stdcall FoldStringW(long wstr long ptr long) kernel32.FoldStringW
# @ stub ForceSyncFgPolicyInternal
# @ stub FormatApplicationUserModelId
......@@ -762,7 +762,7 @@
@ stdcall GetWindowsAccountDomainSid(ptr ptr ptr)
@ stdcall GetWindowsDirectoryA(ptr long)
@ stdcall GetWindowsDirectoryW(ptr long)
@ stdcall GetWriteWatch(long ptr long ptr ptr ptr) kernel32.GetWriteWatch
@ stdcall GetWriteWatch(long ptr long ptr ptr ptr)
# @ stub GetWsChanges
# @ stub GetWsChangesEx
# @ stub GetXStateFeaturesMask
......@@ -950,9 +950,9 @@
@ stdcall MapGenericMask(ptr ptr)
# @ stub MapPredefinedHandleInternal
@ stdcall MapUserPhysicalPages(ptr long ptr) kernel32.MapUserPhysicalPages
@ stdcall MapViewOfFile(long long long long long) kernel32.MapViewOfFile
@ stdcall MapViewOfFileEx(long long long long long ptr) kernel32.MapViewOfFileEx
@ stub MapViewOfFileExNuma
@ stdcall MapViewOfFile(long long long long long)
@ stdcall MapViewOfFileEx(long long long long long ptr)
@ stdcall MapViewOfFileExNuma(long long long long long ptr long)
# @ stub MapViewOfFileFromApp
@ stdcall MoveFileExW(wstr wstr long) kernel32.MoveFileExW
# @ stub MoveFileWithProgressTransactedW
......@@ -1250,7 +1250,7 @@
@ stdcall ReadFile(long ptr long ptr ptr)
@ stdcall ReadFileEx(long ptr long ptr ptr)
@ stdcall ReadFileScatter(long ptr long ptr ptr)
@ stdcall ReadProcessMemory(long ptr ptr long ptr) kernel32.ReadProcessMemory
@ stdcall ReadProcessMemory(long ptr ptr long ptr)
# @ stub ReadStateAtomValue
# @ stub ReadStateContainerValue
# @ stub ReclaimVirtualMemory
......@@ -1343,7 +1343,7 @@
@ stdcall ReplaceFileW(wstr wstr wstr long ptr ptr) kernel32.ReplaceFileW
@ stdcall ResetEvent(long)
# @ stub ResetState
@ stdcall ResetWriteWatch(ptr long) kernel32.ResetWriteWatch
@ stdcall ResetWriteWatch(ptr long)
@ stdcall ResolveDelayLoadedAPI(ptr ptr ptr ptr ptr long) kernel32.ResolveDelayLoadedAPI
# @ stub ResolveDelayLoadsFromDll
@ stdcall ResolveLocaleName(wstr ptr long) kernel32.ResolveLocaleName
......@@ -1615,7 +1615,7 @@
@ stdcall UnhandledExceptionFilter(ptr) kernel32.UnhandledExceptionFilter
@ stdcall UnlockFile(long long long long long)
@ stdcall UnlockFileEx(long long long long ptr)
@ stdcall UnmapViewOfFile(ptr) kernel32.UnmapViewOfFile
@ stdcall UnmapViewOfFile(ptr)
# @ stub UnmapViewOfFileEx
# @ stub UnregisterBadMemoryNotification
# @ stub UnregisterGPNotificationInternal
......@@ -1668,19 +1668,19 @@
# @ stub VerifyPackageId
# @ stub VerifyPackageRelativeApplicationId
# @ stub VerifyScripts
@ stdcall VirtualAlloc(ptr long long long) kernel32.VirtualAlloc
@ stdcall VirtualAllocEx(long ptr long long long) kernel32.VirtualAllocEx
@ stdcall VirtualAllocExNuma(long ptr long long long long) kernel32.VirtualAllocExNuma
@ stdcall VirtualAlloc(ptr long long long)
@ stdcall VirtualAllocEx(long ptr long long long)
@ stdcall VirtualAllocExNuma(long ptr long long long long)
# @ stub VirtualAllocFromApp
@ stdcall VirtualFree(ptr long long) kernel32.VirtualFree
@ stdcall VirtualFreeEx(long ptr long long) kernel32.VirtualFreeEx
@ stdcall VirtualLock(ptr long) kernel32.VirtualLock
@ stdcall VirtualProtect(ptr long long ptr) kernel32.VirtualProtect
@ stdcall VirtualProtectEx(long ptr long long ptr) kernel32.VirtualProtectEx
@ stdcall VirtualFree(ptr long long)
@ stdcall VirtualFreeEx(long ptr long long)
@ stdcall VirtualLock(ptr long)
@ stdcall VirtualProtect(ptr long long ptr)
@ stdcall VirtualProtectEx(long ptr long long ptr)
# @ stub VirtualProtectFromApp
@ stdcall VirtualQuery(ptr ptr long) kernel32.VirtualQuery
@ stdcall VirtualQueryEx(long ptr ptr long) kernel32.VirtualQueryEx
@ stdcall VirtualUnlock(ptr long) kernel32.VirtualUnlock
@ stdcall VirtualQuery(ptr ptr long)
@ stdcall VirtualQueryEx(long ptr ptr long)
@ stdcall VirtualUnlock(ptr long)
# @ stub WTSGetServiceSessionId
# @ stub WTSIsServerContainer
@ stdcall WaitCommEvent(long ptr ptr) kernel32.WaitCommEvent
......@@ -1729,7 +1729,7 @@
@ stdcall WriteFile(long ptr long ptr ptr)
@ stdcall WriteFileEx(long ptr long ptr ptr)
@ stdcall WriteFileGather(long ptr long ptr ptr)
@ stdcall WriteProcessMemory(long ptr ptr long ptr) kernel32.WriteProcessMemory
@ stdcall WriteProcessMemory(long ptr ptr long ptr)
# @ stub WriteStateAtomValue
# @ stub WriteStateContainerValue
@ stdcall ZombifyActCtx(ptr)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment