
GetDriveTypeEx – Detect drive type, including CD or DVD driver
Private Type DEVICE_MEDIA_INFO Cylinders As Double MediaType As STORAGE_MEDIA_TYPE TracksPerCylinder As Long SectorsPerTrack As Long BytesPerSector As Long NumberMediaSides As Long MediaCharacteristics As LongEnd TypePrivate Type GET_MEDIA_TYPES DeviceType As Long MediaInfoCount As Long MediaInfo(0) As DEVICE_MEDIA_INFOEnd TypeConst IOCTL_STORAGE_GET_MEDIA_TYPES_EX As Long = &H2D0C04Const GENERIC_READ As Long = &H80000000Const GENERIC_WRITE As Long