B
bjf2001
Unregistered / Unconfirmed
GUEST, unregistred user!
我现在要实现远程关机的功能(数据库中已经有远程主机的名称),利用循环,从第一条开始
发送到最后一条,不过要出现错误,错误代码如下:windows socket error:wsalookup servicenext
不能返回更多结果(11001),on api 'async lookup'
我已经在socket中onerror中实现errorcode=0
源代码如下:
procedure Tfrm_main.N20Click(Sender: TObject);
var hostname: string;
begin
with dm.ado_computer_user do
begin
first;
while not eof do
begin
hostname := dm.ado_computer_user.fieldbyname('name').asstring;
with clientsocket1 do
begin
close;
host := trim(hostname);
port := 100;
try
open;
except
close;
end;
showmessage(host);
socket.sendtext('down_computer'); //关闭计算机
end;
next;
end;
clientsocket1.close;
end;
end;
各位大侠快救我!
发送到最后一条,不过要出现错误,错误代码如下:windows socket error:wsalookup servicenext
不能返回更多结果(11001),on api 'async lookup'
我已经在socket中onerror中实现errorcode=0
源代码如下:
procedure Tfrm_main.N20Click(Sender: TObject);
var hostname: string;
begin
with dm.ado_computer_user do
begin
first;
while not eof do
begin
hostname := dm.ado_computer_user.fieldbyname('name').asstring;
with clientsocket1 do
begin
close;
host := trim(hostname);
port := 100;
try
open;
except
close;
end;
showmessage(host);
socket.sendtext('down_computer'); //关闭计算机
end;
next;
end;
clientsocket1.close;
end;
end;
各位大侠快救我!