INtime SDK Help
RegCloseKey (iwin32)
INtime SDK v7.1 > About INtime > Alternate APIs > iwin32 API > iwin32 API > RegCloseKey (iwin32)

Releases the specified key's handle.

LONG RegCloseKey(
    HKEY hKey
);

Parameters

hKey
Handle to the open key to close.

Remarks

This function does not necessarily write information to the registry before returning; it can take as much as several seconds for the cache to flush to the hard disk. If an application must explicitly write registry information to the hard disk, it can use RegFlushKey.

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

Return Values

ERROR_SUCCESS
Success.
A nonzero status code defined in RTWIN32.H.
Failure. For extended error information, see GetLastError.

Requirements

Versions Defined in Include Link to
INtime 3.0 intime/rt/include/iwin32.h iwin32.h
iwin32rt.h
rt.lib

Note

This function operates in the real-time portion of your application.

See Also

RegCreateKeyEx, RegDeleteKey, RegFlushKey, RegOpenKeyEx, RegSetValueEx, iwin32 API, iwin32 Overview