Click here to Skip to main content
15,893,588 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Where To find information about CRichEditCtrl Pin
Selvam R12-Feb-04 23:18
professionalSelvam R12-Feb-04 23:18 
GeneralProcessor or Mainboard's Serial Number Pin
Member 84094012-Feb-04 20:36
Member 84094012-Feb-04 20:36 
GeneralRe: Processor or Mainboard's Serial Number Pin
Steve S13-Feb-04 2:05
Steve S13-Feb-04 2:05 
GeneralRe: Processor or Mainboard's Serial Number Pin
David Crow13-Feb-04 3:56
David Crow13-Feb-04 3:56 
GeneralRe: Processor or Mainboard's Serial Number Pin
Steve S13-Feb-04 3:57
Steve S13-Feb-04 3:57 
GeneralRe: Processor or Mainboard's Serial Number Pin
David Crow13-Feb-04 5:08
David Crow13-Feb-04 5:08 
GeneralAbout OpenGL (URGENT) Pin
Anonymous12-Feb-04 20:31
Anonymous12-Feb-04 20:31 
Questionhow to read the CD_ROM sectors Pin
longdafeng12-Feb-04 19:36
longdafeng12-Feb-04 19:36 
hi:
Recent there are some problems boring me ,which is how to read the CD_ROM sectors.As we all know ,there are three track mode. The first one is CD_DA ,which is Audio CD ,The second one is MODE1 ,the last one is CD_ROM XA ,which is MODE2 and has two form.
Now I can read the sectors which track mode is MODE1 or MODE2form1 with CreateFile and ReadFile API,but can't read other track modes with them. I want to read the sectors which track mode is ANY ONE with DeviceIOContrl and IOCTL_CDROM_RAW_READ,but I can't read anything.
This is my code.

hCD = CreateFile ("\\\\.\\H:", GENERIC_READ,
FILE_SHARE_READ|FILE_SHARE_WRITE,
NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL,
NULL);
lpSector = (unsigned char *)VirtualAlloc (NULL, dwSize,
MEM_COMMIT|MEM_RESERVE,
PAGE_READWRITE);
RAW_READ_INFO Info={0};
Info.DiskOffset.QuadPart=0;
Info.TrackMode=XAForm2;
//Info.TrackMode=YellowMode2;
//Info.TrackMode=CDDA;
Info.SectorCount=1;

DeviceIoControl(hCD,IOCTL_CDROM_RAW_READ,&Info,
sizeof(Info),lpSector,2352,&dwNotUsed,NULL);


Now the DeviceIoControl return 0,and there is no data in the lpSector

and my friend suggest me that I should use DeviceIOContrl and IOCTL_SCSI_PASS_THROUGH_DIRECT,but using them will bring a lot of questions


another question is how to differ the track mode.

Thank you very much
Regards
AnswerRe: how to read the CD_ROM sectors Pin
David Crow13-Feb-04 3:58
David Crow13-Feb-04 3:58 
GeneralRe: how to read the CD_ROM sectors Pin
longdafeng15-Feb-04 1:45
longdafeng15-Feb-04 1:45 
GeneralRe: how to read the CD_ROM sectors Pin
David Crow16-Feb-04 3:18
David Crow16-Feb-04 3:18 
GeneralMenu mnemonics Pin
shultas12-Feb-04 17:37
shultas12-Feb-04 17:37 
GeneralRe: Menu mnemonics Pin
Ravi Bhavnani12-Feb-04 18:18
professionalRavi Bhavnani12-Feb-04 18:18 
GeneralRe: Menu mnemonics Pin
Mike Dimmick13-Feb-04 2:09
Mike Dimmick13-Feb-04 2:09 
GeneralRe: Questions Pin
Davide Pizzolato12-Feb-04 20:38
Davide Pizzolato12-Feb-04 20:38 
GeneralRe: Questions Pin
Kenttw13-Feb-04 2:05
Kenttw13-Feb-04 2:05 
GeneralRe: Questions Pin
Roger Wright13-Feb-04 3:03
professionalRoger Wright13-Feb-04 3:03 
GeneralRe: Questions Pin
Davide Pizzolato14-Feb-04 0:32
Davide Pizzolato14-Feb-04 0:32 
GeneralRe: Questions Pin
Anonymous15-Feb-04 19:55
Anonymous15-Feb-04 19:55 
GeneralRe: Questions Pin
Davide Pizzolato16-Feb-04 11:26
Davide Pizzolato16-Feb-04 11:26 
QuestionHow to hide tab label ? Pin
c832212612-Feb-04 16:29
c832212612-Feb-04 16:29 
GeneralGame Programing Pin
kylerey12-Feb-04 16:12
kylerey12-Feb-04 16:12 
GeneralRe: Game Programing Pin
Tim Smith12-Feb-04 17:27
Tim Smith12-Feb-04 17:27 
GeneralRe: Game Programing Pin
John M. Drescher12-Feb-04 17:27
John M. Drescher12-Feb-04 17:27 
GeneralRe: Game Programing Pin
Selvam R12-Feb-04 23:29
professionalSelvam R12-Feb-04 23:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.