Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to detect cdrom?
Message
From
10/03/1999 04:52:57
Jack Lee
Wheel Giant Inc.
Changhua, Taiwan
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
How to detect cdrom?
Miscellaneous
Thread ID:
00195747
Message ID:
00195747
Views:
57
Hi All.

I've seen someone paste how to do this ever, but maybe I'm missing something, The code is:

*****************
DECLARE INTEGER GetLogicalDrives IN Win32API
IF NOT "6." $ VERSION()
SET LIBRARY TO FOXTOOLS ADDITIVE
ENDIF
llfound = .F.
lni = 0
lnlast = 25
STORE "" TO lcresult, lcdrive
lndrives = GetLogicalDrives()
DO WHILE NOT llfound AND lni < lnlast
IF BITTEST(lndrives, lni)
lcdrive = CHR(65 + lni)
llfound = (GetDriveType(lcdrive) = 5)
ENDIF
lni = lni + 1
ENDDO
IF llfound
lcresult = lcdrive
ENDIF
RETURN lcresult
********************

I got an error message "File: GetDriveType.prg does not exist" in VFP 6. Anybody tell me I'm missing?

Thanks!

Jack Lee
Next
Reply
Map
View

Click here to load this message in the networking platform