[ros-diffs] [janderwald] 22185: return ERROR_INVALID_HANDLE when hKey is invalid ReactOS passes now 88 of 89 advapi32_winetest registry tests

janderwald at svn.reactos.org janderwald at svn.reactos.org
Fri Jun 2 21:02:21 CEST 2006


Author: janderwald
Date: Fri Jun  2 23:02:21 2006
New Revision: 22185

URL: http://svn.reactos.ru/svn/reactos?rev=22185&view=rev
Log:
return ERROR_INVALID_HANDLE when hKey is invalid
ReactOS passes now 88 of 89 advapi32_winetest registry tests

Modified:
    trunk/reactos/dll/win32/advapi32/reg/reg.c

Modified: trunk/reactos/dll/win32/advapi32/reg/reg.c
URL: http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/advapi32/reg/reg.c?rev=22185&r1=22184&r2=22185&view=diff
==============================================================================
--- trunk/reactos/dll/win32/advapi32/reg/reg.c (original)
+++ trunk/reactos/dll/win32/advapi32/reg/reg.c Fri Jun  2 23:02:21 2006
@@ -2772,6 +2772,11 @@
 	     PHKEY phkResult)
 {
 	TRACE("RegOpenKeyA hKey 0x%x lpSubKey %s phkResult %p\n", hKey, lpSubKey, phkResult);
+	
+	if (!hKey && lpSubKey && phkResult)
+	{
+		return ERROR_INVALID_HANDLE;
+	}
 
 	if (!lpSubKey || !*lpSubKey)
 	{
@@ -2798,6 +2803,11 @@
 	     PHKEY phkResult)
 {
 	TRACE("RegOpenKeyW hKey 0x%x lpSubKey %S phkResult %p\n", hKey, lpSubKey, phkResult);
+
+	if (!hKey && lpSubKey && phkResult)
+	{
+		return ERROR_INVALID_HANDLE;
+	}
 
 	if (!lpSubKey || !*lpSubKey)
 	{




More information about the Ros-diffs mailing list