diff --git a/dlls/user32/user_main.c b/dlls/user32/user_main.c index f1b169a9741..c27e6add071 100644 --- a/dlls/user32/user_main.c +++ b/dlls/user32/user_main.c @@ -184,9 +184,14 @@ static NTSTATUS WINAPI User32RenderSsynthesizedFormat( const struct render_synth return 0; } -static BOOL WINAPI User32LoadDriver( const WCHAR *path, ULONG size ) +static NTSTATUS WINAPI User32LoadDriver( void *args, ULONG size ) { - return LoadLibraryW( path ) != NULL; + const WCHAR *path = args; + UNICODE_STRING str; + HMODULE module; + + RtlInitUnicodeString( &str, path ); + return LdrLoadDll( L"c:\\windows\\system32", 0, &str, &module ); } static NTSTATUS WINAPI User32UnpackDDEMessage( void *args, ULONG size ) diff --git a/dlls/win32u/driver.c b/dlls/win32u/driver.c index fcfb7d55d54..7fcdbc4c383 100644 --- a/dlls/win32u/driver.c +++ b/dlls/win32u/driver.c @@ -1019,8 +1019,7 @@ static BOOL load_desktop_driver( HWND hwnd ) { void *ret_ptr; ULONG ret_len; - ret = KeUserModeCallback( NtUserLoadDriver, info->Data, info->DataLength, - &ret_ptr, &ret_len ); + ret = !KeUserModeCallback( NtUserLoadDriver, info->Data, info->DataLength, &ret_ptr, &ret_len ); } else {