在程序的我用::CoCreateInstance编译是可以通过的,但用::CoCreateInstanceEx却编译通不过
错误:
:\TestVC\com\Test1\Test1.cpp(42) : error C2039: 'CoCreateInstanceEx' : is not a member of '`global namespace''
D:\TestVC\com\Test1\Test1.cpp(42) : error C2065: 'CoCreateInstanceEx' : undeclared identifier
去掉::也通不过error C2065: 'CoCreateInstanceEx' : undeclared
郁闷???加objbase.h也是一样
错误:
:\TestVC\com\Test1\Test1.cpp(42) : error C2039: 'CoCreateInstanceEx' : is not a member of '`global namespace''
D:\TestVC\com\Test1\Test1.cpp(42) : error C2065: 'CoCreateInstanceEx' : undeclared identifier
去掉::也通不过error C2065: 'CoCreateInstanceEx' : undeclared
郁闷???加objbase.h也是一样
解决方案 »
- WH_MOUSE_LL截取鼠标消息怎么写?
- 如何用C语言实现实现webbrowers 的IDocHostUIHandler接口?
- 简单的问题,dll不能register
- 程序只能放在C盘运行,为什么?
- 学习C++ 问题。钱能c++ 教程中的代码不能编译
- 如何制作DLL?
- ioctlsocket函数的怪异行为! 不解,请大家互相探讨!
- windows下在一个目录中最多可以创建多少个文件?
- 高手请指教,新建立的视图为什么没有打印功能?急,在线等待
- 80分大派送,谁有显示JPG文件的VC++程序???急!
- 请问为什么VC在windows Xp编译程序是会出现一下黑屏? (求助)
- 一个用来管理资料的软件,功能强大!希望大家能够喜欢
Requirements
Windows NT/2000/XP: Requires Windows NT 4.0 or later.
Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
Header: Declared in objbase.h.
Library: Use ole32.lib.
Windows NT/2000/XP: Requires Windows NT 4.0 or later.
Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
Header: Declared in objbase.h.
Library: Use ole32.lib.
CoCreateInstance能用,我用的是win2k_p
还有请问有没有AnsiToUnicode这样的函数,msdn中居然找不到,书上居然有
#define WINVER 0x0500
试试
用这个MultiByteToWideChar
在stdafx.h中加入#define _WIN32_WINNT 0x0500楼上的加#define WINVER 0x0500不行结帖