General information
Category:
Windows API functions
Title:
How to detect cdrom?
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only