nbsp; //执行失败 if ( res = error_no_more_items ) or (res <> no_error ) then exit; p := tnetresourcearra
{================================================================= 功 能: 映射网络驱动器 参 数: netpath: 想要映射的网络路径 password: 访问密码 localpath 本地路径 返回值: 成功: true 失败: false; 备 注: 版 本: 1.0 2002/10/03 09:24:00 =================================================================} function netaddconnection(netpath: pchar; password: pchar ;localpath: pchar): boolean; var res: dword; begin result := false; res := wnetaddconnection(netpath,password,localpath); if res <> no_error then exit; result := true; end;
{================================================================= 功 能: 检测网络状态 参 数: ipaddr: 被测试网络上主机的ip地址或名称,建议使用ip 返回值: 成功: true 失败: false; 备 注: 版 本: 1.0 2002/10/03 09:40:00 =================================================================} function checknet(ipaddr: string): boolean; type pipoptioninformation = ^tipoptioninformation; tipoptioninformation = packed record ttl: byte; // time to live (used for traceroute) tos: byte; // type of service (usually 0) flags: byte; // ip header flags (usually 0) optionssize: byte; // size of options data (usually 0, max 40) optionsdata: pchar; // options data buffer end;
picmpechoreply = ^ticmpechoreply; ticmpechoreply = packed record address: dword; // replying address status: dword; // ip status value (see below) rtt: dword; // round trip time in milliseconds datasize: word; &nb |