While GetVolumeInformation() API is invoked for a fresh(not formatted) Blu-ray re writable(BD-RE) , it is failed with GetlastError() =23(Data error (cyclic redundancy check) ). I have used this function as show below
BOOL Ret = GetVolumeInformation( DriveLetter, VolumeLabel, MAX_PATH + 1,
0, 0, 0, 0, 0 );
if( 0 == Ret )
{
// Here it returns 23
DWORD ErrCode = ::GetLastError();
}
We have checked following media. There error code is different for each media. i am using Windows Server 2008.
BD-RE Fresh Media- ERROR_CRC(Data error (cyclic redundancy check))
BD-R Fresh Media- ERROR_INVALID_FUNCTION
CD-RW Fresh Media- ERROR_INVALID_FUNCTION
CD-R Fresh Media- ERROR_INVALID_FUNCTION
BD-RE formatted - ERROR_UNRECOGNIZED_VOLUME
CD-RW formatted- ERROR_INVALID_FUNCTION
Since there is no data in the media how can it be treat as a CRC error? And it is only getting for BR-RE fresh media.For for other fresh media error code is ERROR_INVALID_FUNCTION.
Another issue is for formatted media BD_RE gives ERROR_UNRECOGNIZED_VOLUME where as CD-RW gives ERROR_INVALID_FUNCTION. Which one is correct?
Thanks, Renjith V R