Extensions Reference
Extensions Reference > exRegistry
regSetInt
bool regSetInt(string Valuename, int Valuedata);
Writes a Shiny INT type to a DWORD value to the registry
The REGSETINT function sets the contents of the specified value in a previously opened registry key (opened by exRegistry::regOpenKey or exRegistry::regCreateKey).If the value exists it's contents are changed. If the value doesn't exist it is created.
Note: There is no integer type in the Windows registry. This function is provided for ease of use, and converts the INT parameter to a DWORD internally. This is more user friendly and faster than using implicit type conversion.
The value must be of type REG_DWORD if it already exists.
Parameters
Valuename
The name of the value to write the contents to.
Valuedata
The data to write to the value
Return Value
True if writing succeeded, otherwise False.
Example Code
// Open the Brass registry key for the current user
if(regOpenKey("HKCU", "Software\\32Bits\\Brass") == True)
{
// Write an int to MyVal in the open key
BOOL Result = regSetInt("MyVal", 99);
regCloseKey();
}