Y yukaikai Unregistered / Unconfirmed GUEST, unregistred user! 2002-11-25 #1 一、 计算机A当前访问正在访问计算机B、C、D等 如何得到B、C、D的IP地址? 二、 如何终止计算机A与计算机B的连接? 谢谢!
N naughtboy Unregistered / Unconfirmed GUEST, unregistred user! 2002-11-25 #4 1.function GetIPFromName(Name: string): string; var WSAData: TWSAData; HostEnt: PHostEnt; begin WSAStartup(2, WSAData); HostEnt := gethostbyname(PChar(Name)); with HostEnt^ do Result := Format('%d.%d.%d.%d', [Byte(h_addr^[0]), Byte(h_addr^[1]), Byte(h_addr^[2]), Byte(h_addr^[3])]); WSACleanup; end; 2.WNetCancelConnection 断开网络连接 WNetCancelConnection2 断开网络连接
1.function GetIPFromName(Name: string): string; var WSAData: TWSAData; HostEnt: PHostEnt; begin WSAStartup(2, WSAData); HostEnt := gethostbyname(PChar(Name)); with HostEnt^ do Result := Format('%d.%d.%d.%d', [Byte(h_addr^[0]), Byte(h_addr^[1]), Byte(h_addr^[2]), Byte(h_addr^[3])]); WSACleanup; end; 2.WNetCancelConnection 断开网络连接 WNetCancelConnection2 断开网络连接
S shbjkl Unregistered / Unconfirmed GUEST, unregistred user! 2002-11-25 #5 shellexec(pchar('netstat -a'));