diff --git a/dlls/ntdll/env.c b/dlls/ntdll/env.c index 821ffe49245..b8f537fd268 100644 --- a/dlls/ntdll/env.c +++ b/dlls/ntdll/env.c @@ -62,7 +62,7 @@ NTSTATUS WINAPI RtlCreateEnvironment(BOOLEAN inherit, PWSTR* env) } else { - ULONG size = 1; + SIZE_T size = 1; PVOID addr = NULL; nts = NtAllocateVirtualMemory(NtCurrentProcess(), &addr, 0, &size, MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE); @@ -77,7 +77,7 @@ NTSTATUS WINAPI RtlCreateEnvironment(BOOLEAN inherit, PWSTR* env) */ NTSTATUS WINAPI RtlDestroyEnvironment(PWSTR env) { - ULONG size = 0; + SIZE_T size = 0; TRACE("(%p)!\n", env); @@ -220,7 +220,7 @@ NTSTATUS WINAPI RtlSetEnvironmentVariable(PWSTR* penv, PUNICODE_STRING name, if ((old_size + len) * sizeof(WCHAR) > mbi.RegionSize) { LPWSTR new_env; - ULONG new_size = (old_size + len) * sizeof(WCHAR); + SIZE_T new_size = (old_size + len) * sizeof(WCHAR); new_env = NULL; nts = NtAllocateVirtualMemory(NtCurrentProcess(), (void**)&new_env, 0, @@ -422,7 +422,7 @@ NTSTATUS WINAPI RtlCreateProcessParameters( RTL_USER_PROCESS_PARAMETERS **result static const UNICODE_STRING null_str = { 0, 0, NULL }; const RTL_USER_PROCESS_PARAMETERS *cur_params; - ULONG size, total_size; + SIZE_T size, total_size; void *ptr; NTSTATUS status; @@ -482,6 +482,6 @@ NTSTATUS WINAPI RtlCreateProcessParameters( RTL_USER_PROCESS_PARAMETERS **result void WINAPI RtlDestroyProcessParameters( RTL_USER_PROCESS_PARAMETERS *params ) { void *ptr = params; - ULONG size = 0; + SIZE_T size = 0; NtFreeVirtualMemory( NtCurrentProcess(), &ptr, &size, MEM_RELEASE ); } diff --git a/dlls/ntdll/handletable.c b/dlls/ntdll/handletable.c index 7e0b41eb9bb..eb901ffb4aa 100644 --- a/dlls/ntdll/handletable.c +++ b/dlls/ntdll/handletable.c @@ -74,7 +74,7 @@ void WINAPI RtlInitializeHandleTable(ULONG MaxHandleCount, ULONG HandleSize, RTL */ NTSTATUS WINAPI RtlDestroyHandleTable(RTL_HANDLE_TABLE * HandleTable) { - ULONG Size = 0; + SIZE_T Size = 0; TRACE("(%p)\n", HandleTable); @@ -104,7 +104,7 @@ static NTSTATUS RtlpAllocateSomeHandles(RTL_HANDLE_TABLE * HandleTable) if (!HandleTable->FirstHandle) { PVOID FirstHandleAddr = NULL; - ULONG MaxSize = HandleTable->MaxHandleCount * HandleTable->HandleSize; + SIZE_T MaxSize = HandleTable->MaxHandleCount * HandleTable->HandleSize; /* reserve memory for the handles, but don't commit it yet because we * probably won't use most of it and it will use up physical memory */ @@ -123,8 +123,7 @@ static NTSTATUS RtlpAllocateSomeHandles(RTL_HANDLE_TABLE * HandleTable) } if (!HandleTable->NextFree) { - ULONG CommitSize = 4096; /* one page */ - ULONG Offset; + SIZE_T Offset, CommitSize = 4096; /* one page */ RTL_HANDLE * FreeHandle = NULL; PVOID NextAvailAddr = HandleTable->ReservedMemory; diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c index 205fc006536..e305f2270e1 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -455,7 +455,7 @@ static WINE_MODREF *import_dll( HMODULE module, const IMAGE_IMPORT_DESCRIPTOR *d const char *name = get_rva( module, descr->Name ); DWORD len = strlen(name) + 1; PVOID protect_base; - DWORD protect_size = 0; + SIZE_T protect_size = 0; DWORD protect_old; thunk_list = get_rva( module, (DWORD)descr->FirstThunk ); @@ -1287,7 +1287,7 @@ static NTSTATUS load_native_dll( LPCWSTR load_path, LPCWSTR name, HANDLE file, OBJECT_ATTRIBUTES attr; LARGE_INTEGER size; IMAGE_NT_HEADERS *nt; - DWORD len = 0; + SIZE_T len = 0; WINE_MODREF *wm; NTSTATUS status; diff --git a/dlls/ntdll/server.c b/dlls/ntdll/server.c index 8a6cd5d5552..6e82a05e176 100644 --- a/dlls/ntdll/server.c +++ b/dlls/ntdll/server.c @@ -126,7 +126,7 @@ static void fatal_perror( const char *err, ... ) void server_exit_thread( int status ) { struct wine_pthread_thread_info info; - ULONG size; + SIZE_T size; RtlAcquirePebLock(); RemoveEntryList( &NtCurrentTeb()->TlsLinks ); diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c index a6b5d168bc4..f7dca185562 100644 --- a/dlls/ntdll/thread.c +++ b/dlls/ntdll/thread.c @@ -84,7 +84,7 @@ static inline NTSTATUS init_teb( TEB *teb ) */ static inline void free_teb( TEB *teb ) { - ULONG size = 0; + SIZE_T size = 0; void *addr = teb; struct ntdll_thread_data *thread_data = (struct ntdll_thread_data *)teb->SystemReserved2; @@ -105,7 +105,7 @@ void thread_init(void) { TEB *teb; void *addr; - ULONG info_size; + SIZE_T info_size; struct ntdll_thread_data *thread_data; struct wine_pthread_thread_info thread_info; static struct debug_info debug_info; /* debug info for initial thread */ @@ -193,7 +193,7 @@ static void start_thread( struct wine_pthread_thread_info *info ) PRTL_THREAD_START_ROUTINE func = startup_info->entry_point; void *arg = startup_info->entry_arg; struct debug_info debug_info; - ULONG size; + SIZE_T size; debug_info.str_pos = debug_info.strings; debug_info.out_pos = debug_info.output; @@ -323,7 +323,7 @@ error: if (thread_data) wine_ldt_free_fs( thread_data->teb_sel ); if (addr) { - ULONG size = 0; + SIZE_T size = 0; NtFreeVirtualMemory( NtCurrentProcess(), &addr, &size, MEM_RELEASE ); } if (info) RtlFreeHeap( GetProcessHeap(), 0, info );