********************************************************
********************************************************
*** 'ARKADAŞLAR LÜTFEN KODBANK"TAN YARDIM İSTEMEYİN' ***
************* 'FORUMLARDAN YARDIM İSTEYİN' *************
********************************************************
********************************************************
function GetNetworkDriveMappings
(SList: TStrings): integer;
var
i: Char;
ThePath: string;
MaxNetPathLen: DWord;
begin
SList.Clear;
MaxNetPathLen := MAX_PATH;
SetLength(ThePath, MAX_PATH) ;
for i := 'A' to 'Z' do
if WNetGetConnection(PChar('' + i + ':'),
PChar(ThePath),
MaxNetPathLen) = NO_ERROR then
SList.Add(i + ': ' + ThePath) ;
Result := SList.Count;
end;