kernelbase: Avoid calling some kernel32 functions.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
7157160865
commit
a3b8e944e6
|
@ -2687,10 +2687,10 @@ static LONG load_mui_string(const WCHAR *file_name, UINT res_id, WCHAR *buffer,
|
||||||
return ERROR_NOT_ENOUGH_MEMORY;
|
return ERROR_NOT_ENOUGH_MEMORY;
|
||||||
GetFullPathNameW(file_name, size, full_name, NULL);
|
GetFullPathNameW(file_name, size, full_name, NULL);
|
||||||
|
|
||||||
EnterCriticalSection(®_mui_cs);
|
RtlEnterCriticalSection(®_mui_cs);
|
||||||
size = reg_mui_cache_get(full_name, res_id, &string);
|
size = reg_mui_cache_get(full_name, res_id, &string);
|
||||||
if (!size) {
|
if (!size) {
|
||||||
LeaveCriticalSection(®_mui_cs);
|
RtlLeaveCriticalSection(®_mui_cs);
|
||||||
|
|
||||||
/* Load the file */
|
/* Load the file */
|
||||||
hModule = LoadLibraryExW(full_name, NULL,
|
hModule = LoadLibraryExW(full_name, NULL,
|
||||||
|
@ -2705,9 +2705,9 @@ static LONG load_mui_string(const WCHAR *file_name, UINT res_id, WCHAR *buffer,
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
EnterCriticalSection(®_mui_cs);
|
RtlEnterCriticalSection(®_mui_cs);
|
||||||
reg_mui_cache_put(full_name, res_id, string, size);
|
reg_mui_cache_put(full_name, res_id, string, size);
|
||||||
LeaveCriticalSection(®_mui_cs);
|
RtlLeaveCriticalSection(®_mui_cs);
|
||||||
}
|
}
|
||||||
*req_chars = size + 1;
|
*req_chars = size + 1;
|
||||||
|
|
||||||
|
@ -2739,7 +2739,7 @@ cleanup:
|
||||||
if (hModule)
|
if (hModule)
|
||||||
FreeLibrary(hModule);
|
FreeLibrary(hModule);
|
||||||
else
|
else
|
||||||
LeaveCriticalSection(®_mui_cs);
|
RtlLeaveCriticalSection(®_mui_cs);
|
||||||
heap_free(full_name);
|
heap_free(full_name);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -866,7 +866,7 @@ static void CDECL start_fiber(void)
|
||||||
__TRY
|
__TRY
|
||||||
{
|
{
|
||||||
start( fiber->param );
|
start( fiber->param );
|
||||||
ExitThread( 1 );
|
RtlExitUserThread( 1 );
|
||||||
}
|
}
|
||||||
__EXCEPT(UnhandledExceptionFilter)
|
__EXCEPT(UnhandledExceptionFilter)
|
||||||
{
|
{
|
||||||
|
@ -996,7 +996,7 @@ void WINAPI DECLSPEC_HOTPATCH DeleteFiber( LPVOID fiber_ptr )
|
||||||
if (fiber == NtCurrentTeb()->Tib.u.FiberData)
|
if (fiber == NtCurrentTeb()->Tib.u.FiberData)
|
||||||
{
|
{
|
||||||
HeapFree( GetProcessHeap(), 0, fiber );
|
HeapFree( GetProcessHeap(), 0, fiber );
|
||||||
ExitThread(1);
|
RtlExitUserThread( 1 );
|
||||||
}
|
}
|
||||||
RtlFreeUserStack( fiber->stack_allocation );
|
RtlFreeUserStack( fiber->stack_allocation );
|
||||||
HeapFree( GetProcessHeap(), 0, fiber->fls_slots );
|
HeapFree( GetProcessHeap(), 0, fiber->fls_slots );
|
||||||
|
|
Loading…
Reference in New Issue