Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
type
TMultiRegistry = class ( TRegistry )
public
function ReadMultiString ( const name: string; s: TStringList; size: integer ): boolean;
end;
function TMultiRegistry.ReadMultiString(const name: string; s: TStringList): boolean;
var
RegData: TRegDataType;
Info: TRegDataInfo;
buffer: pchar;
ptr: pchar;
begin
s.Clear;
if GetDataInfo(Name, Info) then begin
GetMem ( buffer, info.DataSize );
ReadBinaryData ( name, buffer^, info.DataSize );
ptr := buffer;
while ( ptr^ <> #0 ) do begin
s.Add( ptr );
inc ( ptr, StrLen(ptr) + 1 );
end;
FreeMem ( buffer );
result := true;
end
else
result := false;
end;
procedure TForm1.Button1Click(Sender: TObject);
const
Item = 'DriverName';
var
r: TMultiRegistry;
ss: TStringList;
begin
ss := TStringList.Create;
try
r := TMultiRegistry.Create;
r.RootKey := HKEY_LOCAL_MACHINE;
if r.OpenKey( 'SOFTWARE\Handspring, Inc.\USB\', False ) then
r.ReadMultiString ( Item, ss );
listbox.items.assign ( ss );
finally
ss.free;
end;
end;