regSetExpandString function
void
regSetExpandString(})
Sets the value
of the hkey
located at hkey
/subKey
in the Windows
Registry. The value
is set to type REG_EXPAND_SZ.
A WindowsException
is thrown the call falls.
Implementation
void regSetExpandString(
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_EXPAND_SZ,
accessRights: accessRights);
} finally {
calloc.free(pValue);
}
}