L
lanny
Unregistered / Unconfirmed
GUEST, unregistred user!
使用 <br>Function NetDriverAdd:Boolean;<br>var<br> NR : TNetResource;<br>begin<br> with NR do<br> begin<br> dwType := RESOURCETYPE_ANY;<br> lpLocalName := pchar('H:');<br> lpRemoteName := pchar('//NTSERVER/files');<br> lpProvider := '';<br> end;<br> if WNetAddConnection2(NR, pchar('FileUser'), pchar('FileUser'),<br> CONNECT_UPDATE_PROFILE) = NO_ERROR then Result := True else Result := False;<br>end;<br><br>建立了连接,如何用程序断开它?<br>我想应该是用函数WNetCancelConnection2,具体如何用?<br>