Sorry hatte die falsche Funktion erwischt, da fehlte noch einiges ...
Delphi-Quellcode:
sl := TStringlist.Create;
try
reg := TRegistry.Create;
try
reg.RootKey := HKEY_LOCAL_MACHINE;
reg.OpenKeyReadOnly('hardware\devicemap\serialcomm');
reg.GetValueNames(sl);
SetLength(fComPort, Length(sl));
for i := 0 to sl.Count - 1 do begin
fComPort[i].Name := reg.ReadString(sl[i]);
fComPort[i].Details := sl[i];
end;
reg.CloseKey;
finally
FreeAndNil(reg);
end;
finally
FreeAndNil(sl);
end;