Hello. I'm sorry, GlobalReAlloc16 got changed instead of GlobalReAlloc. Please use this patch instead of the previous one. Changelog: Correct SIZE_T size according to MS SDK. Change some types to SIZE_T according to MS SDK definitions. diff -u cvs/hq/wine/controls/edit.c wine/controls/edit.c --- cvs/hq/wine/controls/edit.c Tue Sep 17 14:03:19 2002 +++ wine/controls/edit.c Fri Sep 20 22:35:12 2002 @@ -2616,7 +2616,7 @@ hLocal = es->hloc32A; } - TRACE("Returning %04X, LocalSize() = %d\n", hLocal, LocalSize(hLocal)); + TRACE("Returning %04X, LocalSize() = %ld\n", hLocal, LocalSize(hLocal)); return hLocal; } diff -u cvs/hq/wine/dlls/winedos/dosvm.c wine/dlls/winedos/dosvm.c --- cvs/hq/wine/dlls/winedos/dosvm.c Thu Sep 5 14:53:52 2002 +++ wine/dlls/winedos/dosvm.c Fri Sep 20 22:41:32 2002 @@ -415,7 +415,7 @@ /* (sort of like APC, but we signal the completion) */ { DOS_SPC *spc = (DOS_SPC *)msg.lParam; - TRACE_(int)("calling %p with arg %08x\n", spc->proc, spc->arg); + TRACE_(int)("calling %p with arg %08lx\n", spc->proc, spc->arg); (spc->proc)(spc->arg); TRACE_(int)("done, signalling event %d\n", msg.wParam); SetEvent(msg.wParam); diff -u cvs/hq/wine/include/basetsd.h wine/include/basetsd.h --- cvs/hq/wine/include/basetsd.h Sat Sep 14 21:33:37 2002 +++ wine/include/basetsd.h Fri Sep 20 22:27:16 2002 @@ -86,10 +86,10 @@ #else /* FIXME: defined(_WIN32) */ typedef signed __int32 INT_PTR, *PINT_PTR; -typedef signed __int32 LONG_PTR, *PLONG_PTR; +typedef long LONG_PTR, *PLONG_PTR; typedef unsigned __int32 UINT_PTR, *PUINT_PTR; -typedef unsigned __int32 ULONG_PTR, *PULONG_PTR; -typedef unsigned __int32 DWORD_PTR, *PDWORD_PTR; +typedef unsigned long ULONG_PTR, *PULONG_PTR; +typedef ULONG_PTR DWORD_PTR, *PDWORD_PTR; #define MAXINT_PTR 0x7fffffff #define MININT_PTR 0x80000000 @@ -104,8 +104,8 @@ #endif /* defined(_WIN64) || defined(_WIN32) */ -typedef INT_PTR SSIZE_T, *PSSIZE_T; -typedef UINT_PTR SIZE_T, *PSIZE_T; +typedef LONG_PTR SSIZE_T, *PSSIZE_T; +typedef ULONG_PTR SIZE_T, *PSIZE_T; /* Some Wine-specific definitions */ diff -u cvs/hq/wine/include/winbase.h wine/include/winbase.h --- cvs/hq/wine/include/winbase.h Fri Sep 20 14:30:13 2002 +++ wine/include/winbase.h Fri Sep 20 22:02:55 2002 @@ -446,12 +446,12 @@ { DWORD dwLength; DWORD dwMemoryLoad; - DWORD dwTotalPhys; - DWORD dwAvailPhys; - DWORD dwTotalPageFile; - DWORD dwAvailPageFile; - DWORD dwTotalVirtual; - DWORD dwAvailVirtual; + SIZE_T dwTotalPhys; + SIZE_T dwAvailPhys; + SIZE_T dwTotalPageFile; + SIZE_T dwAvailPageFile; + SIZE_T dwTotalVirtual; + SIZE_T dwAvailVirtual; } MEMORYSTATUS, *LPMEMORYSTATUS; @@ -1094,10 +1094,6 @@ /*int WinMain(HINSTANCE, HINSTANCE prev, char *cmd, int show);*/ -LPVOID WINAPI HeapAlloc(HANDLE,DWORD,DWORD); -BOOL WINAPI HeapFree(HANDLE,DWORD,LPVOID); -LPVOID WINAPI HeapReAlloc(HANDLE,DWORD,LPVOID,DWORD); -DWORD WINAPI HeapSize(HANDLE,DWORD,LPVOID); void WINAPI InitializeCriticalSection(CRITICAL_SECTION *lpCrit); BOOL WINAPI InitializeCriticalSectionAndSpinCount(CRITICAL_SECTION *,DWORD); void WINAPI DeleteCriticalSection(CRITICAL_SECTION *lpCrit); @@ -1105,10 +1101,10 @@ BOOL WINAPI TryEnterCriticalSection(CRITICAL_SECTION *lpCrit); void WINAPI LeaveCriticalSection(CRITICAL_SECTION *lpCrit); void WINAPI MakeCriticalSectionGlobal(CRITICAL_SECTION *lpCrit); -BOOL WINAPI GetProcessWorkingSetSize(HANDLE,LPDWORD,LPDWORD); +BOOL WINAPI GetProcessWorkingSetSize(HANDLE,PSIZE_T,PSIZE_T); DWORD WINAPI QueueUserAPC(PAPCFUNC,HANDLE,ULONG_PTR); void WINAPI RaiseException(DWORD,DWORD,DWORD,const LPDWORD); -BOOL WINAPI SetProcessWorkingSetSize(HANDLE,DWORD,DWORD); +BOOL WINAPI SetProcessWorkingSetSize(HANDLE,SIZE_T,SIZE_T); BOOL WINAPI TerminateProcess(HANDLE,DWORD); BOOL WINAPI TerminateThread(HANDLE,DWORD); BOOL WINAPI GetExitCodeThread(HANDLE,LPDWORD); @@ -1200,12 +1196,12 @@ LPSECURITY_ATTRIBUTES,BOOL,DWORD,LPVOID,LPCWSTR, LPSTARTUPINFOW,LPPROCESS_INFORMATION); #define CreateProcess WINELIB_NAME_AW(CreateProcess) -HANDLE WINAPI CreateRemoteThread(HANDLE,LPSECURITY_ATTRIBUTES,DWORD,LPTHREAD_START_ROUTINE,LPVOID,DWORD,LPDWORD); +HANDLE WINAPI CreateRemoteThread(HANDLE,LPSECURITY_ATTRIBUTES,SIZE_T,LPTHREAD_START_ROUTINE,LPVOID,DWORD,LPDWORD); HANDLE WINAPI CreateSemaphoreA(LPSECURITY_ATTRIBUTES,LONG,LONG,LPCSTR); HANDLE WINAPI CreateSemaphoreW(LPSECURITY_ATTRIBUTES,LONG,LONG,LPCWSTR); #define CreateSemaphore WINELIB_NAME_AW(CreateSemaphore) DWORD WINAPI CreateTapePartition(HANDLE,DWORD,DWORD,DWORD); -HANDLE WINAPI CreateThread(LPSECURITY_ATTRIBUTES,DWORD,LPTHREAD_START_ROUTINE,LPVOID,DWORD,LPDWORD); +HANDLE WINAPI CreateThread(LPSECURITY_ATTRIBUTES,SIZE_T,LPTHREAD_START_ROUTINE,LPVOID,DWORD,LPDWORD); HANDLE WINAPI CreateWaitableTimerA(LPSECURITY_ATTRIBUTES,BOOL,LPCSTR); HANDLE WINAPI CreateWaitableTimerW(LPSECURITY_ATTRIBUTES,BOOL,LPCWSTR); #define CreateWaitableTimer WINELIB_NAME_AW(CreateWaitableTimer) @@ -1254,7 +1250,7 @@ HRSRC WINAPI FindResourceExW(HMODULE,LPCWSTR,LPCWSTR,WORD); #define FindResourceEx WINELIB_NAME_AW(FindResourceEx) BOOL WINAPI FlushFileBuffers(HANDLE); -BOOL WINAPI FlushViewOfFile(LPCVOID, DWORD); +BOOL WINAPI FlushViewOfFile(LPCVOID,SIZE_T); DWORD WINAPI FormatMessageA(DWORD,LPCVOID,DWORD,DWORD,LPSTR,DWORD,va_list*); DWORD WINAPI FormatMessageW(DWORD,LPCVOID,DWORD,DWORD,LPWSTR,DWORD,va_list*); #define FormatMessage WINELIB_NAME_AW(FormatMessage) @@ -1348,12 +1344,16 @@ BOOL WINAPI GetUserNameW(LPWSTR,LPDWORD); #define GetUserName WINELIB_NAME_AW(GetUserName) VOID WINAPI GlobalMemoryStatus(LPMEMORYSTATUS); -DWORD WINAPI HeapCompact(HANDLE,DWORD); -HANDLE WINAPI HeapCreate(DWORD,DWORD,DWORD); -BOOL WINAPI HeapDestroy(HANDLE); -BOOL WINAPI HeapLock(HANDLE); -BOOL WINAPI HeapUnlock(HANDLE); -BOOL WINAPI HeapValidate(HANDLE,DWORD,LPCVOID); +LPVOID WINAPI HeapAlloc(HANDLE,DWORD,SIZE_T); +SIZE_T WINAPI HeapCompact(HANDLE,DWORD); +HANDLE WINAPI HeapCreate(DWORD,SIZE_T,SIZE_T); +BOOL WINAPI HeapDestroy(HANDLE); +BOOL WINAPI HeapFree(HANDLE,DWORD,LPVOID); +BOOL WINAPI HeapLock(HANDLE); +LPVOID WINAPI HeapReAlloc(HANDLE,DWORD,LPVOID,SIZE_T); +SIZE_T WINAPI HeapSize(HANDLE,DWORD,LPVOID); +BOOL WINAPI HeapUnlock(HANDLE); +BOOL WINAPI HeapValidate(HANDLE,DWORD,LPCVOID); BOOL WINAPI HeapWalk(HANDLE,LPPROCESS_HEAP_ENTRY); DWORD WINAPI InitializeAcl(PACL,DWORD,DWORD); BOOL WINAPI InitializeSecurityDescriptor(PSECURITY_DESCRIPTOR,DWORD); @@ -1376,8 +1376,8 @@ BOOL WINAPI MakeSelfRelativeSD(PSECURITY_DESCRIPTOR,PSECURITY_DESCRIPTOR,LPDWORD); HMODULE WINAPI MapHModuleSL(WORD); WORD WINAPI MapHModuleLS(HMODULE); -LPVOID WINAPI MapViewOfFile(HANDLE,DWORD,DWORD,DWORD,DWORD); -LPVOID WINAPI MapViewOfFileEx(HANDLE,DWORD,DWORD,DWORD,DWORD,LPVOID); +LPVOID WINAPI MapViewOfFile(HANDLE,DWORD,DWORD,DWORD,SIZE_T); +LPVOID WINAPI MapViewOfFileEx(HANDLE,DWORD,DWORD,DWORD,SIZE_T,LPVOID); BOOL WINAPI MoveFileA(LPCSTR,LPCSTR); BOOL WINAPI MoveFileW(LPCWSTR,LPCWSTR); #define MoveFile WINELIB_NAME_AW(MoveFile) @@ -1498,16 +1498,16 @@ BOOL WINAPI VerifyVersionInfoA(LPOSVERSIONINFOEXA,DWORD,DWORDLONG); BOOL WINAPI VerifyVersionInfoW(LPOSVERSIONINFOEXW,DWORD,DWORDLONG); #define VerifyVersionInfo WINELIB_NAME_AW(VerifyVersionInfo) -LPVOID WINAPI VirtualAlloc(LPVOID,DWORD,DWORD,DWORD); -LPVOID WINAPI VirtualAllocEx(HANDLE,LPVOID,DWORD,DWORD,DWORD); -BOOL WINAPI VirtualFree(LPVOID,DWORD,DWORD); -BOOL WINAPI VirtualFreeEx(HANDLE,LPVOID,DWORD,DWORD); -BOOL WINAPI VirtualLock(LPVOID,DWORD); -BOOL WINAPI VirtualProtect(LPVOID,DWORD,DWORD,LPDWORD); -BOOL WINAPI VirtualProtectEx(HANDLE,LPVOID,DWORD,DWORD,LPDWORD); -DWORD WINAPI VirtualQuery(LPCVOID,LPMEMORY_BASIC_INFORMATION,DWORD); -DWORD WINAPI VirtualQueryEx(HANDLE,LPCVOID,LPMEMORY_BASIC_INFORMATION,DWORD); -BOOL WINAPI VirtualUnlock(LPVOID,DWORD); +LPVOID WINAPI VirtualAlloc(LPVOID,SIZE_T,DWORD,DWORD); +LPVOID WINAPI VirtualAllocEx(HANDLE,LPVOID,SIZE_T,DWORD,DWORD); +BOOL WINAPI VirtualFree(LPVOID,SIZE_T,DWORD); +BOOL WINAPI VirtualFreeEx(HANDLE,LPVOID,SIZE_T,DWORD); +BOOL WINAPI VirtualLock(LPVOID,SIZE_T); +BOOL WINAPI VirtualProtect(LPVOID,SIZE_T,DWORD,LPDWORD); +BOOL WINAPI VirtualProtectEx(HANDLE,LPVOID,SIZE_T,DWORD,LPDWORD); +SIZE_T WINAPI VirtualQuery(LPCVOID,LPMEMORY_BASIC_INFORMATION,SIZE_T); +SIZE_T WINAPI VirtualQueryEx(HANDLE,LPCVOID,LPMEMORY_BASIC_INFORMATION,SIZE_T); +BOOL WINAPI VirtualUnlock(LPVOID,SIZE_T); BOOL WINAPI WaitCommEvent(HANDLE,LPDWORD,LPOVERLAPPED); BOOL WINAPI WaitForDebugEvent(LPDEBUG_EVENT,DWORD); DWORD WINAPI WaitForMultipleObjects(DWORD,const HANDLE*,BOOL,DWORD); @@ -1554,7 +1554,7 @@ HRSRC WINAPI FindResourceA(HMODULE,LPCSTR,LPCSTR); HRSRC WINAPI FindResourceW(HMODULE,LPCWSTR,LPCWSTR); #define FindResource WINELIB_NAME_AW(FindResource) -BOOL WINAPI FlushInstructionCache(HANDLE,LPCVOID,DWORD); +BOOL WINAPI FlushInstructionCache(HANDLE,LPCVOID,SIZE_T); BOOL WINAPI FreeLibrary(HMODULE); #define FreeModule(handle) FreeLibrary(handle) #define FreeProcInstance(proc) /*nothing*/ @@ -1638,8 +1638,8 @@ ATOM WINAPI GlobalAddAtomA(LPCSTR); ATOM WINAPI GlobalAddAtomW(LPCWSTR); #define GlobalAddAtom WINELIB_NAME_AW(GlobalAddAtom) -HGLOBAL WINAPI GlobalAlloc(UINT,DWORD); -DWORD WINAPI GlobalCompact(DWORD); +HGLOBAL WINAPI GlobalAlloc(UINT,SIZE_T); +SIZE_T WINAPI GlobalCompact(DWORD); ATOM WINAPI GlobalDeleteAtom(ATOM); ATOM WINAPI GlobalFindAtomA(LPCSTR); ATOM WINAPI GlobalFindAtomW(LPCWSTR); @@ -1652,8 +1652,8 @@ HGLOBAL WINAPI GlobalHandle(LPCVOID); VOID WINAPI GlobalFix(HGLOBAL); LPVOID WINAPI GlobalLock(HGLOBAL); -HGLOBAL WINAPI GlobalReAlloc(HGLOBAL,DWORD,UINT); -DWORD WINAPI GlobalSize(HGLOBAL); +HGLOBAL WINAPI GlobalReAlloc(HGLOBAL,SIZE_T,UINT); +SIZE_T WINAPI GlobalSize(HGLOBAL); VOID WINAPI GlobalUnfix(HGLOBAL); BOOL WINAPI GlobalUnlock(HGLOBAL); BOOL WINAPI GlobalUnWire(HGLOBAL); @@ -1677,15 +1677,15 @@ #define LoadLibraryEx WINELIB_NAME_AW(LoadLibraryEx) HINSTANCE WINAPI LoadModule(LPCSTR,LPVOID); HGLOBAL WINAPI LoadResource(HMODULE,HRSRC); -HLOCAL WINAPI LocalAlloc(UINT,DWORD); -UINT WINAPI LocalCompact(UINT); +HLOCAL WINAPI LocalAlloc(UINT,SIZE_T); +SIZE_T WINAPI LocalCompact(UINT); UINT WINAPI LocalFlags(HLOCAL); HLOCAL WINAPI LocalFree(HLOCAL); HLOCAL WINAPI LocalHandle(LPCVOID); LPVOID WINAPI LocalLock(HLOCAL); -HLOCAL WINAPI LocalReAlloc(HLOCAL,DWORD,UINT); -UINT WINAPI LocalShrink(HGLOBAL,UINT); -UINT WINAPI LocalSize(HLOCAL); +HLOCAL WINAPI LocalReAlloc(HLOCAL,SIZE_T,UINT); +SIZE_T WINAPI LocalShrink(HGLOBAL,UINT); +SIZE_T WINAPI LocalSize(HLOCAL); BOOL WINAPI LocalUnlock(HLOCAL); LPVOID WINAPI LockResource(HGLOBAL); #define LockSegment(handle) GlobalFix((HANDLE)(handle)) @@ -1694,7 +1694,7 @@ VOID WINAPI OutputDebugStringA(LPCSTR); VOID WINAPI OutputDebugStringW(LPCWSTR); #define OutputDebugString WINELIB_NAME_AW(OutputDebugString) -BOOL WINAPI ReadProcessMemory(HANDLE, LPCVOID, LPVOID, DWORD, LPDWORD); +BOOL WINAPI ReadProcessMemory(HANDLE,LPCVOID,LPVOID,SIZE_T,SIZE_T*); BOOL WINAPI RemoveDirectoryA(LPCSTR); BOOL WINAPI RemoveDirectoryW(LPCWSTR); #define RemoveDirectory WINELIB_NAME_AW(RemoveDirectory) @@ -1724,7 +1724,7 @@ BOOL WINAPI WritePrivateProfileStructA(LPCSTR,LPCSTR,LPVOID,UINT,LPCSTR); BOOL WINAPI WritePrivateProfileStructW(LPCWSTR,LPCWSTR,LPVOID,UINT,LPCWSTR); #define WritePrivateProfileStruct WINELIB_NAME_AW(WritePrivateProfileStruct) -BOOL WINAPI WriteProcessMemory(HANDLE,LPVOID,LPCVOID,DWORD,LPDWORD); +BOOL WINAPI WriteProcessMemory(HANDLE,LPVOID,LPCVOID,SIZE_T,SIZE_T*); BOOL WINAPI WriteProfileStringA(LPCSTR,LPCSTR,LPCSTR); BOOL WINAPI WriteProfileStringW(LPCWSTR,LPCWSTR,LPCWSTR); #define WriteProfileString WINELIB_NAME_AW(WriteProfileString) diff -u cvs/hq/wine/memory/global.c wine/memory/global.c --- cvs/hq/wine/memory/global.c Sat Aug 17 18:42:29 2002 +++ wine/memory/global.c Fri Sep 20 22:57:45 2002 @@ -1046,7 +1046,7 @@ */ HGLOBAL WINAPI GlobalAlloc( UINT flags, /* [in] Object allocation attributes */ - DWORD size /* [in] Number of bytes to allocate */ + SIZE_T size /* [in] Number of bytes to allocate */ ) { PGLOBAL32_INTERN pintern; DWORD hpflags; @@ -1239,7 +1239,7 @@ */ HGLOBAL WINAPI GlobalReAlloc( HGLOBAL hmem, /* [in] Handle of global memory object */ - DWORD size, /* [in] New size of block */ + SIZE_T size, /* [in] New size of block */ UINT flags /* [in] How to reallocate object */ ) { LPVOID palloc; @@ -1395,7 +1395,7 @@ * Size in bytes of the global memory object * 0: Failure */ -DWORD WINAPI GlobalSize( +SIZE_T WINAPI GlobalSize( HGLOBAL hmem /* [in] Handle of global memory object */ ) { DWORD retval; @@ -1512,7 +1512,7 @@ /*********************************************************************** * GlobalCompact (KERNEL32.@) */ -DWORD WINAPI GlobalCompact( DWORD minfree ) +SIZE_T WINAPI GlobalCompact( DWORD minfree ) { return 0; /* GlobalCompact does nothing in Win32 */ } diff -u cvs/hq/wine/memory/heap.c wine/memory/heap.c --- cvs/hq/wine/memory/heap.c Sat Sep 14 21:33:43 2002 +++ wine/memory/heap.c Fri Sep 20 21:53:09 2002 @@ -135,8 +135,8 @@ */ HANDLE WINAPI HeapCreate( DWORD flags, /* [in] Heap allocation flag */ - DWORD initialSize, /* [in] Initial heap size */ - DWORD maxSize /* [in] Maximum heap size */ + SIZE_T initialSize, /* [in] Initial heap size */ + SIZE_T maxSize /* [in] Maximum heap size */ ) { HANDLE ret; @@ -176,7 +176,7 @@ /*********************************************************************** * HeapCompact (KERNEL32.@) */ -DWORD WINAPI HeapCompact( HANDLE heap, DWORD flags ) +SIZE_T WINAPI HeapCompact( HANDLE heap, DWORD flags ) { return RtlCompactHeap( heap, flags ); } @@ -782,7 +782,7 @@ /* FIXME: these functions are needed for dlls that aren't properly separated yet */ -LPVOID WINAPI HeapAlloc( HANDLE heap, DWORD flags, DWORD size ) +LPVOID WINAPI HeapAlloc( HANDLE heap, DWORD flags, SIZE_T size ) { return RtlAllocateHeap( heap, flags, size ); } @@ -792,12 +792,12 @@ return RtlFreeHeap( heap, flags, ptr ); } -LPVOID WINAPI HeapReAlloc( HANDLE heap, DWORD flags, LPVOID ptr, DWORD size ) +LPVOID WINAPI HeapReAlloc( HANDLE heap, DWORD flags, LPVOID ptr, SIZE_T size ) { return RtlReAllocateHeap( heap, flags, ptr, size ); } -DWORD WINAPI HeapSize( HANDLE heap, DWORD flags, LPVOID ptr ) +SIZE_T WINAPI HeapSize( HANDLE heap, DWORD flags, LPVOID ptr ) { return RtlSizeHeap( heap, flags, ptr ); } diff -u cvs/hq/wine/memory/local.c wine/memory/local.c --- cvs/hq/wine/memory/local.c Mon Jun 3 13:01:37 2002 +++ wine/memory/local.c Fri Sep 20 22:04:12 2002 @@ -1834,7 +1834,7 @@ */ HLOCAL WINAPI LocalAlloc( UINT flags, /* [in] Allocation attributes */ - DWORD size /* [in] Number of bytes to allocate */ + SIZE_T size /* [in] Number of bytes to allocate */ ) { return (HLOCAL)GlobalAlloc( flags, size ); } @@ -1843,7 +1843,7 @@ /*********************************************************************** * LocalCompact (KERNEL32.@) */ -UINT WINAPI LocalCompact( UINT minfree ) +SIZE_T WINAPI LocalCompact( UINT minfree ) { return 0; /* LocalCompact does nothing in Win32 */ } @@ -1912,7 +1912,7 @@ */ HLOCAL WINAPI LocalReAlloc( HLOCAL handle, /* [in] Handle of memory object */ - DWORD size, /* [in] New size of block */ + SIZE_T size, /* [in] New size of block */ UINT flags /* [in] How to reallocate object */ ) { return (HLOCAL)GlobalReAlloc( (HGLOBAL)handle, size, flags ); @@ -1922,7 +1922,7 @@ /*********************************************************************** * LocalShrink (KERNEL32.@) */ -UINT WINAPI LocalShrink( HGLOBAL handle, UINT newsize ) +SIZE_T WINAPI LocalShrink( HGLOBAL handle, UINT newsize ) { return 0; /* LocalShrink does nothing in Win32 */ } @@ -1934,7 +1934,7 @@ * Size: Success * 0: Failure */ -UINT WINAPI LocalSize( +SIZE_T WINAPI LocalSize( HLOCAL handle /* [in] Handle of memory object */ ) { return GlobalSize( (HGLOBAL)handle ); diff -u cvs/hq/wine/memory/virtual.c wine/memory/virtual.c --- cvs/hq/wine/memory/virtual.c Fri Sep 20 14:30:15 2002 +++ wine/memory/virtual.c Fri Sep 20 21:56:31 2002 @@ -60,7 +60,7 @@ */ LPVOID WINAPI VirtualAlloc( LPVOID addr, /* [in] Address of region to reserve or commit */ - DWORD size, /* [in] Size of region */ + SIZE_T size, /* [in] Size of region */ DWORD type, /* [in] Type of allocation */ DWORD protect)/* [in] Type of access protection */ { @@ -76,7 +76,7 @@ LPVOID WINAPI VirtualAllocEx( HANDLE hProcess, /* [in] Handle of process to do mem operation */ LPVOID addr, /* [in] Address of region to reserve or commit */ - DWORD size, /* [in] Size of region */ + SIZE_T size, /* [in] Size of region */ DWORD type, /* [in] Type of allocation */ DWORD protect ) /* [in] Type of access protection */ { @@ -102,7 +102,7 @@ */ BOOL WINAPI VirtualFree( LPVOID addr, /* [in] Address of region of committed pages */ - DWORD size, /* [in] Size of region */ + SIZE_T size, /* [in] Size of region */ DWORD type /* [in] Type of operation */ ) { return VirtualFreeEx( GetCurrentProcess(), addr, size, type ); @@ -117,7 +117,7 @@ * TRUE: Success * FALSE: Failure */ -BOOL WINAPI VirtualFreeEx( HANDLE process, LPVOID addr, DWORD size, DWORD type ) +BOOL WINAPI VirtualFreeEx( HANDLE process, LPVOID addr, SIZE_T size, DWORD type ) { NTSTATUS status = NtFreeVirtualMemory( process, &addr, &size, type ); if (status) SetLastError( RtlNtStatusToDosError(status) ); @@ -137,7 +137,7 @@ * FALSE: Failure */ BOOL WINAPI VirtualLock( LPVOID addr, /* [in] Address of first byte of range to lock */ - DWORD size ) /* [in] Number of bytes in range to lock */ + SIZE_T size ) /* [in] Number of bytes in range to lock */ { NTSTATUS status = NtLockVirtualMemory( GetCurrentProcess(), &addr, &size, 1 ); if (status) SetLastError( RtlNtStatusToDosError(status) ); @@ -157,7 +157,7 @@ * FALSE: Failure */ BOOL WINAPI VirtualUnlock( LPVOID addr, /* [in] Address of first byte of range */ - DWORD size ) /* [in] Number of bytes in range */ + SIZE_T size ) /* [in] Number of bytes in range */ { NTSTATUS status = NtUnlockVirtualMemory( GetCurrentProcess(), &addr, &size, 1 ); if (status) SetLastError( RtlNtStatusToDosError(status) ); @@ -175,7 +175,7 @@ */ BOOL WINAPI VirtualProtect( LPVOID addr, /* [in] Address of region of committed pages */ - DWORD size, /* [in] Size of region */ + SIZE_T size, /* [in] Size of region */ DWORD new_prot, /* [in] Desired access protection */ LPDWORD old_prot /* [out] Address of variable to get old protection */ ) { @@ -195,7 +195,7 @@ BOOL WINAPI VirtualProtectEx( HANDLE process, /* [in] Handle of process */ LPVOID addr, /* [in] Address of region of committed pages */ - DWORD size, /* [in] Size of region */ + SIZE_T size, /* [in] Size of region */ DWORD new_prot, /* [in] Desired access protection */ LPDWORD old_prot /* [out] Address of variable to get old protection */ ) { @@ -213,10 +213,10 @@ * Number of bytes returned in information buffer * or 0 if addr is >= 0xc0000000 (kernel space). */ -DWORD WINAPI VirtualQuery( +SIZE_T WINAPI VirtualQuery( LPCVOID addr, /* [in] Address of region */ LPMEMORY_BASIC_INFORMATION info, /* [out] Address of info buffer */ - DWORD len /* [in] Size of buffer */ + SIZE_T len /* [in] Size of buffer */ ) { return VirtualQueryEx( GetCurrentProcess(), addr, info, len ); } @@ -230,11 +230,11 @@ * RETURNS * Number of bytes returned in information buffer */ -DWORD WINAPI VirtualQueryEx( +SIZE_T WINAPI VirtualQueryEx( HANDLE process, /* [in] Handle of process */ LPCVOID addr, /* [in] Address of region */ LPMEMORY_BASIC_INFORMATION info, /* [out] Address of info buffer */ - DWORD len /* [in] Size of buffer */ ) + SIZE_T len /* [in] Size of buffer */ ) { DWORD ret; NTSTATUS status; @@ -420,7 +420,7 @@ DWORD access, /* [in] Access mode */ DWORD offset_high, /* [in] High-order 32 bits of file offset */ DWORD offset_low, /* [in] Low-order 32 bits of file offset */ - DWORD count /* [in] Number of bytes to map */ + SIZE_T count /* [in] Number of bytes to map */ ) { return MapViewOfFileEx( mapping, access, offset_high, offset_low, count, NULL ); @@ -440,7 +440,7 @@ DWORD access, /* [in] Access mode */ DWORD offset_high, /* [in] High-order 32 bits of file offset */ DWORD offset_low, /* [in] Low-order 32 bits of file offset */ - DWORD count, /* [in] Number of bytes to map */ + SIZE_T count, /* [in] Number of bytes to map */ LPVOID addr /* [in] Suggested starting address for mapped view */ ) { NTSTATUS status; @@ -493,7 +493,7 @@ * FALSE: Failure */ BOOL WINAPI FlushViewOfFile( LPCVOID base, /* [in] Start address of byte range to flush */ - DWORD size ) /* [in] Number of bytes in range */ + SIZE_T size ) /* [in] Number of bytes in range */ { NTSTATUS status = NtFlushVirtualMemory( GetCurrentProcess(), &base, &size, 0 ); if (status) diff -u cvs/hq/wine/scheduler/process.c wine/scheduler/process.c --- cvs/hq/wine/scheduler/process.c Wed Aug 28 15:31:15 2002 +++ wine/scheduler/process.c Fri Sep 20 22:06:01 2002 @@ -1625,11 +1625,11 @@ * * RETURNS STD */ -BOOL WINAPI SetProcessWorkingSetSize(HANDLE hProcess,DWORD minset, - DWORD maxset) +BOOL WINAPI SetProcessWorkingSetSize(HANDLE hProcess, SIZE_T minset, + SIZE_T maxset) { FIXME("(0x%08x,%ld,%ld): stub - harmless\n",hProcess,minset,maxset); - if(( minset == (DWORD)-1) && (maxset == (DWORD)-1)) { + if(( minset == (SIZE_T)-1) && (maxset == (SIZE_T)-1)) { /* Trim the working set to zero */ /* Swap the process out of physical RAM */ } @@ -1639,8 +1639,8 @@ /*********************************************************************** * GetProcessWorkingSetSize (KERNEL32.@) */ -BOOL WINAPI GetProcessWorkingSetSize(HANDLE hProcess,LPDWORD minset, - LPDWORD maxset) +BOOL WINAPI GetProcessWorkingSetSize(HANDLE hProcess, PSIZE_T minset, + PSIZE_T maxset) { FIXME("(0x%08x,%p,%p): stub\n",hProcess,minset,maxset); /* 32 MB working set size */ @@ -1693,8 +1693,8 @@ /*********************************************************************** * ReadProcessMemory (KERNEL32.@) */ -BOOL WINAPI ReadProcessMemory( HANDLE process, LPCVOID addr, LPVOID buffer, DWORD size, - LPDWORD bytes_read ) +BOOL WINAPI ReadProcessMemory( HANDLE process, LPCVOID addr, LPVOID buffer, SIZE_T size, + SIZE_T *bytes_read ) { DWORD res; @@ -1714,8 +1714,8 @@ /*********************************************************************** * WriteProcessMemory (KERNEL32.@) */ -BOOL WINAPI WriteProcessMemory( HANDLE process, LPVOID addr, LPCVOID buffer, DWORD size, - LPDWORD bytes_written ) +BOOL WINAPI WriteProcessMemory( HANDLE process, LPVOID addr, LPCVOID buffer, SIZE_T size, + SIZE_T *bytes_written ) { static const int zero; unsigned int first_offset, last_offset, first_mask, last_mask; @@ -1753,7 +1753,7 @@ if (bytes_written) *bytes_written = size; { char dummy[32]; - DWORD read; + SIZE_T read; ReadProcessMemory( process, addr, dummy, sizeof(dummy), &read ); } return !res; diff -u cvs/hq/wine/scheduler/thread.c wine/scheduler/thread.c --- cvs/hq/wine/scheduler/thread.c Sat Aug 17 18:42:31 2002 +++ wine/scheduler/thread.c Fri Sep 20 21:49:27 2002 @@ -271,7 +271,7 @@ /*********************************************************************** * CreateThread (KERNEL32.@) */ -HANDLE WINAPI CreateThread( SECURITY_ATTRIBUTES *sa, DWORD stack, +HANDLE WINAPI CreateThread( SECURITY_ATTRIBUTES *sa, SIZE_T stack, LPTHREAD_START_ROUTINE start, LPVOID param, DWORD flags, LPDWORD id ) { diff -u cvs/hq/wine/win32/newfns.c wine/win32/newfns.c --- cvs/hq/wine/win32/newfns.c Sun Sep 1 16:39:26 2002 +++ wine/win32/newfns.c Fri Sep 20 21:57:38 2002 @@ -156,7 +156,7 @@ /**************************************************************************** * FlushInstructionCache (KERNEL32.@) */ -BOOL WINAPI FlushInstructionCache(HANDLE hProcess, LPCVOID lpBaseAddress, DWORD dwSize) +BOOL WINAPI FlushInstructionCache(HANDLE hProcess, LPCVOID lpBaseAddress, SIZE_T dwSize) { if (GetVersion() & 0x80000000) return TRUE; /* not NT, always TRUE */ FIXME_(debug)("(0x%08lx,%p,0x%08lx): stub\n",(DWORD)hProcess, lpBaseAddress, dwSize);