Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do I find the cdrom drive?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00446679
Message ID:
00448750
Vues:
24
You can check all possible drivies in the loop until you find CDROM
Declare Integer GetDriveType in Win32API String
lcCDROM = Null
FOR lnI=Asc("A") To Asc("Z")
	IF GetDriveType(Chr(lnI)+ ":") = 5
		lcCDROM = Chr(lnI)
		EXIT
	ENDIF	
ENDFOR


? lcCDROM


>Hi Nigel,
>
>I tried this method however, it returns a .T. when it
>finds the cdrom drive and only if I direct it to it.
>
>I need to find a user's cdrom drive name, ie d:\ and assign
>that drive letter to a path statement for my program.
>
>Any thoughts? Thanks and have a good day.
>
>Becky
>
>
>>GetDriveType will do this.
>>
>>Declare Integer GetDriveType in Win32API String
>>
>>?GetDriveType("a:\") = 2
>>?GetDriveType("c:\") = 3
>>?GetDriveType("d:\") = 5 (CD ROM)
>>
>>>VFP 3.0
>>>
>>>Hello All,
>>>
>>>I need to have my program find the cdrom drive on the installation
>>>machine and use that path to go between my program on the cdrom
>>>and the hard drive.
>>>
>>>Is there an api function that will accomplish this task?
>>>
>>>Thanks,
>>>
>>>Becky
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform