DirectShow 在vs2005中的问题解决之应用在ACTIVEX中
2008-07-21 16:40
417 查看
Activex 使用DirectShow的问题解决方案
下面的编译问题:strmbasd.lib(dllentry.obj) : error LNK2001: unresolved external symbol "class CFactoryTemplate * g_Templates" (?g_Templates@@3PAVCFactoryTemplate@@A)
strmbasd.lib(dllentry.obj) : error LNK2001: unresolved external symbol "int g_cTemplates" (?g_cTemplates@@3HA)
解决方法:
在xxxctrl.h中加入下面的代码
/////////////////////////////////////////////////////////////////////////////
// DllGetClassObject
extern "C"
STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
return AfxDllGetClassObject(rclsid, riid, ppv);
}
/////////////////////////////////////////////////////////////////////////////
// DllCanUnloadNow
extern "C"
STDAPI DllCanUnloadNow(void)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
return AfxDllCanUnloadNow();
}
////////////////////////////////////////
相关文章推荐
- 1.VC(custom)-DirectShow9.0在vs2005中存在的问题解决
- (转)DirectShow9在VS2005或vc6.0下编译出现问题的解决方法
- DirectShow 在vs2005中的问题解决之实例分析
- DirectShow 在vs2005中的问题解决之基类编译问题
- VS2005编译DirectShow的问题与解决
- DirectShow 在vs2005中的问题解决之其它类文件编译错误问题处理
- DirectShow 在VS2005/VS2010中环境配置和编译运行出现 winnt.h(5940)错误问题的解决
- DirectShow9.0在vs2005中存在的问题解决
- DirectShow 在vs2005中的问题解决之环境配置
- 设计模式的实际应用——在C#中解决单客户端窗口数据并发问题(2010-08-04)
- 面向接口编程在Java web 三层架构的应用与使用工厂模式解决问题
- Android开发更改应用图标无效的问题 最终解决办法
- Android 使用android-support-multidex解决Dex超出方法数的限制问题,让你的应用不再爆棚
- Android安装应用后点击"打开"(Open)带来的问题及解决方式
- 解决vs2005不能调试的问题。
- 业内专家:产品设计中短信验证码应用问题解决策略
- PHP截取汉字乱码问题解决方法mb_substr函数的应用
- Android 解决65535的限制 使用android-support-multidex解决Dex超出方法数的限制问题,让你的应用不再爆棚
- 流式计算strom,Strom解决的问题,实现实时计算系统要解决那些问题,离线计算是什么,流式计算什么,离线和实时计算区别,strom应用场景,Strorm架构图和编程模型(来自学习资料)
- 解决应用支持多语言时,切换语言后重启的问题