![]() |
|
|
#1
|
|||
|
|||
|
Как записать в реестр
WORD значение без TRegistry. Я нашел запись строкового, но мне нужно dword?строковое: Код:
function RegWriteStr(RootKey: HKEY; Key, Name, Value: string): Boolean;
var
Handle: HKEY;
Res: LongInt;
begin
Result := False;
Res := RegCreateKeyEx(RootKey, PChar(Key), 0, nil, REG_OPTION_NON_VOLATILE,
KEY_ALL_ACCESS, nil, Handle, nil);
if Res <> ERROR_SUCCESS then
Exit;
Res := RegSetValueEx(Handle, PChar(Name), 0, REG_SZ, PChar(Value),
Length(Value) + 1);
Result := Res = ERROR_SUCCESS;
RegCloseKey(Handle);
end;Последний раз редактировалось Admin, 07.05.2011 в 17:16. |