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.…
==============================================================================
--- 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)
{