How to know the CD/DVD's capacity



how to know whether the CD/DVD has been formatted?

how to know the CD/DVD’s capacity

how to know whether the CD/DVD is read only?


i use NEROCom.
i work with c#


This is most of the code you will need. You will need to initialize some Nero stuff first, but ultimately, what you are looking for will be in this area:

Just open the device you want to read from. You get the CD Info. The CD Info will contain all the fields it sounds like you are looking for.

Total capacity appears to return total blocks, hence the 2048 multiplier. You’ll also notice that I first divide by 1000. This is because a DWORD can’t store the size of a DVD. Its upper limit is about 4.2 billion. So unless you want to write your own large number class with Strings, this is an easy work around.

NERO_DEVICEHANDLE tempHandle = NeroOpenDevice(&pndiDeviceInfos->nsdisDevInfos[burnerNum]);
capacity = nci->ncdiTotalCapacity; //capacity is returned in Kb otherwise a DWORD cannot
capacity /= 1000; //hold entire size
capacity *= 2048;


Sorry mate, can’t help you there.


Thanks ,