谁会使用 WNetGetConnection (API)
我根据 WIN32.hlp 里的格式写了如下的一段程序:
var lpLocalName,lpRemoteName:Pchar;
lpnLength: DWORD;
RtnValue : DWORD;
begin
tmp1:='D:\WIN98';//共享都设置好了
RtnValue := wnetgetconnection(lpLocalName,lpRemoteName,lpnLength);
showmessage(strpas(lpLocalName));
showmessage(strpas(lpRemoteName));
showmessage(inttostr(RtnValue));
end;
lpLocalName这个参数老不对,lpRemoteName没有返回值。
RtnValue 总返回“ERROR——BAD——DEVICE”(就是1200)
请高手指点