[ros-diffs] [jgardou] 56058: [UXTHEME] - fix a few winetest Patch by Ben Pye (bfhben __ gmail __ com)

jgardou at svn.reactos.org jgardou at svn.reactos.org
Mon Mar 5 20:21:43 UTC 2012


Author: jgardou
Date: Mon Mar  5 20:21:43 2012
New Revision: 56058

URL: http://svn.reactos.org/svn/reactos?rev=56058&view=rev
Log:
[UXTHEME]
 - fix a few winetest
Patch by Ben Pye (bfhben __ gmail __ com)

Modified:
    trunk/reactos/dll/win32/uxtheme/system.c

Modified: trunk/reactos/dll/win32/uxtheme/system.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/uxtheme/system.c?rev=56058&r1=56057&r2=56058&view=diff
==============================================================================
--- trunk/reactos/dll/win32/uxtheme/system.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/uxtheme/system.c [iso-8859-1] Mon Mar  5 20:21:43 2012
@@ -630,6 +630,9 @@
     LPCWSTR pszUseClassList;
     HTHEME hTheme = NULL;
     TRACE("(%p,%s)\n", hwnd, debugstr_w(pszClassList));
+    
+    if(pszClassList == NULL)
+		SetLastError(E_POINTER);
 
     if(bThemeActive)
     {
@@ -645,6 +648,7 @@
     if(IsWindow(hwnd))
         SetPropW(hwnd, (LPCWSTR)MAKEINTATOM(atWindowTheme), hTheme);
     TRACE(" = %p\n", hTheme);
+
     return hTheme;
 }
 
@@ -662,6 +666,9 @@
 HTHEME WINAPI GetWindowTheme(HWND hwnd)
 {
     TRACE("(%p)\n", hwnd);
+	if(!IsWindow(hwnd))
+		SetLastError(E_HANDLE);
+
     return GetPropW(hwnd, (LPCWSTR)MAKEINTATOM(atWindowTheme));
 }
 
@@ -673,9 +680,11 @@
 HRESULT WINAPI SetWindowTheme(HWND hwnd, LPCWSTR pszSubAppName,
                               LPCWSTR pszSubIdList)
 {
+	if(!IsWindow(hwnd))
+		return E_HANDLE;
+
     HRESULT hr;
     TRACE("(%p,%s,%s)\n", hwnd, debugstr_w(pszSubAppName),
-          debugstr_w(pszSubIdList));
     hr = UXTHEME_SetWindowProperty(hwnd, atSubAppName, pszSubAppName);
     if(SUCCEEDED(hr))
         hr = UXTHEME_SetWindowProperty(hwnd, atSubIdList, pszSubIdList);




More information about the Ros-diffs mailing list