看看那个对象没有free;或者装个Eurekalog查一下就知道了
解决方案 »
- 怎样才能实现更好的效果,移动的时候应该不要出现闪屏,转弯的时候不要出现太大的时间落差?
- Delphi字符串匹配,高手帮帮忙啊,我是初学者。。。非常感谢
- 一个简单的fastreport问题,解决了分拿去.
- 谁能解答用installshield 作delphi7.0的安装盘??(bde)
- 急,在线等,解决马上结贴给分。
- /***************在串口通信中如何设置RTS信号?*******************/
- 如何当前判定TStringGrid中哪一格被选定?还有如何判定TTreeView中是否有节点被选中?
- 求助!请问哪里有InstallShield Express For Delphi 6的汉化工具?主要是能汉化Build出来的安装盘.
- 急,关于报表的,无论高手低手都一律请入,分数陆续会加到600分!分数必分,决不食言!(VB转Delphi者求助!)
- 如何在工具栏上放一个ComboBox?
- 请问那个高手用过TnEmulVT组件?给讲一下。
- 请教各位大大一个关于dbgrideh控件问题
var
Item: TListItem;
mylist5:Tstringlist;
i,t,g:integer;
success: Integer;
hostname: PWideChar;
port: Integer;
channelNum: Integer;
termType: PWideChar;
widthInChars: Integer;
heightInChars: Integer;
pixWidth: Integer;
pixHeight: Integer;
n: Integer;
pollTimeoutMs: Integer;
cmdOutput:widestring;
begin
try
for i:=0 to mylist3.Count-1 do
begin
begin g:=0;
for t:=0 to mylist4.Count-1 do
begin
if g<mylist4.Count then
begin
try
mylist5:=Tstringlist.create;
mylist5.Clear;
try
success := ssh.UnlockComponent('30-day trial');
if (success <> 1) then
begin
mylist5.Add(ssh.LastErrorText);
end;
hostname := DoStrToWideChar( mylist4.Strings[g]);
port := 22;success := ssh.Connect(hostname,port);
if (success <> 1) then
begin
mylist5.Add(ssh.LastErrorText); end;ssh.IdleTimeoutMs :=4000;
//sleep(4000);
success := ssh.AuthenticatePw(Form1.Edit11.text,mylist3.Strings[i]);
if (success <> 1) then
begin
mylist5.Add(ssh.LastErrorText);
end;channelNum := ssh.OpenSessionChannel();
if (channelNum < 0) then
begin mylist5.Add(ssh.LastErrorText);
end;
termType := 'dumb';
widthInChars := 120;
heightInChars := 40;
pixWidth := 0;
pixHeight := 0;
success := ssh.SendReqPty(channelNum,termType,widthInChars,heightInChars,pixWidth,pixHeight);
if (success <> 1) then
begin
mylist5.Add(ssh.LastErrorText);
end;success := ssh.SendReqShell(channelNum);
if (success <> 1) then
begin
mylist5.Add(ssh.LastErrorText);
end;
success := ssh.ChannelSendString(channelNum,'ls'+ #13#10,'ansi');
if (success <> 1) then
begin
mylist5.Add(ssh.LastErrorText);
end;success := ssh.ChannelSendEof(channelNum);
if (success <> 1) then
begin
mylist5.Add(ssh.LastErrorText);
end;
pollTimeoutMs:=2000;
n := ssh.ChannelReadAndPoll(channelNum,pollTimeoutMs);
if (n < 0) then
begin
mylist5.Add(ssh.LastErrorText); end;success := ssh.ChannelSendClose(channelNum);
if (success <> 1) then
begin
mylist5.Add(ssh.LastErrorText);
end;
success := ssh.ChannelReceiveToClose(channelNum);
if (success <> 1) then
begin
mylist5.Add(ssh.LastErrorText);
end;cmdOutput := ssh.GetReceivedText(channelNum,'us-ascii');
if (Length(cmdOutput) = 0 ) then
begin
mylist5.Add(ssh.LastErrorText);
end;mylist5.Add(cmdOutput);
ssh.Disconnect();
except
end;
if (POS('#',mylist5.text)>0) or (POS('$',mylist5.text)>0) then
begin
Item := Form1.ListView1.Items.Add;
Item.Caption:=inttostr(Form1.ListView1.Items.Count);
Item.SubItems.Add(Form1.Edit11.text);
Item.SubItems.Add(mylist3.Strings[i]);
Item.SubItems.Add(mylist4.Strings[g]);
Item.SubItems.Add(DateTimeToStr(now()));
// Form1.Memo7.Lines.Add('用户名:'+b+' '+'密码:'+a+' '+'ip地址:'+c); end;
//
Form1.listview2.Items[0].SubItems.strings[0]:=mylist3.Strings[i];
Form1.listview2.Items[0].SubItems.strings[1]:=mylist4.Strings[g];
g:=g+100;
mylist5.Free;
except
end;
end;
if i= mylist3.Count-1 thenbegin
Form1.listview2.Items[0].SubItems.strings[2]:='完成';end;
ClearMemory;
end; end; end;
except
end;
Result :=0;
end;
aList := TStringList.Create;
try
//....
finally
aList .Clear;
aList .Free;
end;