Extensions Reference
Extensions Reference > exRegistry
regSetDword
bool regSetDword(string Valuename, dword Valuedata);
Writes a DWORD value to the registry
The REGSETDWORD 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.
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 a DWORD to MyDwordVal in the open key
BOOL Result = regSetDword("MyDwordVal", 0x1234ABCD);
regCloseKey();
}