Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is current drive a CD drive
Message
De
31/07/1998 16:17:14
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00123185
Message ID:
00123189
Vues:
13
>I'm currently tasked with developing a demo application
>that will run from a CDROM. The tables will be copied
>to the hard drive during installation but the application
>will remain in the CD. The application will should run
>from anywhere else only from the CD.
>
>The problem is that I don't know how to tell if the
>application started from the CD or not. Could anyone
>give me some suggestions /advice on this.
>
>Thanks

You could do this
#DEFINE CDROM 5
#DEFINE NETWORK 4
#DEFINE RAMDISK 6 && Ram Disk
#DEINFE FIXED 3 && Hard Drive
#DEFINE REMOVE 2 && IE 3.5 OR 5.25 or JAZ
#DEFINE NODIR 1 && DIRECTORY DOESN'T EXIST
#DEFINE UNKNOWN 0

lc_drive = SYS(5)+CHR(0)
DECLARE INTEGER GetDriveType IN WIN32API STRING
IF GetDriveType(@lc_drive) = 5
=MESSAGEBOX('STARTED FROM CD ROM')
ENDIF


Charles
Charles

"The code knows no master." - Chuck Mautz
"Everybody is ignorant, only on different subjects." - Will Rogers
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform