H
heqian
Unregistered / Unconfirmed
GUEST, unregistred user!
需要登陆的机器为2000server
客户端为9x或者2000
可是下面程序只能在9x下执行;
var
netresource:Tnetresource;
re:dword;
begin
netresource.dwScope:=RESOURCE_GLOBALNET;
netresource.dwUsage:=RESOURCEUSAGE_CONNECTABLE;
netresource.dwType:=RESOURCETYPE_DISK;
netresource.dwDisplayType:=RESOURCEDISPLAYTYPE_SHARE;//SERVER;
netresource.lpLocalName:='';
netresource.lpRemoteName:='//server/$dir$/';
netresource.lpProvider:='';
re:=WNetAddConnection3(
application.Handle,
netresource,
'password',
'administrator',
CONNECT_UPDATE_PROFILE
);
if re<>NO_ERROR then
begin
application.MessageBox('无法连接到服务器,请与系统管理员联系','系统提示',mb_ok);
application.Terminate;
end;
end;
如果在2000下执行
winexec('net use //server password ',0);
如何判断网络登陆成功???????????????
客户端为9x或者2000
可是下面程序只能在9x下执行;
var
netresource:Tnetresource;
re:dword;
begin
netresource.dwScope:=RESOURCE_GLOBALNET;
netresource.dwUsage:=RESOURCEUSAGE_CONNECTABLE;
netresource.dwType:=RESOURCETYPE_DISK;
netresource.dwDisplayType:=RESOURCEDISPLAYTYPE_SHARE;//SERVER;
netresource.lpLocalName:='';
netresource.lpRemoteName:='//server/$dir$/';
netresource.lpProvider:='';
re:=WNetAddConnection3(
application.Handle,
netresource,
'password',
'administrator',
CONNECT_UPDATE_PROFILE
);
if re<>NO_ERROR then
begin
application.MessageBox('无法连接到服务器,请与系统管理员联系','系统提示',mb_ok);
application.Terminate;
end;
end;
如果在2000下执行
winexec('net use //server password ',0);
如何判断网络登陆成功???????????????