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

kernel32: Move virtual memory functions to kernelbase.

parent 0b5c0bc7
...@@ -519,7 +519,7 @@ ...@@ -519,7 +519,7 @@
@ stdcall -import FlushFileBuffers(long) @ stdcall -import FlushFileBuffers(long)
@ stdcall -import FlushInstructionCache(long long long) @ stdcall -import FlushInstructionCache(long long long)
@ stdcall FlushProcessWriteBuffers() @ stdcall FlushProcessWriteBuffers()
@ stdcall FlushViewOfFile(ptr long) @ stdcall -import FlushViewOfFile(ptr long)
@ stdcall FoldStringA(long str long ptr long) @ stdcall FoldStringA(long str long ptr long)
@ stdcall FoldStringW(long wstr long ptr long) @ stdcall FoldStringW(long wstr long ptr long)
@ stdcall FormatMessageA(long ptr long long ptr long ptr) @ stdcall FormatMessageA(long ptr long long ptr long ptr)
...@@ -889,7 +889,7 @@ ...@@ -889,7 +889,7 @@
@ stdcall GetVolumePathNamesForVolumeNameW(wstr ptr long ptr) @ stdcall GetVolumePathNamesForVolumeNameW(wstr ptr long ptr)
@ stdcall -import GetWindowsDirectoryA(ptr long) @ stdcall -import GetWindowsDirectoryA(ptr long)
@ stdcall -import GetWindowsDirectoryW(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 # @ stub GetXStateFeaturesMask
@ stdcall GlobalAddAtomA(str) @ stdcall GlobalAddAtomA(str)
@ stdcall GlobalAddAtomW(wstr) @ stdcall GlobalAddAtomW(wstr)
...@@ -1078,9 +1078,9 @@ ...@@ -1078,9 +1078,9 @@
@ stdcall -i386 -private MapSLFix(long) krnl386.exe16.MapSLFix @ stdcall -i386 -private MapSLFix(long) krnl386.exe16.MapSLFix
@ stdcall MapUserPhysicalPages(ptr long ptr) @ stdcall MapUserPhysicalPages(ptr long ptr)
# @ stub MapUserPhysicalPagesScatter # @ stub MapUserPhysicalPagesScatter
@ stdcall MapViewOfFile(long long long long long) @ stdcall -import MapViewOfFile(long long long long long)
@ stdcall MapViewOfFileEx(long long long long long ptr) @ stdcall -import MapViewOfFileEx(long long long long long ptr)
# @ stub MapViewOfFileExNuma @ stdcall -import MapViewOfFileExNuma(long long long long long ptr long)
@ stdcall Module32First(long ptr) @ stdcall Module32First(long ptr)
@ stdcall Module32FirstW(long ptr) @ stdcall Module32FirstW(long ptr)
@ stdcall Module32Next(long ptr) @ stdcall Module32Next(long ptr)
...@@ -1198,7 +1198,7 @@ ...@@ -1198,7 +1198,7 @@
@ stdcall -import ReadFile(long ptr long ptr ptr) @ stdcall -import ReadFile(long ptr long ptr ptr)
@ stdcall -import ReadFileEx(long ptr long ptr ptr) @ stdcall -import ReadFileEx(long ptr long ptr ptr)
@ stdcall -import ReadFileScatter(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 # @ stub ReadThreadProfilingData
@ stdcall -private RegCloseKey(long) advapi32.RegCloseKey @ stdcall -private RegCloseKey(long) advapi32.RegCloseKey
@ stdcall -private RegCreateKeyExA(long str long ptr long long ptr ptr ptr) advapi32.RegCreateKeyExA @ stdcall -private RegCreateKeyExA(long str long ptr long long ptr ptr ptr) advapi32.RegCreateKeyExA
...@@ -1280,7 +1280,7 @@ ...@@ -1280,7 +1280,7 @@
@ stdcall RequestDeviceWakeup(long) @ stdcall RequestDeviceWakeup(long)
@ stdcall RequestWakeupLatency(long) @ stdcall RequestWakeupLatency(long)
@ stdcall -import ResetEvent(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 ResolveDelayLoadedAPI(ptr ptr ptr ptr ptr long) ntdll.LdrResolveDelayLoadedAPI
@ stdcall ResolveLocaleName(wstr ptr long) @ stdcall ResolveLocaleName(wstr ptr long)
@ stdcall RestoreLastError(long) ntdll.RtlRestoreLastWin32Error @ stdcall RestoreLastError(long) ntdll.RtlRestoreLastWin32Error
...@@ -1536,7 +1536,7 @@ ...@@ -1536,7 +1536,7 @@
@ stdcall UninitializeCriticalSection(ptr) @ stdcall UninitializeCriticalSection(ptr)
@ stdcall -import UnlockFile(long long long long long) @ stdcall -import UnlockFile(long long long long long)
@ stdcall -import UnlockFileEx(long long long long ptr) @ stdcall -import UnlockFileEx(long long long long ptr)
@ stdcall UnmapViewOfFile(ptr) @ stdcall -import UnmapViewOfFile(ptr)
# @ stub UnregisterApplicationRecoveryCallback # @ stub UnregisterApplicationRecoveryCallback
@ stdcall UnregisterApplicationRestart() @ stdcall UnregisterApplicationRestart()
# @ stub UnregisterConsoleIME # @ stub UnregisterConsoleIME
...@@ -1557,18 +1557,18 @@ ...@@ -1557,18 +1557,18 @@
# @ stub VerifyScripts # @ stub VerifyScripts
@ stdcall VerifyVersionInfoA(long long int64) @ stdcall VerifyVersionInfoA(long long int64)
@ stdcall VerifyVersionInfoW(long long int64) @ stdcall VerifyVersionInfoW(long long int64)
@ stdcall VirtualAlloc(ptr long long long) @ stdcall -import VirtualAlloc(ptr long long long)
@ stdcall VirtualAllocEx(long ptr long long long) @ stdcall -import VirtualAllocEx(long ptr long long long)
@ stdcall VirtualAllocExNuma(long ptr long long long long) @ stdcall -import VirtualAllocExNuma(long ptr long long long long)
@ stub VirtualBufferExceptionHandler @ stub VirtualBufferExceptionHandler
@ stdcall VirtualFree(ptr long long) @ stdcall -import VirtualFree(ptr long long)
@ stdcall VirtualFreeEx(long ptr long long) @ stdcall -import VirtualFreeEx(long ptr long long)
@ stdcall VirtualLock(ptr long) @ stdcall -import VirtualLock(ptr long)
@ stdcall VirtualProtect(ptr long long ptr) @ stdcall -import VirtualProtect(ptr long long ptr)
@ stdcall VirtualProtectEx(long ptr long long ptr) @ stdcall -import VirtualProtectEx(long ptr long long ptr)
@ stdcall VirtualQuery(ptr ptr long) @ stdcall -import VirtualQuery(ptr ptr long)
@ stdcall VirtualQueryEx(long ptr ptr long) @ stdcall -import VirtualQueryEx(long ptr ptr long)
@ stdcall VirtualUnlock(ptr long) @ stdcall -import VirtualUnlock(ptr long)
@ stdcall WTSGetActiveConsoleSessionId() @ stdcall WTSGetActiveConsoleSessionId()
@ stdcall WaitCommEvent(long ptr ptr) @ stdcall WaitCommEvent(long ptr ptr)
@ stdcall WaitForDebugEvent(ptr long) @ stdcall WaitForDebugEvent(ptr long)
...@@ -1627,7 +1627,7 @@ ...@@ -1627,7 +1627,7 @@
@ stdcall WritePrivateProfileStringW(wstr wstr wstr wstr) @ stdcall WritePrivateProfileStringW(wstr wstr wstr wstr)
@ stdcall WritePrivateProfileStructA (str str ptr long str) @ stdcall WritePrivateProfileStructA (str str ptr long str)
@ stdcall WritePrivateProfileStructW(wstr wstr ptr long wstr) @ 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 WriteProfileSectionA(str str)
@ stdcall WriteProfileSectionW(str str) @ stdcall WriteProfileSectionW(str str)
@ stdcall WriteProfileStringA(str str str) @ stdcall WriteProfileStringA(str str str)
......
...@@ -3484,30 +3484,6 @@ BOOL WINAPI GetProcessWorkingSetSize(HANDLE process, SIZE_T *minset, SIZE_T *max ...@@ -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.@) * GetProcessIoCounters (KERNEL32.@)
*/ */
......
...@@ -7,6 +7,7 @@ C_SRCS = \ ...@@ -7,6 +7,7 @@ C_SRCS = \
file.c \ file.c \
loader.c \ loader.c \
main.c \ main.c \
memory.c \
path.c \ path.c \
process.c \ process.c \
registry.c \ registry.c \
......
...@@ -383,7 +383,7 @@ ...@@ -383,7 +383,7 @@
@ stdcall FlushFileBuffers(long) @ stdcall FlushFileBuffers(long)
@ stdcall FlushInstructionCache(long long long) @ stdcall FlushInstructionCache(long long long)
@ stdcall FlushProcessWriteBuffers() kernel32.FlushProcessWriteBuffers @ stdcall FlushProcessWriteBuffers() kernel32.FlushProcessWriteBuffers
@ stdcall FlushViewOfFile(ptr long) kernel32.FlushViewOfFile @ stdcall FlushViewOfFile(ptr long)
@ stdcall FoldStringW(long wstr long ptr long) kernel32.FoldStringW @ stdcall FoldStringW(long wstr long ptr long) kernel32.FoldStringW
# @ stub ForceSyncFgPolicyInternal # @ stub ForceSyncFgPolicyInternal
# @ stub FormatApplicationUserModelId # @ stub FormatApplicationUserModelId
...@@ -762,7 +762,7 @@ ...@@ -762,7 +762,7 @@
@ stdcall GetWindowsAccountDomainSid(ptr ptr ptr) @ stdcall GetWindowsAccountDomainSid(ptr ptr ptr)
@ stdcall GetWindowsDirectoryA(ptr long) @ stdcall GetWindowsDirectoryA(ptr long)
@ stdcall GetWindowsDirectoryW(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 GetWsChanges
# @ stub GetWsChangesEx # @ stub GetWsChangesEx
# @ stub GetXStateFeaturesMask # @ stub GetXStateFeaturesMask
...@@ -950,9 +950,9 @@ ...@@ -950,9 +950,9 @@
@ stdcall MapGenericMask(ptr ptr) @ stdcall MapGenericMask(ptr ptr)
# @ stub MapPredefinedHandleInternal # @ stub MapPredefinedHandleInternal
@ stdcall MapUserPhysicalPages(ptr long ptr) kernel32.MapUserPhysicalPages @ stdcall MapUserPhysicalPages(ptr long ptr) kernel32.MapUserPhysicalPages
@ stdcall MapViewOfFile(long long long long long) kernel32.MapViewOfFile @ stdcall MapViewOfFile(long long long long long)
@ stdcall MapViewOfFileEx(long long long long long ptr) kernel32.MapViewOfFileEx @ stdcall MapViewOfFileEx(long long long long long ptr)
@ stub MapViewOfFileExNuma @ stdcall MapViewOfFileExNuma(long long long long long ptr long)
# @ stub MapViewOfFileFromApp # @ stub MapViewOfFileFromApp
@ stdcall MoveFileExW(wstr wstr long) kernel32.MoveFileExW @ stdcall MoveFileExW(wstr wstr long) kernel32.MoveFileExW
# @ stub MoveFileWithProgressTransactedW # @ stub MoveFileWithProgressTransactedW
...@@ -1250,7 +1250,7 @@ ...@@ -1250,7 +1250,7 @@
@ stdcall ReadFile(long ptr long ptr ptr) @ stdcall ReadFile(long ptr long ptr ptr)
@ stdcall ReadFileEx(long ptr long ptr ptr) @ stdcall ReadFileEx(long ptr long ptr ptr)
@ stdcall ReadFileScatter(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 ReadStateAtomValue
# @ stub ReadStateContainerValue # @ stub ReadStateContainerValue
# @ stub ReclaimVirtualMemory # @ stub ReclaimVirtualMemory
...@@ -1343,7 +1343,7 @@ ...@@ -1343,7 +1343,7 @@
@ stdcall ReplaceFileW(wstr wstr wstr long ptr ptr) kernel32.ReplaceFileW @ stdcall ReplaceFileW(wstr wstr wstr long ptr ptr) kernel32.ReplaceFileW
@ stdcall ResetEvent(long) @ stdcall ResetEvent(long)
# @ stub ResetState # @ stub ResetState
@ stdcall ResetWriteWatch(ptr long) kernel32.ResetWriteWatch @ stdcall ResetWriteWatch(ptr long)
@ stdcall ResolveDelayLoadedAPI(ptr ptr ptr ptr ptr long) kernel32.ResolveDelayLoadedAPI @ stdcall ResolveDelayLoadedAPI(ptr ptr ptr ptr ptr long) kernel32.ResolveDelayLoadedAPI
# @ stub ResolveDelayLoadsFromDll # @ stub ResolveDelayLoadsFromDll
@ stdcall ResolveLocaleName(wstr ptr long) kernel32.ResolveLocaleName @ stdcall ResolveLocaleName(wstr ptr long) kernel32.ResolveLocaleName
...@@ -1615,7 +1615,7 @@ ...@@ -1615,7 +1615,7 @@
@ stdcall UnhandledExceptionFilter(ptr) kernel32.UnhandledExceptionFilter @ stdcall UnhandledExceptionFilter(ptr) kernel32.UnhandledExceptionFilter
@ stdcall UnlockFile(long long long long long) @ stdcall UnlockFile(long long long long long)
@ stdcall UnlockFileEx(long long long long ptr) @ stdcall UnlockFileEx(long long long long ptr)
@ stdcall UnmapViewOfFile(ptr) kernel32.UnmapViewOfFile @ stdcall UnmapViewOfFile(ptr)
# @ stub UnmapViewOfFileEx # @ stub UnmapViewOfFileEx
# @ stub UnregisterBadMemoryNotification # @ stub UnregisterBadMemoryNotification
# @ stub UnregisterGPNotificationInternal # @ stub UnregisterGPNotificationInternal
...@@ -1668,19 +1668,19 @@ ...@@ -1668,19 +1668,19 @@
# @ stub VerifyPackageId # @ stub VerifyPackageId
# @ stub VerifyPackageRelativeApplicationId # @ stub VerifyPackageRelativeApplicationId
# @ stub VerifyScripts # @ stub VerifyScripts
@ stdcall VirtualAlloc(ptr long long long) kernel32.VirtualAlloc @ stdcall VirtualAlloc(ptr long long long)
@ stdcall VirtualAllocEx(long ptr long long long) kernel32.VirtualAllocEx @ stdcall VirtualAllocEx(long ptr long long long)
@ stdcall VirtualAllocExNuma(long ptr long long long long) kernel32.VirtualAllocExNuma @ stdcall VirtualAllocExNuma(long ptr long long long long)
# @ stub VirtualAllocFromApp # @ stub VirtualAllocFromApp
@ stdcall VirtualFree(ptr long long) kernel32.VirtualFree @ stdcall VirtualFree(ptr long long)
@ stdcall VirtualFreeEx(long ptr long long) kernel32.VirtualFreeEx @ stdcall VirtualFreeEx(long ptr long long)
@ stdcall VirtualLock(ptr long) kernel32.VirtualLock @ stdcall VirtualLock(ptr long)
@ stdcall VirtualProtect(ptr long long ptr) kernel32.VirtualProtect @ stdcall VirtualProtect(ptr long long ptr)
@ stdcall VirtualProtectEx(long ptr long long ptr) kernel32.VirtualProtectEx @ stdcall VirtualProtectEx(long ptr long long ptr)
# @ stub VirtualProtectFromApp # @ stub VirtualProtectFromApp
@ stdcall VirtualQuery(ptr ptr long) kernel32.VirtualQuery @ stdcall VirtualQuery(ptr ptr long)
@ stdcall VirtualQueryEx(long ptr ptr long) kernel32.VirtualQueryEx @ stdcall VirtualQueryEx(long ptr ptr long)
@ stdcall VirtualUnlock(ptr long) kernel32.VirtualUnlock @ stdcall VirtualUnlock(ptr long)
# @ stub WTSGetServiceSessionId # @ stub WTSGetServiceSessionId
# @ stub WTSIsServerContainer # @ stub WTSIsServerContainer
@ stdcall WaitCommEvent(long ptr ptr) kernel32.WaitCommEvent @ stdcall WaitCommEvent(long ptr ptr) kernel32.WaitCommEvent
...@@ -1729,7 +1729,7 @@ ...@@ -1729,7 +1729,7 @@
@ stdcall WriteFile(long ptr long ptr ptr) @ stdcall WriteFile(long ptr long ptr ptr)
@ stdcall WriteFileEx(long ptr long ptr ptr) @ stdcall WriteFileEx(long ptr long ptr ptr)
@ stdcall WriteFileGather(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 WriteStateAtomValue
# @ stub WriteStateContainerValue # @ stub WriteStateContainerValue
@ stdcall ZombifyActCtx(ptr) @ 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