Extensions Reference
Extensions Reference > exRegistry
regCloseKey
void regCloseKey();
Closes the open registry key
The REGCLOSEKEY function closes a previously opened registry key (opened by exRegistry::regOpenKey or exRegistry::regCreateKey). If no key is currently open, this function does nothing.
Although the closing of an open key is automatic once the plugin exits, it is good practice to manually close an open key using this function once you are finished with it. Leaving a key open may affect other applications (for example, if they wish to update or delete the key you are holding open they may fail).
Parameters
None
Return Value
None. This function always succeeds.
Example Code
// Open the Brass registry key for the current user
if(regOpenKey("HKCU", "Software\\32Bits\\Brass") == True)
{
// Do something
// Finished with this key
regCloseKey();
}