T
toptp
Unregistered / Unconfirmed
GUEST, unregistred user!
function getserverlist(var list:tstringlist):boolean;
var
netresource:tnetresource;
bufointer;
count,bufsize,res:dword;
lphenum:thandle;
p:TNetResourceArray;
i,j:smallint;
networktypelist:tlist;
begin
res:=wnetopenenum(resource_globalnet,resourcetype_disk,resourceusage_container,nil,lphenum);
bufsize:=8192;
getmem(buf,bufsize);
res:=wnetenumresource(lphenum,count,pointer(buf),bufsize);
P:=tnerresourcearray(buf);
for i:=0 to count-1 do
begin
networktypelist.Add(p);
inc(p);
list.Add(strpas(p^.lpremotename));
end;
end;
用api实现察看网络邻居中工作组的方法在这里不能使用,delphi提示TNetResourceArray不认识
怎么搞得???
var
netresource:tnetresource;
bufointer;
count,bufsize,res:dword;
lphenum:thandle;
p:TNetResourceArray;
i,j:smallint;
networktypelist:tlist;
begin
res:=wnetopenenum(resource_globalnet,resourcetype_disk,resourceusage_container,nil,lphenum);
bufsize:=8192;
getmem(buf,bufsize);
res:=wnetenumresource(lphenum,count,pointer(buf),bufsize);
P:=tnerresourcearray(buf);
for i:=0 to count-1 do
begin
networktypelist.Add(p);
inc(p);
list.Add(strpas(p^.lpremotename));
end;
end;
用api实现察看网络邻居中工作组的方法在这里不能使用,delphi提示TNetResourceArray不认识
怎么搞得???