winecrt0: Avoid A->W conversion in initialization code.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2022-04-27 15:52:42 +02:00
parent f68cccc825
commit 7c6f6d2775
2 changed files with 2 additions and 2 deletions

View File

@ -51,7 +51,7 @@ static void load_func( void **func, const char *name, void *def )
if (!*func)
{
DWORD err = GetLastError();
HMODULE module = GetModuleHandleA( "ntdll.dll" );
HMODULE module = GetModuleHandleW( L"ntdll.dll" );
void *proc = GetProcAddress( module, name );
InterlockedExchangePointer( func, proc ? proc : def );
SetLastError( err );

View File

@ -35,7 +35,7 @@ static void load_func( void **func, const char *name, void *def )
{
if (!*func)
{
HMODULE module = GetModuleHandleA( "ntdll.dll" );
HMODULE module = GetModuleHandleW( L"ntdll.dll" );
void *proc = GetProcAddress( module, name );
InterlockedExchangePointer( func, proc ? proc : def );
}