Ver Mensaje Individual
  #2  
Antiguo 04-08-2005
Avatar de Neftali [Germán.Estévez]
Neftali [Germán.Estévez] Neftali [Germán.Estévez] is offline
[becario]
 
Registrado: jul 2004
Ubicación: Barcelona - Espańa
Posts: 18.293
Reputación: 10
Neftali [Germán.Estévez] Es un diamante en brutoNeftali [Germán.Estévez] Es un diamante en brutoNeftali [Germán.Estévez] Es un diamante en bruto
Revisa la API wNetAddConnection2

Puedes conectar una unidad de Red y luego desconectarla:

Código Delphi [-]
 procedure TForm1.Button1Click(Sender: TObject);
 var
   NRW: TNetResource;
 begin
   with NRW do begin
     dwType := RESOURCETYPE_ANY; lpLocalName := 'X:';
     // map to this driver letter
     lpRemoteName := 'MyServerMyDirectory';
     // Must be filled in. If an empty string is used,
     // it will use the lpRemoteName.
     lpProvider := '';
   end;
   WNetAddConnection2(NRW, 'MyPassword', 'MyUserName', CONNECT_UPDATE_PROFILE);
 end;
__________________
Germán Estévez => Web/Blog
Guía de estilo, Guía alternativa
Utiliza TAG's en tus mensajes.
Contactar con el Clubdelphi

P.D: Más tiempo dedicado a la pregunta=Mejores respuestas.
Responder Con Cita