INtime SDK Help
RtRegCloseKey
INtime SDK v6 > About INtime > INtime Kernel > Registry access > RtRegCloseKey

Releases a handle to the specified key.

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 left open any longer than necessary.

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

LONG RtRegCloseKey(
    HKEY hKey   // handle to key to close
);

Parameters

hKey
Handle to the open key to close.

Return Values

ERROR_SUCCESS
Success.
A nonzero status code defined in RTWIN32.H.
Failure.

Requirements

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

See Also

Registry system calls, RtRegFlushKey, RtRegCreateKeyEx, RtRegDeleteKey, RtRegOpenKeyEx, RtRegSetValueEx