Skip to content

Latest commit

 

History

History
51 lines (33 loc) · 1.17 KB

CeRegCloseKey.md

File metadata and controls

51 lines (33 loc) · 1.17 KB

Home

Function name : CeRegCloseKey

Group: Remote Application Programming (RAPI) - Library: rapi


This function releases the handle of the specified key.


Code examples:

Pocket PC: custom RAPI class for operating with the System Registry

Declaration:

LONG CeRegCloseKey(
  HKEY hKey
);  

FoxPro declaration:

DECLARE INTEGER CeRegCloseKey IN rapi;
	INTEGER hKey  

Parameters:

hKey [in] Handle to the open key to close.


Return value:

ERROR_SUCCESS (0) indicates success.


Comments:

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.

The CeRegCloseKey function always writes information to the registry before returning, eliminating the need to flush keys in the Windows CE registry.

See also: CeRegOpenKeyEx function.