mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 09:50:02 +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
1 changed files with 10 additions and 0 deletions
|
@ -2773,6 +2773,11 @@ RegOpenKeyA (HKEY hKey,
|
|||
{
|
||||
TRACE("RegOpenKeyA hKey 0x%x lpSubKey %s phkResult %p\n", hKey, lpSubKey, phkResult);
|
||||
|
||||
if (!hKey && lpSubKey && phkResult)
|
||||
{
|
||||
return ERROR_INVALID_HANDLE;
|
||||
}
|
||||
|
||||
if (!lpSubKey || !*lpSubKey)
|
||||
{
|
||||
*phkResult = hKey;
|
||||
|
@ -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