View Single Post
  #3  
Old 09/05/2023
pgranados's Avatar
pgranados pgranados is offline
Miembro
 
Join Date: Sep 2022
Location: México
Posts: 321
Rep Power: 4
pgranados Va por buen camino
Quote:
Originally Posted by Casimiro Notevi View Post
Mira si te sirve alguno de los enlaces relacionados, abajo del todo de esta página.
Parece que lo único que tenia que hacer era modificar un poco el NetResource

Dejo código por si a alguien se le ofrece en un futuro:

Código Delphi [-]
function AgregarCarpeta(const NetworkPath: string): string;
var
  NetResource: TNetResource;
  RemoteName: string;
begin
    RemoteName := NetworkPath;
    NetResource.dwType := RESOURCETYPE_ANY;
    NetResource.lpLocalName := nil;
    NetResource.lpRemoteName := PChar(RemoteName);
    NetResource.lpProvider := nil;
    WNetAddConnection2(NetResource, nil, nil, CONNECT_UPDATE_PROFILE);
end;
Reply With Quote