Module: wine Branch: master Commit: d06192afe92f94f349cc09f73695930876c7d300 URL: https://gitlab.winehq.org/wine/wine/-/commit/d06192afe92f94f349cc09f73695930...
Author: Alexandre Julliard julliard@winehq.org Date: Fri Jan 19 14:23:24 2024 +0100
user32: Return a proper NTSTATUS in the load driver callback.
---
dlls/user32/user_main.c | 9 +++++++-- dlls/win32u/driver.c | 3 +-- 2 files changed, 8 insertions(+), 4 deletions(-)
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 {