Dear all,

Special thanks to Patrick Phillips who suggested using the Windows API
function; "GetDriveType". This function when called with a drive letter
returns the status of the drive, whether its a CDROM, FDD, HDD, or network
drive.

To use this I had to cycle through all of the letters of the alphabet until
I came across the first instance of a CD drive, which at present is quite
adequate.

Anyway for those interested here's my MapBasic code;

Declare Function GetDriveType Lib "Kernel32" Alias "GetDriveTypeA" (ByVal
strDrive As String) As Integer

Dim CD as String
Dim iResult as Integer
Dim I as smallInt

For I = 1 to 26
  CD = Chr$(I+64) + ":\"
  if(iResult = 5) Then
    'Create fullpath to video filename using variable; CD
    'Display video clip
    Exit Sub
  End If
Next

Regards,
   ___________________     Paul Fildes, Applications Engineer,
   \__Benson_Hedges__/     Technology Applications Group,
   ____   |/^\|   ____     Attwood House, 1 Worcester Walk, New St,
 _|_  _|__/(=)\__|_  _|_   Birmingham, B2 4NX, England
|   |(    `---'    )|   |
|| _|_\_____1_____/_|_ ||  Mailadd:   [EMAIL PROTECTED]
|_[________---________]_|  Telephone: +44 121 643 6711 Ext: 231
   Jordan      Racing      Fax:       +44 121 643 1357



_______________________________________________________________________
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, send e-mail to [EMAIL PROTECTED] and
put "unsubscribe MapInfo-L" in the message body.

Reply via email to