是否可以使用 .NET 写入 CD?
我在 f:\ 驱动器中有一个名为“cd.txt”的数据文件。 我想将此文件写入 CD,即 E:\。
String source ="F:\\cd.txt";
String destination="E:\\cd.txt";
File.copy(sorce,destination);
上面的行抛出异常说:
“访问路径‘E:\cd.txt’被拒绝”
I have a data file in f:\ drive named 'cd.txt'.
I want to write this file to a CD i.e E:\.
String source ="F:\\cd.txt";
String destination="E:\\cd.txt";
File.copy(sorce,destination);
The above line is throwing exception saying:
"Access to the path 'E:\cd.txt' is denied"
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我认为这并不容易实现,Windows 资源管理器给人的印象是进行文件复制就足够了,但事实并非如此。
我想您可能会看一下 XPBurn 组件。
I don't think that's so easily feasible, Windows explorer give the impression doing a file copy is enough but that not the case.
I think you might take a look at XPBurn component.
您不能仅将文件复制到光盘驱动器。将文件写入 CD-R 是一个复杂的过程。
我听说过一个名为 XPBurn 的 C# .NET 组件。我没有使用过它,但看起来它可以使用 IMAPI 接口。
You cant just copy files to a disc drive. Writing files to a CD-R is a complicated process.
I have heard of a C# .NET component called XPBurn. I have not used it, but it looks like it'll do what you need using the IMAPI Interfaces.
是的,但从技术上讲它是 Windows API:
Dhawan一个
Yes, but it's technically Windows API:
Dhawan the One
IMAPI 仅适用于 C++,是否有适用于 C# 的良好包装器? o 也许是图书馆?我使用了 codeproject 页面中的项目包装器..我还没有测试它,我所做的只是排除 Interop 文件夹并将其移动到另一个项目以尝试在 WPF 中构建 winform ..因此我将 Interop 排除在单个项目中DLL 的类项目...这周将对其进行测试..
IMAPI is only for C++, is there a good wrapper for C#? o maybe a library? i used the project wrapper from the codeproject page.. i haven't test it, all i did was exclude the Interop folder and moved it to another project to try and build the winform in WPF.. therefore i excluded the Interop to a single class project for a DLL... will test it this week..