Emmanuel, you can use Window's API call to do this.
Declare Function GetDriveType Lib "kernel32" Alias "GetDriveTypeA"
(ByVal
nDrive As String) As Long
If the return value is 5, then it is CDRom Drive.
lnReturnValue = GetDriveType(sDriveType)
sDriveType should be .. "C:\", "D:\", "E:\"
So you can do something like...
Function FindCDromDrive(sCDromDirve As String) As Boolean
Dim bFound As Boolean
Dim lnDriveChar As Long
Dim lnReturnValue As Long
'** Chr$(65) is "A"
lnDriveChar = 65
Do while Not (bfound)
lnReturnValue = GetDriveType(Chr$(lnDriveChar) + ":\")
'** 5 is CDRom Drive
If lnReturnValue = 5 Then
bFound = True
sCDRomDrive = Chr$(lnDriveChar) + ":\"
'MsgBox "sCDRomDrive = " + sCDRomDrive
FindCDRomDrive = True
Exit Function
End If
lnDriveChar = lnDriveChar + 1
'** 90 is 'Z"
If lnDriveChar > 91 Then
MsgBox "CDRom Drive not found"
Exit Do
End If
Loop
End Function
Is this what you are looking for????
Yas
----------
From: owner-mapinfo-l
Sent: Monday, March 8, 1999 11:39 AM
To: mapinfo-l
Subject: MI Get the cdrom drive from vb
Hi!
Is there a way to determine the cdrom drive in vb.. (api,function?)
I
need it to load .avi file located on cdrom when the user click
on a map object.
Thanks.
Emmanuel
----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]