'=========================================================================== ' Subject: DETECT CD-ROM DRIVER Date: 08-08-98 (13:40) ' Author: Manuel Godinez Code: QB, PDS ' Origin: Man8761@aol.com Packet: DISK.ABC '=========================================================================== ' Purpose: It will detect if a CD-ROM driver is installed. ' ' Disclaimer: I have tested this code and had no problems with it. ' I will assume no respondsibility for problems, or damages. ' Use this code at your own risk. 'While in Windows 95, it will display driver version 2.95 'These routines assume the declarations for the interrupt structures are 'present (QB.BI or QBX.BI), and that the QB.QLB or QBX.QLB quick library 'is loaded for use in the IDE (QB /L or QBX /L), or you're linking in the 'QB.LIB or QBX.LIB library when compiling. 'First off, make sure you include the file containing the interrupt 'structures, and dimension the variables needed by the CALL INTERRUPT 'routine: '$INCLUDE: 'QBX.BI' 'change to QB.BI for QB. DIM inreg AS RegType, outreg AS RegType 'You can change the DIM to DIM SHARED to make the variables available 'globally if you plan to place this code into SUBs or FUNCTIONs. CLS 'Here we start retrieving if Corel CDX is loaded because it gives a 'different version number of its driver. inreg.ax = &H15FF inreg.bx = 0 CALL Interrupt(&H2F, inreg, outreg) IF outreg.bx = &HABCD THEN PRINT "COREL CDX Installed." CorelInstalled% = -1 END IF ' Get CD driver if any version Number inreg.ax = &H150C inreg.bx = 0 CALL Interrupt(&H2F, inreg, outreg) IF outreg.bx THEN CDVerL = (outreg.bx AND 255) CDVerH = outreg.bx \ 256 PRINT "Detected CD-ROM. Driver Ver: "; IF CorelInstalled% THEN IF CDVerH = 2 AND CDVerL = 20 THEN PRINT "1.01d" ELSEIF CDVerH = 2 AND CDVerL = 21 THEN PRINT "1.12a" ELSE PRINT LTRIM$(STR$(CDVerH)); "."; LTRIM$(STR$(CDVerL)) END IF ELSE PRINT LTRIM$(STR$(CDVerH)); "."; LTRIM$(STR$(CDVerL)) END IF ELSE PRINT "CD-ROM not detected" END IF