From: Rémi Bernon rbernon@codeweavers.com
--- dlls/user32/class.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/dlls/user32/class.c b/dlls/user32/class.c index 8c8be33dc46..bd43618a4b9 100644 --- a/dlls/user32/class.c +++ b/dlls/user32/class.c @@ -568,8 +568,6 @@ ATOM get_class_info( HINSTANCE instance, const WCHAR *class_name, WNDCLASSEXW *i init_class_name( &name, class_name ); get_class_version( &name, NULL, &module );
- if (!name_str && !instance) instance = user32_module; - while (!(atom = NtUserGetClassInfoEx( instance, &name, info, NULL, ansi ))) { if (module) @@ -605,11 +603,11 @@ ATOM get_class_info( HINSTANCE instance, const WCHAR *class_name, WNDCLASSEXW *i /*********************************************************************** * GetClassInfoExA (USER32.@) */ -BOOL WINAPI GetClassInfoExA( HINSTANCE hInstance, LPCSTR name, WNDCLASSEXA *wc ) +BOOL WINAPI GetClassInfoExA( HINSTANCE instance, const char *class_name, WNDCLASSEXA *wc ) { ATOM atom;
- TRACE("%p %s %p\n", hInstance, debugstr_a(name), wc); + TRACE( "%p %s %p\n", instance, debugstr_a(class_name), wc );
if (!wc) { @@ -617,15 +615,16 @@ BOOL WINAPI GetClassInfoExA( HINSTANCE hInstance, LPCSTR name, WNDCLASSEXA *wc ) return FALSE; }
- if (!IS_INTRESOURCE(name)) + if (!instance) instance = user32_module; + if (!IS_INTRESOURCE(class_name)) { WCHAR nameW[MAX_ATOM_LEN + 1]; - if (!MultiByteToWideChar( CP_ACP, 0, name, -1, nameW, ARRAY_SIZE( nameW ))) + if (!MultiByteToWideChar( CP_ACP, 0, class_name, -1, nameW, ARRAY_SIZE( nameW ))) return FALSE; - atom = get_class_info( hInstance, nameW, (WNDCLASSEXW *)wc, NULL, TRUE ); + atom = get_class_info( instance, nameW, (WNDCLASSEXW *)wc, NULL, TRUE ); } - else atom = get_class_info( hInstance, (const WCHAR *)name, (WNDCLASSEXW *)wc, NULL, TRUE ); - if (atom) wc->lpszClassName = name; + else atom = get_class_info( instance, (const WCHAR *)class_name, (WNDCLASSEXW *)wc, NULL, TRUE ); + if (atom) wc->lpszClassName = class_name;
/* We must return the atom of the class here instead of just TRUE. */ return atom; @@ -635,11 +634,11 @@ BOOL WINAPI GetClassInfoExA( HINSTANCE hInstance, LPCSTR name, WNDCLASSEXA *wc ) /*********************************************************************** * GetClassInfoExW (USER32.@) */ -BOOL WINAPI GetClassInfoExW( HINSTANCE hInstance, LPCWSTR name, WNDCLASSEXW *wc ) +BOOL WINAPI GetClassInfoExW( HINSTANCE instance, const WCHAR *class_name, WNDCLASSEXW *wc ) { ATOM atom;
- TRACE("%p %s %p\n", hInstance, debugstr_w(name), wc); + TRACE( "%p %s %p\n", instance, debugstr_w(class_name), wc );
if (!wc) { @@ -647,8 +646,9 @@ BOOL WINAPI GetClassInfoExW( HINSTANCE hInstance, LPCWSTR name, WNDCLASSEXW *wc return FALSE; }
- atom = get_class_info( hInstance, name, wc, NULL, FALSE ); - if (atom) wc->lpszClassName = name; + if (!instance) instance = user32_module; + atom = get_class_info( instance, class_name, wc, NULL, FALSE ); + if (atom) wc->lpszClassName = class_name;
/* We must return the atom of the class here instead of just TRUE. */ return atom;