DeviceIoControl for CDDA read

Hi,

I’m trying to read 10 seconds of first audio track on CDDA,
using the following:

char *buff;
ULONG returned = 0;
RAW_READ_INFO rr_info;
ULONG NUM_BLOCKS_TO_READ = 75*10;
UINT CDDA_SECTOR_SIZE = 2352;
UINT LBA_OFFSET = 0;

rr_info.DiskOffset.QuadPart=LBA_OFFSET;
rr_info.SectorCount=NUM_BLOCKS_TO_READ;
rr_info.TrackMode=CDDA;

buff = (char*)malloc(CDDA_SECTOR_SIZE*NUM_BLOCKS_TO_READ);
if(!DeviceIoControl(devHandle,
IOCTL_CDROM_RAW_READ,
&rr_info,
sizeof(RAW_READ_INFO),
in_buff,
CDDA_SECTOR_SIZE*NUM_BLOCKS_TO_READ,
&returned,
NULL)) {
printf(“ERR[%d]\n”, GetLastError());
return 1;
}

This code is known to work under Win2K but doesn’t under NT,
DeviceIoControl failed with error code 1(INVALID_FUNCTION),

If you familiar with reading CDDA sectors under Win32
I would be glad to get any help.

v.


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com