Problems reading Mode 2 cdrom sectors

Hello,

I need read Mode2 cdrom sectors (2340 bytes), i am
trying read with it:

//sprintf(cdname,“\\.\%C:”,cdrom_letter);
sprintf(cdname,“\\.\Cdrom0”);
hCDW2k = CreateFile(cdname, GENERIC_READ,
FILE_SHARE_READ|FILE_SHARE_WRITE,
NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL,
NULL);

{
RAW_READ_INFO raw_info;

raw_info.DiskOffset.QuadPart = dwStart;
raw_info.SectorCount = 1;
raw_info.TrackMode = XAForm2;

status = DeviceIoControl(hCD, IOCTL_CDROM_RAW_READ,
&raw_info, sizeof(RAW_READ_INFO),
buf, 2352,
&dwNotUsed, NULL);
}

But it isnt working, i get error always in status,
does someone know how read mode2 sectors?

Very thanks.
Regards. Carlos.



/ // _ // / / o) calb
/ /
/ // // / / \ megax.aig.uc3m.es
/
/// ///_//)


Your dwStart must indicate the offset of the sector in terms of 2k
sectors.

For example, if you want to read sector 0, dwStart = 0, sector 1,
dwStart = 2048, sector 2, dwStart = 4096, etc.

-----Original Message-----
From: Carlos [mailto:xxxxx@megax.aig.uc3m.es]
Sent: Friday, November 17, 2000 8:49 AM
To: File Systems Developers
Subject: [ntfsd] Problems reading Mode 2 cdrom sectors

Hello,

I need read Mode2 cdrom sectors (2340 bytes), i am
trying read with it:

//sprintf(cdname,“\\.\%C:”,cdrom_letter);
sprintf(cdname,“\\.\Cdrom0”);
hCDW2k = CreateFile(cdname, GENERIC_READ,
FILE_SHARE_READ|FILE_SHARE_WRITE,
NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL,
NULL);

{
RAW_READ_INFO raw_info;

raw_info.DiskOffset.QuadPart = dwStart;
raw_info.SectorCount = 1;
raw_info.TrackMode = XAForm2;

status = DeviceIoControl(hCD, IOCTL_CDROM_RAW_READ,
&raw_info, sizeof(RAW_READ_INFO),
buf, 2352,
&dwNotUsed, NULL);
}

But it isnt working, i get error always in status,
does someone know how read mode2 sectors?

Very thanks.
Regards. Carlos.



/ // _ // / / o) calb
/ /
/ // // / / \ megax.aig.uc3m.es
/
/// ///_//)



You are currently subscribed to ntfsd as: xxxxx@exchange.microsoft.com
To unsubscribe send a blank email to $subst(‘Email.Unsub’)