Rede - listando as conexoes |
Top Previous Next |
|
// Listando as conexões de rede:
procedure TForm1.Button1Click(Sender: TObject); var i : Integer; Caminho : String; 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(Drive + ' - '+Caminho); end; end; |