error C3861: 'CoInitializeEx': identifier not found (DirectShow SDK 例子运行错误信息解决)
Posted on 2006-09-03 22:54 xuanfeng 阅读(4008) 评论(0) 编辑 收藏 举报
错误信息:
错误 6 error C3861: 'CoInitializeEx': identifier not found
解决:
在出错代吗文件前面添加以下代码:
#define _WIN32_DCOM
#include <dshow.h>
#include <windows.h>
#include <malloc.h>
#include <objbase.h>
如果不行,再添加下行代码引用库文件:
#pragma comment(lib, "ole32.lib" )
错误 6 error C3861: 'CoInitializeEx': identifier not found
解决:
在出错代吗文件前面添加以下代码:
#define _WIN32_DCOM
#include <dshow.h>
#include <windows.h>
#include <malloc.h>
#include <objbase.h>
如果不行,再添加下行代码引用库文件:
#pragma comment(lib, "ole32.lib" )