在CLR/Windows窗体应用程序下使用DirectShow方法时出现问题 [英] Problem when using directshow methods under CLR/Windows forms application

查看:86
本文介绍了在CLR/Windows窗体应用程序下使用DirectShow方法时出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

有人可以给我演示一个简单的程序,该程序在CLR/WinForm App中使用DirectShow方法吗?我已经在Win32/WinForm App下使用DirectShow制作了一些成功的示例.
但是,当我在CLR/WinForm中进行相同的操作时,总是出现错误,例如:

Hi there,

can anybody show me an easy programm that uses directshow methods with a CLR/WinForm App? I''ve already made some successful samples using directshow under Win32/WinForm App.
But when i made the same thing in CLR/WinForm, it has always errors, for example like that:

1>TEST.obj : error LNK2020: Unresolved token (0A000016) IID_IMediaEvent.
1>TEST.obj : error LNK2020: Unresolved token (0A000017) IID_IMediaControl. 
1>TEST.obj : error LNK2020: Unresolved token (0A000019) CLSID_FilterGraph.
1>TEST.obj : error LNK2020: Unresolved token (0A00001A) IID_IGraphBuilder.
1>TEST.obj : error LNK2001: Unresolved extern symbol "IID_IMediaEvent".
1>TEST.obj : error LNK2001: Unresolved extern symbol "IID_IMediaControl".
1>TEST.obj : error LNK2001: Unresolved extern symbol "IID_IGraphBuilder".
1>TEST.obj : error LNK2001: Unresolved extern symbol "CLSID_FilterGraph".
1>c:\dokumente und einstellungen\cmadmin\eigene dateien\visual studio 2010\Projects\TEST\Debug\TEST.exe : fatal error LNK1120: 8 Unresolved extern references.



尽管我之前确实添加了strmiids.lib,quartz.lib和ole32.lib.

非常感谢!



although i did add strmiids.lib, quartz.lib and ole32.lib before.

Thank you very much!

推荐答案

看看: ^ ]和 #pragma管理 [
Have a look at: __uuidof Operator[^] and #pragma managed[^]

As long as you have something that works for Win32 this should help you to get things working with managed code.

Best regards
Espen Harlinn


这篇关于在CLR/Windows窗体应用程序下使用DirectShow方法时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆