diff --git a/dlls/ntdll/critsection.c b/dlls/ntdll/critsection.c index a635e2f8d0b..4d60bb489d4 100644 --- a/dlls/ntdll/critsection.c +++ b/dlls/ntdll/critsection.c @@ -78,10 +78,10 @@ static inline HANDLE get_semaphore( RTL_CRITICAL_SECTION *crit ) */ NTSTATUS WINAPI RtlInitializeCriticalSection( RTL_CRITICAL_SECTION *crit ) { - if (!ntdll_get_process_heap()) crit->DebugInfo = NULL; + if (!GetProcessHeap()) crit->DebugInfo = NULL; else { - crit->DebugInfo = RtlAllocateHeap(ntdll_get_process_heap(), 0, sizeof(CRITICAL_SECTION_DEBUG)); + crit->DebugInfo = RtlAllocateHeap(GetProcessHeap(), 0, sizeof(CRITICAL_SECTION_DEBUG)); if (crit->DebugInfo) { crit->DebugInfo->Type = 0; @@ -151,8 +151,7 @@ NTSTATUS WINAPI RtlDeleteCriticalSection( RTL_CRITICAL_SECTION *crit ) /* only free the ones we made in here */ if (!crit->DebugInfo->Spare[1]) { - - RtlFreeHeap( ntdll_get_process_heap(), 0, crit->DebugInfo ); + RtlFreeHeap( GetProcessHeap(), 0, crit->DebugInfo ); crit->DebugInfo = NULL; } } diff --git a/dlls/ntdll/env.c b/dlls/ntdll/env.c index 997d1ab761b..fa80374a2be 100644 --- a/dlls/ntdll/env.c +++ b/dlls/ntdll/env.c @@ -48,7 +48,8 @@ NTSTATUS WINAPI RtlCreateEnvironment(BOOLEAN inherit, PWSTR* env) RtlAcquirePebLock(); - nts = NtQueryVirtualMemory(NtCurrentProcess(), ntdll_get_process_pmts()->Environment, + nts = NtQueryVirtualMemory(NtCurrentProcess(), + NtCurrentTeb()->Peb->ProcessParameters->Environment, 0, &mbi, sizeof(mbi), NULL); if (nts == STATUS_SUCCESS) { @@ -56,7 +57,7 @@ NTSTATUS WINAPI RtlCreateEnvironment(BOOLEAN inherit, PWSTR* env) nts = NtAllocateVirtualMemory(NtCurrentProcess(), (void**)env, 0, &mbi.RegionSize, MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE); if (nts == STATUS_SUCCESS) - memcpy(*env, ntdll_get_process_pmts()->Environment, mbi.RegionSize); + memcpy(*env, NtCurrentTeb()->Peb->ProcessParameters->Environment, mbi.RegionSize); else *env = NULL; } RtlReleasePebLock(); @@ -126,7 +127,7 @@ NTSTATUS WINAPI RtlQueryEnvironmentVariable_U(PWSTR env, if (!env) { RtlAcquirePebLock(); - var = ntdll_get_process_pmts()->Environment; + var = NtCurrentTeb()->Peb->ProcessParameters->Environment; } else var = env; @@ -158,8 +159,8 @@ void WINAPI RtlSetCurrentEnvironment(PWSTR new_env, PWSTR* old_env) RtlAcquirePebLock(); - if (old_env) *old_env = ntdll_get_process_pmts()->Environment; - ntdll_get_process_pmts()->Environment = new_env; + if (old_env) *old_env = NtCurrentTeb()->Peb->ProcessParameters->Environment; + NtCurrentTeb()->Peb->ProcessParameters->Environment = new_env; RtlReleasePebLock(); } @@ -188,7 +189,7 @@ NTSTATUS WINAPI RtlSetEnvironmentVariable(PWSTR* penv, PUNICODE_STRING name, if (!penv) { RtlAcquirePebLock(); - env = ntdll_get_process_pmts()->Environment; + env = NtCurrentTeb()->Peb->ProcessParameters->Environment; } else env = *penv; len = name->Length / sizeof(WCHAR); @@ -234,7 +235,7 @@ NTSTATUS WINAPI RtlSetEnvironmentVariable(PWSTR* penv, PUNICODE_STRING name, p = new_env + (p - env); RtlDestroyEnvironment(env); - if (!penv) ntdll_get_process_pmts()->Environment = new_env; + if (!penv) NtCurrentTeb()->Peb->ProcessParameters->Environment = new_env; else *penv = new_env; env = new_env; } @@ -276,7 +277,7 @@ NTSTATUS WINAPI RtlExpandEnvironmentStrings_U(PWSTR renv, const UNICODE_STRING* if (!renv) { RtlAcquirePebLock(); - env = ntdll_get_process_pmts()->Environment; + env = NtCurrentTeb()->Peb->ProcessParameters->Environment; } else env = renv; diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c index 0828891deac..e0b1a35b4f0 100644 --- a/dlls/ntdll/file.c +++ b/dlls/ntdll/file.c @@ -197,7 +197,7 @@ static void CALLBACK fileio_call_completion_func(ULONG_PTR data) static void fileio_async_cleanup( struct async_private *ovp ) { - RtlFreeHeap( ntdll_get_process_heap(), 0, ovp ); + RtlFreeHeap( GetProcessHeap(), 0, ovp ); } /*********************************************************************** @@ -360,7 +360,7 @@ NTSTATUS WINAPI NtReadFile(HANDLE hFile, HANDLE hEvent, async_fileio* ovp; NTSTATUS ret; - if (!(ovp = RtlAllocateHeap(ntdll_get_process_heap(), 0, sizeof(async_fileio)))) + if (!(ovp = RtlAllocateHeap(GetProcessHeap(), 0, sizeof(async_fileio)))) { wine_server_release_fd( hFile, unix_handle ); return STATUS_NO_MEMORY; @@ -545,7 +545,7 @@ NTSTATUS WINAPI NtWriteFile(HANDLE hFile, HANDLE hEvent, async_fileio* ovp; NTSTATUS ret; - if (!(ovp = RtlAllocateHeap(ntdll_get_process_heap(), 0, sizeof(async_fileio)))) + if (!(ovp = RtlAllocateHeap(GetProcessHeap(), 0, sizeof(async_fileio)))) { wine_server_release_fd( hFile, unix_handle ); return STATUS_NO_MEMORY; diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c index 207ec281ef6..a0afd07e8a3 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -466,7 +466,7 @@ static NTSTATUS fixup_imports( WINE_MODREF *wm, LPCWSTR load_path ) /* Allocate module dependency list */ wm->nDeps = nb_imports; - wm->deps = RtlAllocateHeap( ntdll_get_process_heap(), 0, nb_imports*sizeof(WINE_MODREF *) ); + wm->deps = RtlAllocateHeap( GetProcessHeap(), 0, nb_imports*sizeof(WINE_MODREF *) ); /* load the imported modules. They are automatically * added to the modref list of the process. @@ -574,7 +574,7 @@ static NTSTATUS alloc_process_tls(void) TRACE( "count %u size %u\n", tls_module_count, tls_total_size ); - tls_dirs = RtlAllocateHeap( ntdll_get_process_heap(), 0, tls_module_count * sizeof(*tls_dirs) ); + tls_dirs = RtlAllocateHeap( GetProcessHeap(), 0, tls_module_count * sizeof(*tls_dirs) ); if (!tls_dirs) return STATUS_NO_MEMORY; for (i = 0, entry = mark->Flink; entry != mark; entry = entry->Flink) @@ -606,13 +606,13 @@ static NTSTATUS alloc_thread_tls(void) if (!tls_module_count) return STATUS_SUCCESS; - if (!(pointers = RtlAllocateHeap( ntdll_get_process_heap(), 0, + if (!(pointers = RtlAllocateHeap( GetProcessHeap(), 0, tls_module_count * sizeof(*pointers) ))) return STATUS_NO_MEMORY; - if (!(data = RtlAllocateHeap( ntdll_get_process_heap(), 0, tls_total_size ))) + if (!(data = RtlAllocateHeap( GetProcessHeap(), 0, tls_total_size ))) { - RtlFreeHeap( ntdll_get_process_heap(), 0, pointers ); + RtlFreeHeap( GetProcessHeap(), 0, pointers ); return STATUS_NO_MEMORY; } @@ -1646,8 +1646,8 @@ static void MODULE_FlushModrefs(void) NtUnmapViewOfSection( GetCurrentProcess(), mod->BaseAddress ); if (cached_modref == wm) cached_modref = NULL; RtlFreeUnicodeString( &mod->FullDllName ); - RtlFreeHeap( ntdll_get_process_heap(), 0, wm->deps ); - RtlFreeHeap( ntdll_get_process_heap(), 0, wm ); + RtlFreeHeap( GetProcessHeap(), 0, wm->deps ); + RtlFreeHeap( GetProcessHeap(), 0, wm ); } } diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h index c431417edf9..163ee8770ae 100644 --- a/dlls/ntdll/ntdll_misc.h +++ b/dlls/ntdll/ntdll_misc.h @@ -68,20 +68,11 @@ extern FARPROC SNOOP_GetProcAddress( HMODULE hmod, IMAGE_EXPORT_DIRECTORY *expor extern void RELAY_SetupDLL( HMODULE hmod ); extern void SNOOP_SetupDLL( HMODULE hmod ); -static inline HANDLE ntdll_get_process_heap(void) -{ - return NtCurrentTeb()->Peb->ProcessHeap; -} /* redefine these to make sure we don't reference kernel symbols */ #define GetProcessHeap() (NtCurrentTeb()->Peb->ProcessHeap) #define GetCurrentProcessId() ((DWORD)NtCurrentTeb()->ClientId.UniqueProcess) #define GetCurrentThreadId() ((DWORD)NtCurrentTeb()->ClientId.UniqueThread) -static inline RTL_USER_PROCESS_PARAMETERS* ntdll_get_process_pmts(void) -{ - return NtCurrentTeb()->Peb->ProcessParameters; -} - /* hack: upcall to kernel */ extern HANDLE (WINAPI *pCreateFileW)( LPCWSTR filename, DWORD access, DWORD sharing, LPSECURITY_ATTRIBUTES sa, DWORD creation, diff --git a/dlls/ntdll/path.c b/dlls/ntdll/path.c index b4e7bd7d95a..31aad27f4a3 100644 --- a/dlls/ntdll/path.c +++ b/dlls/ntdll/path.c @@ -205,15 +205,15 @@ BOOLEAN WINAPI RtlDosPathNameToNtPathName_U(PWSTR dos_path, if (sz == 0) return FALSE; if (sz > ptr_sz) { - ptr = RtlAllocateHeap(ntdll_get_process_heap(), 0, sz); + ptr = RtlAllocateHeap(GetProcessHeap(), 0, sz); sz = RtlGetFullPathName_U(dos_path, sz, ptr, file_part); } ntpath->MaximumLength = sz + (4 /* unc\ */ + 4 /* \??\ */) * sizeof(WCHAR); - ntpath->Buffer = RtlAllocateHeap(ntdll_get_process_heap(), 0, ntpath->MaximumLength); + ntpath->Buffer = RtlAllocateHeap(GetProcessHeap(), 0, ntpath->MaximumLength); if (!ntpath->Buffer) { - if (ptr != local) RtlFreeHeap(ntdll_get_process_heap(), 0, ptr); + if (ptr != local) RtlFreeHeap(GetProcessHeap(), 0, ptr); return FALSE; } @@ -242,7 +242,7 @@ BOOLEAN WINAPI RtlDosPathNameToNtPathName_U(PWSTR dos_path, /* FIXME: cd filling */ - if (ptr != local) RtlFreeHeap(ntdll_get_process_heap(), 0, ptr); + if (ptr != local) RtlFreeHeap(GetProcessHeap(), 0, ptr); return TRUE; } @@ -306,7 +306,7 @@ ULONG WINAPI RtlDosSearchPath_U(LPCWSTR paths, LPCWSTR search, LPCWSTR ext, } paths = ptr; } - RtlFreeHeap(ntdll_get_process_heap(), 0, name); + RtlFreeHeap(GetProcessHeap(), 0, name); } else if (RtlDoesFileExists_U(search)) { @@ -332,7 +332,7 @@ static ULONG get_full_path_helper(LPCWSTR name, LPWSTR buffer, ULONG size) RtlAcquirePebLock(); - cd = &ntdll_get_process_pmts()->CurrentDirectoryName; + cd = &NtCurrentTeb()->Peb->ProcessParameters->CurrentDirectoryName; switch (type = RtlDetermineDosPathNameType_U(name)) { @@ -545,15 +545,15 @@ DWORD WINAPI RtlGetFullPathName_U(const WCHAR* name, ULONG size, WCHAR* buffer, reqsize = get_full_path_helper(name, buffer, size); if (reqsize > size) { - LPWSTR tmp = RtlAllocateHeap(ntdll_get_process_heap(), 0, reqsize); + LPWSTR tmp = RtlAllocateHeap(GetProcessHeap(), 0, reqsize); reqsize = get_full_path_helper(name, tmp, reqsize); if (reqsize > size) /* it may have worked the second time */ { - RtlFreeHeap(ntdll_get_process_heap(), 0, tmp); + RtlFreeHeap(GetProcessHeap(), 0, tmp); return reqsize + sizeof(WCHAR); } memcpy( buffer, tmp, reqsize + sizeof(WCHAR) ); - RtlFreeHeap(ntdll_get_process_heap(), 0, tmp); + RtlFreeHeap(GetProcessHeap(), 0, tmp); } /* find file part */ @@ -661,7 +661,7 @@ NTSTATUS WINAPI RtlGetCurrentDirectory_U(ULONG buflen, LPWSTR buf) RtlAcquirePebLock(); - us = &ntdll_get_process_pmts()->CurrentDirectoryName; + us = &NtCurrentTeb()->Peb->ProcessParameters->CurrentDirectoryName; len = us->Length / sizeof(WCHAR); if (us->Buffer[len - 1] == '\\' && us->Buffer[len - 2] != ':') len--; @@ -696,10 +696,10 @@ NTSTATUS WINAPI RtlSetCurrentDirectory_U(const UNICODE_STRING* dir) RtlAcquirePebLock(); - curdir = &ntdll_get_process_pmts()->CurrentDirectoryName; + curdir = &NtCurrentTeb()->Peb->ProcessParameters->CurrentDirectoryName; size = curdir->MaximumLength; - buf = RtlAllocateHeap(ntdll_get_process_heap(), 0, size); + buf = RtlAllocateHeap(GetProcessHeap(), 0, size); if (buf == NULL) { nts = STATUS_NO_MEMORY; @@ -758,7 +758,7 @@ NTSTATUS WINAPI RtlSetCurrentDirectory_U(const UNICODE_STRING* dir) #endif out: - if (buf) RtlFreeHeap(ntdll_get_process_heap(), 0, buf); + if (buf) RtlFreeHeap(GetProcessHeap(), 0, buf); RtlReleasePebLock(); diff --git a/dlls/ntdll/reg.c b/dlls/ntdll/reg.c index 7ab80bdbdce..b2131935875 100644 --- a/dlls/ntdll/reg.c +++ b/dlls/ntdll/reg.c @@ -312,7 +312,7 @@ NTSTATUS WINAPI RtlpNtEnumerateSubKey( HKEY handle, UNICODE_STRING *out, ULONG i if (out->Length) { dwLen = out->Length + sizeof(KEY_BASIC_INFORMATION); - info = (KEY_BASIC_INFORMATION*)RtlAllocateHeap( ntdll_get_process_heap(), 0, dwLen ); + info = (KEY_BASIC_INFORMATION*)RtlAllocateHeap( GetProcessHeap(), 0, dwLen ); if (!info) return STATUS_NO_MEMORY; } @@ -342,7 +342,7 @@ NTSTATUS WINAPI RtlpNtEnumerateSubKey( HKEY handle, UNICODE_STRING *out, ULONG i } if (info) - RtlFreeHeap( ntdll_get_process_heap(), 0, info ); + RtlFreeHeap( GetProcessHeap(), 0, info ); return ret; } @@ -515,7 +515,7 @@ NTSTATUS WINAPI RtlpNtQueryValueKey( HKEY handle, ULONG *result_type, PBYTE dest DWORD dwResultLen; DWORD dwLen = sizeof (KEY_VALUE_PARTIAL_INFORMATION) + result_len ? *result_len : 0; - info = (KEY_VALUE_PARTIAL_INFORMATION*)RtlAllocateHeap( ntdll_get_process_heap(), 0, dwLen ); + info = (KEY_VALUE_PARTIAL_INFORMATION*)RtlAllocateHeap( GetProcessHeap(), 0, dwLen ); if (!info) return STATUS_NO_MEMORY; @@ -534,7 +534,7 @@ NTSTATUS WINAPI RtlpNtQueryValueKey( HKEY handle, ULONG *result_type, PBYTE dest memcpy( dest, info->Data, info->DataLength ); } - RtlFreeHeap( ntdll_get_process_heap(), 0, info ); + RtlFreeHeap( GetProcessHeap(), 0, info ); return ret; } @@ -733,7 +733,7 @@ NTSTATUS WINAPI RtlFormatCurrentUserKeyPath( IN OUT PUNICODE_STRING KeyPath) ANSI_STRING AnsiPath; NTSTATUS ret; - if (!(buffer = RtlAllocateHeap( ntdll_get_process_heap(), 0, strlen(user)+16 ))) + if (!(buffer = RtlAllocateHeap( GetProcessHeap(), 0, strlen(user)+16 ))) return STATUS_NO_MEMORY; strcpy( buffer, "\\Registry\\User\\" ); diff --git a/dlls/ntdll/relay.c b/dlls/ntdll/relay.c index 48533178572..cdc5e1db269 100644 --- a/dlls/ntdll/relay.c +++ b/dlls/ntdll/relay.c @@ -825,7 +825,7 @@ void SNOOP_SetupDLL(HMODULE hmod) NtAllocateVirtualMemory(GetCurrentProcess(), &addr, NULL, &size, MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE); if (!addr) { - RtlFreeHeap(ntdll_get_process_heap(),0,*dll); + RtlFreeHeap(GetProcessHeap(),0,*dll); FIXME("out of memory\n"); return; } @@ -1019,7 +1019,7 @@ void WINAPI SNOOP_DoEntry( CONTEXT86 *context ) DPRINTF(" ..."); } else if (fun->nrofargs<0) { DPRINTF(""); - ret->args = RtlAllocateHeap(ntdll_get_process_heap(), + ret->args = RtlAllocateHeap(GetProcessHeap(), 0,16*sizeof(DWORD)); memcpy(ret->args,(LPBYTE)(context->Esp + 4),sizeof(DWORD)*16); } @@ -1059,7 +1059,7 @@ void WINAPI SNOOP_DoReturn( CONTEXT86 *context ) } DPRINTF(") retval=%08lx ret=%08lx\n", context->Eax,(DWORD)ret->origreturn ); - RtlFreeHeap(ntdll_get_process_heap(),0,ret->args); + RtlFreeHeap(GetProcessHeap(),0,ret->args); ret->args = NULL; } else diff --git a/dlls/ntdll/rtlstr.c b/dlls/ntdll/rtlstr.c index acc3f7bb1d9..2df9ab04a36 100644 --- a/dlls/ntdll/rtlstr.c +++ b/dlls/ntdll/rtlstr.c @@ -127,7 +127,7 @@ void WINAPI RtlInitString( */ void WINAPI RtlFreeAnsiString( PSTRING str ) { - if (str->Buffer) RtlFreeHeap( ntdll_get_process_heap(), 0, str->Buffer ); + if (str->Buffer) RtlFreeHeap( GetProcessHeap(), 0, str->Buffer ); } @@ -230,7 +230,7 @@ NTSTATUS WINAPI RtlInitUnicodeStringEx( BOOLEAN WINAPI RtlCreateUnicodeString( PUNICODE_STRING target, LPCWSTR src ) { int len = (strlenW(src) + 1) * sizeof(WCHAR); - if (!(target->Buffer = RtlAllocateHeap( ntdll_get_process_heap(), 0, len ))) return FALSE; + if (!(target->Buffer = RtlAllocateHeap( GetProcessHeap(), 0, len ))) return FALSE; memcpy( target->Buffer, src, len ); target->MaximumLength = len; target->Length = len - sizeof(WCHAR); @@ -266,7 +266,7 @@ BOOLEAN WINAPI RtlCreateUnicodeStringFromAsciiz( PUNICODE_STRING target, LPCSTR */ void WINAPI RtlFreeUnicodeString( PUNICODE_STRING str ) { - if (str->Buffer) RtlFreeHeap( ntdll_get_process_heap(), 0, str->Buffer ); + if (str->Buffer) RtlFreeHeap( GetProcessHeap(), 0, str->Buffer ); } @@ -331,7 +331,7 @@ NTSTATUS WINAPI RtlDuplicateUnicodeString( if (add_nul) { destination_max_len += sizeof(WCHAR); } /* if */ - destination->Buffer = RtlAllocateHeap(ntdll_get_process_heap(), 0, destination_max_len); + destination->Buffer = RtlAllocateHeap(GetProcessHeap(), 0, destination_max_len); if (destination->Buffer == NULL) { return STATUS_NO_MEMORY; } else { @@ -605,7 +605,7 @@ NTSTATUS WINAPI RtlAnsiStringToUnicodeString( if (doalloc) { uni->MaximumLength = total; - if (!(uni->Buffer = RtlAllocateHeap( ntdll_get_process_heap(), 0, total ))) + if (!(uni->Buffer = RtlAllocateHeap( GetProcessHeap(), 0, total ))) return STATUS_NO_MEMORY; } else if (total > uni->MaximumLength) return STATUS_BUFFER_OVERFLOW; @@ -642,7 +642,7 @@ NTSTATUS WINAPI RtlOemStringToUnicodeString( if (doalloc) { uni->MaximumLength = total; - if (!(uni->Buffer = RtlAllocateHeap( ntdll_get_process_heap(), 0, total ))) + if (!(uni->Buffer = RtlAllocateHeap( GetProcessHeap(), 0, total ))) return STATUS_NO_MEMORY; } else if (total > uni->MaximumLength) return STATUS_BUFFER_OVERFLOW; @@ -679,7 +679,7 @@ NTSTATUS WINAPI RtlUnicodeStringToAnsiString( if (doalloc) { ansi->MaximumLength = len; - if (!(ansi->Buffer = RtlAllocateHeap( ntdll_get_process_heap(), 0, len ))) + if (!(ansi->Buffer = RtlAllocateHeap( GetProcessHeap(), 0, len ))) return STATUS_NO_MEMORY; } else if (ansi->MaximumLength < len) @@ -725,7 +725,7 @@ NTSTATUS WINAPI RtlUnicodeStringToOemString( STRING *oem, if (doalloc) { oem->MaximumLength = len; - if (!(oem->Buffer = RtlAllocateHeap( ntdll_get_process_heap(), 0, len ))) + if (!(oem->Buffer = RtlAllocateHeap( GetProcessHeap(), 0, len ))) return STATUS_NO_MEMORY; } else if (oem->MaximumLength < len) @@ -940,7 +940,7 @@ NTSTATUS WINAPI RtlUpcaseUnicodeString( UNICODE_STRING *dest, if (doalloc) { dest->MaximumLength = len; - if (!(dest->Buffer = RtlAllocateHeap( ntdll_get_process_heap(), 0, len ))) + if (!(dest->Buffer = RtlAllocateHeap( GetProcessHeap(), 0, len ))) return STATUS_NO_MEMORY; } else if (len > dest->MaximumLength) return STATUS_BUFFER_OVERFLOW; @@ -980,7 +980,7 @@ NTSTATUS WINAPI RtlDowncaseUnicodeString( if (doalloc) { dest->MaximumLength = len; - if (!(dest->Buffer = RtlAllocateHeap( ntdll_get_process_heap(), 0, len ))) { + if (!(dest->Buffer = RtlAllocateHeap( GetProcessHeap(), 0, len ))) { return STATUS_NO_MEMORY; } /* if */ } else if (len > dest->MaximumLength) { @@ -1076,7 +1076,7 @@ NTSTATUS WINAPI RtlUpcaseUnicodeStringToCountedOemString( STRING *oem, if (doalloc) { oem->MaximumLength = len; - if (!(oem->Buffer = RtlAllocateHeap( ntdll_get_process_heap(), 0, len ))) + if (!(oem->Buffer = RtlAllocateHeap( GetProcessHeap(), 0, len ))) { ret = STATUS_NO_MEMORY; goto done; @@ -1111,10 +1111,10 @@ NTSTATUS WINAPI RtlUpcaseUnicodeToMultiByteN( LPSTR dst, DWORD dstlen, LPDWORD r LPWSTR upcase; DWORD i; - if (!(upcase = RtlAllocateHeap( ntdll_get_process_heap(), 0, srclen ))) return STATUS_NO_MEMORY; + if (!(upcase = RtlAllocateHeap( GetProcessHeap(), 0, srclen ))) return STATUS_NO_MEMORY; for (i = 0; i < srclen/sizeof(WCHAR); i++) upcase[i] = toupperW(src[i]); ret = RtlUnicodeToMultiByteN( dst, dstlen, reslen, upcase, srclen ); - RtlFreeHeap( ntdll_get_process_heap(), 0, upcase ); + RtlFreeHeap( GetProcessHeap(), 0, upcase ); return ret; } @@ -1134,10 +1134,10 @@ NTSTATUS WINAPI RtlUpcaseUnicodeToOemN( LPSTR dst, DWORD dstlen, LPDWORD reslen, LPWSTR upcase; DWORD i; - if (!(upcase = RtlAllocateHeap( ntdll_get_process_heap(), 0, srclen ))) return STATUS_NO_MEMORY; + if (!(upcase = RtlAllocateHeap( GetProcessHeap(), 0, srclen ))) return STATUS_NO_MEMORY; for (i = 0; i < srclen/sizeof(WCHAR); i++) upcase[i] = toupperW(src[i]); ret = RtlUnicodeToOemN( dst, dstlen, reslen, upcase, srclen ); - RtlFreeHeap( ntdll_get_process_heap(), 0, upcase ); + RtlFreeHeap( GetProcessHeap(), 0, upcase ); return ret; } @@ -2010,7 +2010,7 @@ NTSTATUS WINAPI RtlStringFromGUID(const GUID* guid, UNICODE_STRING *str) TRACE("(%p,%p)\n", guid, str); - str->Buffer = (WCHAR*)RtlAllocateHeap( ntdll_get_process_heap(), 0, 40 * sizeof(WCHAR)); + str->Buffer = (WCHAR*)RtlAllocateHeap( GetProcessHeap(), 0, 40 * sizeof(WCHAR)); if (!str->Buffer) { str->Length = str->MaximumLength = 0; diff --git a/dlls/ntdll/sec.c b/dlls/ntdll/sec.c index bfb2a1f562f..57bcaf3db52 100644 --- a/dlls/ntdll/sec.c +++ b/dlls/ntdll/sec.c @@ -78,7 +78,7 @@ BOOLEAN WINAPI RtlAllocateAndInitializeSid ( nSubAuthority0, nSubAuthority1, nSubAuthority2, nSubAuthority3, nSubAuthority4, nSubAuthority5, nSubAuthority6, nSubAuthority7, pSid); - if (!(*pSid = RtlAllocateHeap( ntdll_get_process_heap(), 0, + if (!(*pSid = RtlAllocateHeap( GetProcessHeap(), 0, RtlLengthRequiredSid(nSubAuthorityCount)))) return FALSE; @@ -166,7 +166,7 @@ BOOL WINAPI RtlEqualPrefixSid (PSID pSid1, PSID pSid2) DWORD WINAPI RtlFreeSid(PSID pSid) { TRACE("(%p)\n", pSid); - RtlFreeHeap( ntdll_get_process_heap(), 0, pSid ); + RtlFreeHeap( GetProcessHeap(), 0, pSid ); return STATUS_SUCCESS; }