-

         


buf = malloc(CDROM_RAW_SECTOR_SIZE * n_sec);



//

hCD = CreateFile(drive,GENERIC_READ,FILE_SHARE_READ,0,OPEN_EXISTING,0,0);

if (hCD != INVALID_HANDLE_VALUE)



// IOCTL_CDROM_RAW_READ

fResult = DeviceIoControl( hCD, 0x2403E /* IOCTL_CDROM_RAW_READ */,

&rawRead, sizeof(RAW_READ_INFO),

buf, CDROM_RAW_SECTOR_SIZE*n_sec,

&x_size, (LPOVERLAPPED) NULL);



// ( , )

if (fResult)

for (a = 0; a <= x_size; ++a) printf("%02X%s",buf[a],(a%24)?" ":"\n");

else

printf("-ERROR"); printf("\n");



//

CloseHandle(hCD); return (fResult)?buf:0;

}

 1.4.4, . TOC(Table Of Content)  .

 2.1.4.4. [/IOCTL.read.TOC.c]  , CDFS- IOCTL TOC' ( ),

/*--------------------------------------------------------------------------

*

* TOC

* ========================

*

* build 0x001 @ 26.05.2003

--------------------------------------------------------------------------*/

main(int argc, char **argv)

{

int a;

HANDLE hCD;

unsigned char *buf;

WORD TOC_SIZE;

BYTE n_track;

DWORD x_size,b;



#define DEF_X "\\\\.\\G:" //


    







Forekc.ru
, , , , , , , , , ,