使用IMAPI 2.0 C ++擦除数据后无法在CD / DVD上写入。 [英] Not able to write on CD /DVD after erasing data using IMAPI 2.0 C++.
问题描述
Req Is:我需要检查CD / DVD RW是否有数据,如果是,需要删除数据并在删除后写入新数据。
我可以删除数据但不能能够在那之后写。
请提供C ++中的示例代码,用于删除和使用IMAPI 2.0刻录CD / DVD。
我尝试了什么:
我创建了一个方法EraseMedia() - 使用intialize,Discmaster初始化,记录器初始化,获取访问权限,DiscFormatErase初始化记录器,擦除数据,释放记录器。
创建一个WriteMedia() - 使用intialize,Discmaster初始化,记录器初始化,获取访问权限,datastream初始化和写入。
问题:
- 当我执行separtely时只有writemethod,它完美地写在DVD /上CD。
- 当我单独执行擦除方法时,完全擦除所有数据。
- 当我调用main方法时 - 第一个时代方法&然后写方法。
它完全执行擦除但在写入之前只抛出错误。不写在CD / DVD上
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
推荐答案
嗯...... CD和DVD不是可重写的设备:一旦你写入物理媒体就可以了,它可以'随后改变,即使有一个燃烧器(这不是真的,IIRC你可以改0到1但不是1到0 - 反之亦然,我不记得随便)
你可以,如果它们是CDRW或DVDRW但你不能用标准的CD和DVD来做。
Um...CD and DVD are not re-writable devices: once you write to the physical media that's it, it can't be changed subsequently, even with a burner (That's not quite true, IIRC you can change 0s to 1s but not 1s to 0s - or vice versa, I can't remember offhand)
You can if they are CDRW or DVDRW but you can't do it with standard CD's and DVD's.
这篇关于使用IMAPI 2.0 C ++擦除数据后无法在CD / DVD上写入。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!