P
paf
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TForm1.Button1Click(Sender: TObject);
var
NetSource : TNetResource;
re:integer;
begin
with NetSource do
begin
dwScope:=2;
dwDisplayType:=2;
dwUsage:=10;
lpComment:=nil;
dwType := RESOURCETYPE_ANY;
lpLocalName :=pchar('');
lpRemoteName := pchar(//xx.xx.xx.xx/ipc$);
lpProvider := nil;
end;
Re:=WnetAddConnection2(NetSource,pchar('password'),pchar('user'),CONNECT_UPDATE_PROFILE);
form1.caption:=inttostr(re);
end;
-----------------------------------
用上面的代码,在win98下总是返回"0", 也就是建立 //xx.xx.xx.xx/ipc$ 成功!
用户名和密码改别的,也返回“0”,
现在我用 IPC$ 怎样才能判断是win98还是win2000啊!
var
NetSource : TNetResource;
re:integer;
begin
with NetSource do
begin
dwScope:=2;
dwDisplayType:=2;
dwUsage:=10;
lpComment:=nil;
dwType := RESOURCETYPE_ANY;
lpLocalName :=pchar('');
lpRemoteName := pchar(//xx.xx.xx.xx/ipc$);
lpProvider := nil;
end;
Re:=WnetAddConnection2(NetSource,pchar('password'),pchar('user'),CONNECT_UPDATE_PROFILE);
form1.caption:=inttostr(re);
end;
-----------------------------------
用上面的代码,在win98下总是返回"0", 也就是建立 //xx.xx.xx.xx/ipc$ 成功!
用户名和密码改别的,也返回“0”,
现在我用 IPC$ 怎样才能判断是win98还是win2000啊!