Hi,
I have been using this for a couple of years now with no problem:
procedure serialports2combobox(var cb: tcombobox);
var reg : tregistry;sl : tstringlist;i : integer;
begin
Reg:=TRegistry.Create;
sl :=TStringList.Create;
try
Reg.RootKey:=HKEY_LOCAL_MACHINE; //
Section to look for within the registry
reg.access := key_read;
if Reg.OpenKey('hardware\devicemap\serialcomm',False) then begin
Reg.GetValueNames(sl);
cb.clear;
I:=0;
while i < sl.Count do begin
cb.items.add(reg.ReadString(sl[i]));
inc(i);
end;
end;
except
end;
sl.Free;
Reg.Free;
end;
Mit freundlichen Grüßen / with kind regards
Christian Rutkowski
MicroBX GmbH
Heilbronner Str. 30
D - 74223 Flein
Fon +49-7131/27914-20
Fax +49-7131/27914-23
<mailto:christian.rutkow...@microbx.de>christian.rutkow...@microbx.de
www.microbx.de
Geschäftsführer: Frank Ammann, Christian Rutkowski
Registergericht: Amtsgericht Stuttgart
Registernummer: HRB 741154
DISCLAIMER:
This Electronic Mail and any attached information
are confidential and may also be privileged. It
is intended only for the use of authorized
persons. If you are not empowered to do so, or if
you are not an addressee, or have received the
message in error, you are not authorized to read,
copy, disseminate, distribute or use the
Electronic Mail or any attachment in any way.
Please notify the sender by return E-Mail and delete this e-mail.
__________________________________________________
Delphi-Talk mailing list -> Delphi-Talk@elists.org
http://lists.elists.org/cgi-bin/mailman/listinfo/delphi-talk