Mega Code Archive

 
Categories / Delphi / LAN Web TCP
 

Map a network drive

{ If you want to give your users the opportunity to connect to network resources from within your program, all you have to do is call the WNetConnectionDialog() Win32 API function: } procedure TForm1.Button1Click(Sender: TObject); begin // Shows the 'connect network drive' dialog if WNetConnectionDialog(Handle, RESOURCETYPE_DISK) = NO_ERROR then begin // Do something end; end;