Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Returning Drive Information
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00184270
Message ID:
00184290
Views:
17
>hi,
>try to search on M$ KNOWLEDGE BASE : ID Q135818
>u may also use Win32api
>
>I got the sample as th following:
> DECLARE INTEGER GetLogicalDriveStrings IN Win32API as getit;
> INTEGER nBuffSize, STRING lpString
> CLEAR
> DIMENSION aMyarray(1)
> lpString=SPACE(200)
> nBuffSize=LEN(lpString)
> =getit(nBuffSize,@lpString)
> NumberOfDrives=OCCURS(":",lpString)
> DIMENSION aMyarray(NumberOfDrives)
> FOR i=1 TO NumberOfDrives
> aMyarray(i)=SUBSTR(lpString,AT(":",lpString,i)-1,1)
> ENDFOR

John/Jason,

The GetLogicalDriveStrings function will only return a list of drives available. You will next need to use GetDriveType function, again in Win32API to identify the type of drive. If it returns DRIVE_CDROM, you then have the drive letter of the CDROM. It may be quicker just to scan drives A to Z with this function - need to manually test to see if error occurs on non existent drive. Then stop when you find CD.
Nigel B Coates
NBC Software Services
Dublin, Ireland.
eMail: Nigel.Coates@NBCSoftware.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform