CDINFO - 6


// GetTrackInfo

// -

// ---------------------------------------------------

int GetTrackInfo(int iTrack, int nCDUnit)

{

IOCTL_Input cmd;

memset(&cmd, 0, sizeof(IOCTL_Input ));

cmd.rh.bSize = 26;

cmd.rh.bSubUnit = 0;

cmd.rh.bCmd = 3;

cmd.bMediaDescriptor = 0;

cmd.lpTransferAddress = (DWORD)(void far *)&ti;

cmd.wDataSize = 7;

cmd.wStartSector = 0;

cmd.lpVolID = (DWORD)(void far *)NULL;

ti.bControl = 11;

ti.bTrack = iTrack;

CallCDDriver(&cmd, nCDUnit);

return cmd.rh.wStatus;

}

// ---------------------------------------------------

// GetDeviceStatus

// CD-ROM

// ---------------------------------------------------

int GetDeviceStatus(int nCDUnit)

{

IOCTL_Input cmd;

memset(&cmd, 0, sizeof(IOCTL_Input ));

cmd.rh.bSize = 26;

cmd.rh.bSubUnit = 0;

cmd.rh.bCmd = 3;

cmd.bMediaDescriptor = 0;

cmd.lpTransferAddress = (DWORD)(void far *)&ds;

cmd.wDataSize = 5;

cmd.wStartSector = 0;

cmd.lpVolID = (DWORD)(void far *)NULL;

ds.bControl = 6;

CallCDDriver(&cmd, nCDUnit);

return cmd.rh.wStatus;

}

// ---------------------------------------------------

// GetVolumeSize

// -

// ---------------------------------------------------

int GetVolumeSize(int nCDUnit)

{

IOCTL_Input cmd;

memset(&cmd, 0, sizeof(IOCTL_Input ));

cmd.rh.bSize = 26;

cmd.rh.bSubUnit = 0;

cmd.rh.bCmd = 3;

cmd.bMediaDescriptor = 0;

cmd.lpTransferAddress = (DWORD)(void far *)&vs;

cmd.wDataSize = 5;

cmd.wStartSector = 0;

cmd.lpVolID = (DWORD)(void far *)NULL;

vs.bControl = 8;

CallCDDriver(&cmd, nCDUnit);

return cmd.rh.wStatus;

}

// ---------------------------------------------------