BOOL QueryCDParms( HCDROM hCD, int which, DWORD *pNum );


Description: Queries the CD-ROM device identified by hCD for a specific parameter from one of its status/mode pages, plus a few available options. Currently, this function supports the IDE/SCSI-2 style mode pages.

Parameters:
hCD The CD-ROM device to query
which Identifier of the parameter we wish to query. See Notes.
pNum Pointer to a DWORD which will receive the value we are querying.

Return Value:

TRUE If the parameter is of type BOOL, then a return value of TRUE indicates that the value in the CD-ROM's status/mode page is TRUE. If the parameter is a numeric parameter, it indicates that the value was successfully copied to the DWORD pointed to by pNum.
FALSE For numeric parameters, FALSE indicates that an error occured. For boolean parameters, it can indicate that the parameter is FALSE in the CD-ROM's status/mode page, or that an error occured. Use GetAspiLibError to determine if an error occured -- a return value of ALERR_NOERROR indicates that no error occured.

Notes: The following integer identifiers may be used with QueryCDParms and ModifyCDParms. Not all parameters can be changed.

0x0001 CDP_READCDR BOOL Unit can read CD-R media
0x0002 CDP_READCDE BOOL Unit can read CD-E media
0x0003 CDP_METHOD2 BOOL Unit can read CD-R written via method 2
0x0004 CDP_WRITECDR BOOL Unit can write CD-R
0x0005 CDP_WRITECDE BOOL Unit can write CD-E
0x0006 CDP_AUDIOPLAY BOOL Unit can play CD audio
0x0007 CDP_COMPOSITE BOOL Unit can deliver a composite audio and video stream
0x0008 CDP_DIGITAL1 BOOL Unit supports digital output(IEC958) on port 1
0x0009 CDP_DIGITAL2 BOOL Unit supports digital output(IEC958) on port 2
0x000A CDP_M2FORM1 BOOL Unit can read sectors in Mode 2 Form 1 (XA) format
0x000B CDP_M2FORM2 BOOL Unit can read sectors in Mode 2 Form 2 format
0x000C CDP_MULTISES BOOL Unit can read multi-session or Photo CD discs
0x000D CDP_CDDA BOOL Unit supports CD-DA
0x000E CDP_STREAMACC BOOL Unit supports "stream is accurate"
0x000F CDP_RW BOOL R-W information can be returned in sub-channel data
0x0010 CDP_RWCORR BOOL R-W information is returned de-interleaved and error corrected
0x0011 CDP_CDSUPP BOOL Unit supports C2 error pointers
0x0012 CDP_ISRC BOOL Unit can return the ISRC (International Standard Recording Code) information
0x0013 CDP_UPC BOOL Unit can return the Media Catalog Number
0x0014 CDP_CANLOCK BOOL PREVENT/ALLOW command can actually lock the media into the unit
0x0015 CDP_LOCKED BOOL Unit is locked(TRUE)/unlocked(FALSE)
0x0016 CDP_PREVJUMP BOOL Current state of (optional) prevent/allow jumper
0x0017 CDP_CANEJECT BOOL Unit can eject media via normal START/STOP command
0x0018 CDP_MECHTYPE Numeric Disk-loading mechanism supported by the unit: 0=caddy, 1=tray, 2=popup, 4=changer w/individually changable discs, 5=changer w/magazine
0x0019 CDP_SEPVOL BOOL Audio level for each channel can be independently controlled
0x001A CDP_SEPMUTE BOOL Mute capability for each channel can be independently controlled
0x001B CDP_SDP BOOL Unit Supports Disc Present(SDP)
0x001C CDP_SSS BOOL Unit supports Software Slot Selection(SSS)
0x001D CDP_MAXSPEED Numeric Maximum speed supported by unit -- reported in KB/s. Divide by 176 to get the "nX" speed of the unit, ie. 176 = 1X
0x001E CDP_NUMVOL Numeric Number of discrete volume levels
0x001F CDP_BUFSIZE Numeric Size of output buffer
0x0020 CDP_CURRSPEED Current speed of unit
0x0021 CDP_SPM Numeric "S" units per "M" (MSF Format)
0x0022 CDP_FPS Numeric "F" units per "S" (MSF Format)
0x0023 CDP_INACTMULT Numeric Inactivity multiplier
0x0024 CDP_MSF BOOL Return TOC in MSF format
0x0025 CDP_OVERLAP Numeric Number of frames to overlap reads for jitter correction. Only affects ReadCDAudioLBAEx
0x0026 CDP_JITTER Numeric Number of frames to check for jitter correction. Only affects ReadCDAudioLBAEx

See also: GetCDHandle, GetAspiLibError, ModifyCDParms