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


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

 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值