您的位置:首页 > 编程语言 > PHP开发

error C2065: 'CoSetProxyBlanket' : undeclared identifier 问题解决方法

2008-01-21 17:19 423 查看
CodeGuru Forums > Visual C++ & C++ Programming > Visual C++ Programming > Question about WMI

PDA
Click to See Complete Forum and Search --> : Question about WMI

godspeed
April 5th, 2006, 11:53 AM

Hi,

Can WMI be used in Visual C++ 6.0?

Thanks in advance

kirants
April 5th, 2006, 12:05 PM

Sure.

godspeed
April 6th, 2006, 09:40 PM

I tried adding the WMI code that works in .NET but I'm getting errors saying that:

error C2065: 'CoInitializeEx' : undeclared identifier
error C2065: 'CoSetProxyBlanket' : undeclared identifier
error C2065: 'EOAC_NONE' : undeclared identifier

This same code works in .NET, it seems that the problem is a direct issue of
#include <comdef.h> file being different in 6.0 and in .NET.

Does anyone know how to resolve this problem.

Any help would be appreciated

kirants
April 12th, 2006, 08:53 PM

You need to #define this in your header file to use CoInitializeEx:

#define _WIN32_DCOM

codeguru.com
Copyright 2007 Jupitermedia Corporation All Rights Reserved.

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐