mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 01:39:30 +00:00
[ADVAPI32] Do not report failure when closing a predefined registry key.
svn path=/trunk/; revision=72550
This commit is contained in:
parent
e61bc91d97
commit
865a118a60
1 changed files with 6 additions and 1 deletions
|
@ -425,11 +425,16 @@ RegCloseKey(HKEY hKey)
|
|||
NTSTATUS Status;
|
||||
|
||||
/* don't close null handle or a pseudo handle */
|
||||
if ((!hKey) || (((ULONG_PTR)hKey & 0xF0000000) == 0x80000000))
|
||||
if (!hKey)
|
||||
{
|
||||
return ERROR_INVALID_HANDLE;
|
||||
}
|
||||
|
||||
if (((ULONG_PTR)hKey & 0xF0000000) == 0x80000000)
|
||||
{
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
Status = NtClose(hKey);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue