Req Is : I need to check if CD/DVD RW is having data, if yes need to delete data and write on it new data after deletion.
I am able to delete data but not able to write after that.
Please provide a sample code in C++ for deletion and burning CD/DVD using IMAPI 2.0.
What I have tried:
I created a method EraseMedia() -- with intialize, Discmaster initialize, recorder initialize , accquire access, DiscFormatErase intialize with recorder, erase data, release recorder.
Created a WriteMedia() -- with intialize, Discmaster initialize, recorder initialize , accquire access , datastream initialize and write.
Issues :
-- When i am executing separtely only the writemethod , it writes perfectly on the DVD/CD.
-- When i am executing separately only erase method, erases all data perfectly.
-- When i call in main method -- first erase method & then write method.
It executes erase perfectly but before writing only throws error. Doesnt write on CD/DVD