procedure TForm1.Button3Click(Sender: TObject);
var err_srv,err_init:integer;
host,
ip,ip2:string;
dtr,rts:boolean;
ChannelsInfo : Array[0..1023] of TtsrChannelInfo;
Records : Integer;
I: integer;
MyTreeNode1, MyTreeNode2: TTreeNode;
begin
ImageList1.GetBitmap(0,BitBtn1.Glyph);
{channels.Enabled:=true;
try
err_init:=tsrGetChannels(@ChannelsInfo, @records);
except
if not (err_init = 0) then
showmessage('ERROR');
end;
showmessage(inttostr(Records));
tvchannels.Items.Clear; { Vorhandene Knoten entfernen
if Records > 0 then
for I :=0 to Records-1 do tvchannels.Items.Add(nil,ChannelsInfo[I].Name); }
try
err_init:=tsrGetChannels(@ChannelsInfo, @records);
except
if not (err_init = 0) then
showmessage('ERROR');
end;
tvchannels.Items.Clear; { Vorhandene Knoten entfernen }
if Records > 0 then
for I :=0 to Records-1 do begin
if ChannelsInfo[I].ChannelParentID = -1 then
tvchannels.Items.Add(nil,ChannelsInfo[I].Name)
else
begin
tvchannels.Items.AddChild(tvchannels.Selected,ChannelsInfo[I].Name);
end;
end;
end;