Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Determine drive letter of CD-ROM
Message
De
12/04/2004 13:36:18
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00894118
Message ID:
00894133
Vues:
9
>If you are creating an installation procedure, which I am doing in VFP, and you need to know which drive letter is the CD-ROM drive, how do you know? Is there a VFP function that determines this?
Declare Integer GetLogicalDrives In win32API
Declare Integer GetDriveType In WIN32API String @cDrvLetter

Local Array aDrvTypes[7]
aDrvTypes[1]="CANNOT_DETERMINE"
aDrvTypes[2]="INVALID_DRIVE"
aDrvTypes[3]="DRIVE_REMOVABLE"
aDrvTypes[4]="DRIVE_FIXED"
aDrvTypes[5]="DRIVE_REMOTE"
aDrvTypes[6]="DRIVE_CDROM"
aDrvTypes[7]="DRIVE_RAMDISK"

lnDrivesMask = GetLogicalDrives()
If lnDrivesMask # 0
  For ix = 0 To 31
    If Bittest(lnDrivesMask,ix)
      lcDrive = Chr(Asc('A')+ix)+":\"
      ? m.lcDrive, aDrvTypes[GetDriveType(lcDrive)+1]
    Endif
  Endfor
Endif
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform