Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Hard drives
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00529293
Message ID:
00529445
Vues:
12
>Hi,
>sorry to ask... I think I've already read a thread about this... but I can not use search options... so if someone can help me...
>
>How do I know how many fixed drives has a machine? and their letter..
>
>sorry again.
fabian,

The easiest way is possibly the API call GetLogicalDriveStrings()
DECLARE INTEGER GetLogicalDriveStrings IN Win32API;
  INTEGER dwSize, STRING @lpBuffer
lcbuffer = SPACE(130)
lnsize = LEN(lcbuffer)
IF GetLogicalDriveStrings(lnsize, @lcbuffer) > 0
  lcbuffer = CHRTRAN(lcbuffer, CHR(0), CHR(13) + CHR(10))
  DIMENSION a_drives[1]
  = ALINES(a_drives, lcbuffer)
  FOR lni = 1 TO ALEN(a_drives, 1)
    ? a_drives[lni]
  NEXT
ELSE
  ? "No drives???"
ENDIF
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform