如何读取 REG_MULTI_SZ 的值??(100分)

K

knifepj

Unregistered / Unconfirmed
GUEST, unregistred user!
如何读取 REG_MULTI_SZ 的值??
我用 readstring 出错
 

三石

Unregistered / Unconfirmed
GUEST, unregistred user!
用ReadString读不出来的。REG_MULTI_SZ是多重字符串
直接用RegQueryValueEx
For Example:
RegInfo := tRegistry.Create;
try
RegInfo.RootKey := HKEY_LOCAL_MACHINE;
if RegInfo_OpenKey('SYSTEM/CurrentControlSet/Services/Tcpip/Parameters/Interfaces/', False) then
begin
WriteString := 'abc' + #0#0;
WriteError := RegSetValueEx(RegInfo.CurrentKey, PChar('HEX1500'), 0, REG_MULTI_SZ, @WriteString[1], Length(WriteString));
if WriteError <> ERROR_SUCCESS then
begin
ErrorString := ErrorString + '信息修改出错1!';
end;
end;
finally
reginfo.Free;
end;
 
K

knifepj

Unregistered / Unconfirmed
GUEST, unregistred user!
REG_FULL_RESOURCE_DECRIPTOR 也可用这个函数吗?
 
K

knifepj

Unregistered / Unconfirmed
GUEST, unregistred user!
请问,如何用DELPHI搜索注册表的全部项、鍵???
 
顶部