RegCloseKey

RegCloseKey a handle to the specified registry key.

Syntax

Copy
LONG RegCloseKey(
    HKEY  hKey 
  );

Parameters

hKey

A handle to the open key to be closed. The handle must have been opened by the RegCreateKey, RegCreateKeyEx, RegOpenKey or RegOpenKeyEx function.

Return Value

If the function succeeds, the return value is ERROR_SUCCESS. If the function fails, the return value is a nonzero error code.

Remarks

The handle for a specified key should not be used after it has been closed, because it will no longer be valid. Key handles should not be left open any longer than necessary.

Requirements

Minimum supported version Header Library

eRTOS 1.0 SDK

windows.h rtkrnl.lib

See Also: