mirror of
https://github.com/reactos/reactos.git
synced 2024-09-12 05:43:24 +00:00
return ERROR_INVALID_HANDLE when hKey is invalid
ReactOS passes now 88 of 89 advapi32_winetest registry tests svn path=/trunk/; revision=22185
This commit is contained in:
parent
72af90afdf
commit
404b530e5b
|
@ -2772,6 +2772,11 @@ RegOpenKeyA (HKEY hKey,
|
|||
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)
|
||||
{
|
||||
|
@ -2799,6 +2804,11 @@ RegOpenKeyW (HKEY hKey,
|
|||
{
|
||||
TRACE("RegOpenKeyW hKey 0x%x lpSubKey %S phkResult %p\n", hKey, lpSubKey, phkResult);
|
||||
|
||||
if (!hKey && lpSubKey && phkResult)
|
||||
{
|
||||
return ERROR_INVALID_HANDLE;
|
||||
}
|
||||
|
||||
if (!lpSubKey || !*lpSubKey)
|
||||
{
|
||||
*phkResult = hKey;
|
||||
|
|
Loading…
Reference in a new issue