Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can some one tell me how to find the number of sectors for a CD drive 1

Status
Not open for further replies.

Sivakumar

Programmer
Sep 24, 1999
6
0
0
JM
Visit site
Hi,<br>
<br>
Could you please let me know, how to find the total number of sectors for a CD.<br>
<br>
I understand that it has be done using DeviceIoControl of VC++.<br>
<br>
But, could you please give me the exact parameters with its value which works for<br>
Win 9x and just not for NT alone.<br>
<br>
The following piece of code works fine for a floppy drive but not for a CD.<br>
<br>
treg.reg_EBX = iDrive;<br>
treg.reg_EDX = (DWORD) &dbp;<br>
treg.reg_ECX = MAKEWORD(0x60,0x8);<br>
treg.reg_EAX = 0x440D;<br>
treg.reg_Flags = CARRY_FLAG;<br>
<br>
if ( DeviceIoControl(h , VWIN32_DIOC_DOS_IOCTL,<br>
&treg,<br>
sizeof(treg),<br>
&treg,<br>
sizeof(treg),<br>
&cb,0) )<br>
<br>
Please let me know if you have a solution.<br>
<br>
Regards<br>
<br>
Siva<br>
Email: siva@indusaglobal.com<br>
<br>
Programming is always a learning process <br>

 
Hello Siva!<br>
<br>
This is my second response -- the first one didn't seem to make it into the forum.<br>
<br>
As physically recorded on the disc, CDROMs don't have sectors -- they're recorded as one long spiral from the center out to the edge.<br>
<br>
It may be true that some drivers provide
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top