Extensions Reference

Extensions Reference > exRegistry


regCheckExists

bool regCheckExists(string Valuename);

 

Checks whether a value already exists in the registry

The REGCHECKEXISTS function checks to see whether the specified value already exists in the currently opened registry key. The key must have been previously opened by exRegistry::regOpenKey or exRegistry::regCreateKey.

 

Parameters

Valuename

The name of the value to check for existence.

 

Return Value

If the value exists, this function returns TRUE. If the value does not exist or a registry key has not been previously opened this function returns FALSE.

 

Example Code

// Open the Brass registry key for the current user
if(regOpenKey("HKCU", "Software\\32Bits\\Brass") == True)
{
    // Does the ConfirmExit value exist in this key?
    if(regCheckExists("ConfirmExit") == True)
    {
        // Act on ConfirmExit value
    }
    else
    {
        // ConfirmExit doesn't exist, perform action
    }
}