regSetString function
void
regSetString(})
Sets a Windows registry key to a string value of type REG_SZ.
A WindowsException
is thrown the call falls.
Implementation
void regSetString(
int hkey,
String subKey,
String valueName,
String value, {
int accessRights = KEY_SET_VALUE,
}) {
final pValue = TEXT(value);
try {
_regSetValue(
hkey, subKey, valueName, pValue.cast(), (value.length + 1) * 2, REG_SZ,
accessRights: accessRights);
} finally {
calloc.free(pValue);
}
}