Android smartphone

Showing posts with label Network. Show all posts
Showing posts with label Network. Show all posts

2010-06-27

Function WNetConnectionDialog() to map drive.

If WNetConnectionDialog(Handle, RESOURCETYPE_DISK) = NO_ERROR then
begin
     ShowMessage('New connection successfully set.');
end;

Technical review basic map drive

Technical review basic map drive.
Function GetNetworkDriveMappings(SList:TStrings):Integer;

Var
i:Char;
sPath:String;
dwMaxPathLen:DWord;
Begin
     SList.Clear;
     dwMaxPathLen:=MAX_PATH;
     SetLength(sPath,MAX_PATH);
     For I := 'A' to 'Z' Do
     If WNetGetConnection( PChar(''+i+':'),PChar(sPath),dwMaxPathLen)=NO_ERROR Then
          SList.Add(I+': '+sPath);
     Result := SList.Count;
End;