Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can I retreive the shared name of disk.
Message
 
À
30/04/2004 06:51:51
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00899654
Message ID:
00899690
Vues:
19
For local c: you may use sys(0), on network something like:
pcDrive="F:"
DECLARE LONG WNetGetConnection IN WIN32API ;
    STRING LocalName, ;
    STRING @RemoteName, ;
    LONG @lSize

lnSize=255
RemoteName = SPACE(lnSize)
lnError = WNetGetConnection(pcDrive, @RemoteName, @lnSize)

IF lnErr = 0
  ? LEFT(RemoteName, ATC(CHR(0),RemoteName) - 1)
ELSE
  ? "Error: " + trans(lnErr)
ENDIF
>I want to save the path to some files in memo fields, but I want instead of C:\path_to_file to save something like \\ComputerName\DiskName\path_to_file, is that possible?
>
>TIA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform