Saving a text string to the registry.
function RegSetString(iRootKey: cardinal; sName: string; sValue: string): boolean;
Parameter |
Type |
Value |
---|---|---|
iRootKey |
cardinal |
registry root. List of available keys; |
sName |
string |
branch, registry key, where the text string is saved; |
sValue |
string |
key value. |
Boolean value. True, if the function completed successfully; False, if the error occurs.
var
sToday: string;
begin
sToday := FormatDateTime('mmddyyyy', Now);
RegSetString(HKEY_CURRENT_USER, 'Software\MyChatServerScripts\CurrentDate', sToday);
end.