1: Coloque um TListBox, TButton no form;
2: Crie a seguinte procedure;
procedure TForm1.MapeamentosDisponiveis; var
I : Integer;
Caminho, Drive : String;
Tamanho : Cardinal; begin
SetLength(Caminho,255);
Tamanho:=255; For I:=0 to 25 do begin
Drive := Chr(Ord('A')+I)+':'; if WNetGetConnection(PChar(Drive),PChar(Caminho),Tamanho) = NO_ERROR then
ListBox1.Items.Add(LowerCase(Drive + ' - '+Caminho)); end; end;
2: Digite o código seguindo no evento OnClick do TButton;
MapeamentosDisponiveis;