Click to See Complete Forum and Search --> : Finding the number of sectors


Sivakumar
September 24th, 1999, 06:51 PM
Hi,

Could you please let me know, how to find the total number of sectors for a CD.

I understand that it has be done using DeviceIoControl of VC++.

But, could you please give me the exact parameters with its value which works for
Win 9x and just not for NT alone.

The following piece of code works fine for a floppy drive but not for a CD.

treg.reg_EBX = iDrive;
treg.reg_EDX = (DWORD) &dbp;
treg.reg_ECX = MAKEWORD(0x60,0x8);
treg.reg_EAX = 0x440D;
treg.reg_Flags = CARRY_FLAG;

if ( DeviceIoControl(h , VWIN32_DIOC_DOS_IOCTL,
&treg,
sizeof(treg),
&treg,
sizeof(treg),
&cb,0) )




Please let me know if you have a solution.

Regards

Siva
Email: siva@indusaglobal.com

Programming is always a learning process


Programming is always a learning process