在 Windows XP 中使用 .NET 刻录 DVD 需要哪些基本 COM 组件?
我正在尝试通过前端 C# 代码刻录 DVD/CD...
我在 Windows XP 中使用 IMAPI2 刻录 CD/DVD..但它给了我未处理的异常...如:-
System.InvalidCastException: 无法转换类型“IMAPI2.Interop.MsftFileSystemImageClass”的 COM 对象到接口类型“IMAPI2.Interop.MsftFileSystemImage”。此操作失败,因为对 IID 为“{7CFF842C-7E97-4807-8304-910DD8F7C051}”的接口的 COM 组件上的 QueryInterface 调用由于以下错误而失败:不支持此类接口(HRESULT 异常:0x80004002 (E_NOINTERFACE))
谁能帮我解决这个问题。我无法解决这个错误。该项目在 Windows7 中运行良好,但无法在 XP 中运行。
I'm trying to burn DVD/CD through frontend C# code...
i have used IMAPI2 for buring CD/DVD in windows XP..but it is giving me unhandled exception... as:-
System.InvalidCastException: Unable to cast COM object of type 'IMAPI2.Interop.MsftFileSystemImageClass' to interface type 'IMAPI2.Interop.MsftFileSystemImage'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{7CFF842C-7E97-4807-8304-910DD8F7C051}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE))
can anyone please help me out to solve this problem. I'm not able to solve this error. this project is working fine in Windows7 but unable to work with XP.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
IMAPI2 随 Vista 或更高版本一起发布,XP 附带 IMAPI,其中不支持 DVD。您可以在此处下载适用于 XP 的 IMAPI2。
IMAPI2 is distributed with Vista or higher, XP comes with IMAPI, in which DVDs aren't supported. You can download IMAPI2 for XP here.
我对此很感兴趣,因为我正在启动一个类似的项目。不管怎样,答案似乎就在您链接到的页面上。在评论第 2 页的主题“BurnMedia 应用程序在 XP SP3 上无法工作?”下,有人报告了完全相同的错误。另一位发帖者表示,他通过
更改:来
在一个互操作文件中
解决这个问题。然而,在一个更新的线程中,作者表示这一更改(据报道适用于 Windows 7 和 XP SP3)破坏了 Vista,并且他正在研究解决方案(截至几天前)。
I'm interested in this because I'm starting a similar project. Anyway, it looks like the answer is at the page you linked to. Under the thread "BurnMedia application on XP SP3 not working ?", on page 2 of the comments, someone reports exactly the same error. Another poster states that he resolved it by changing:
to
in one of the interop files.
However, on an even newer thread, the author suggests that this change (which reportedly works on Windows 7 and XP SP3) breaks Vista, and that he's working on a solution (as of a few days ago).