建立示例"MyElevatedCOM"项目时出现问题. [英] Problems building sample 'MyElevatedCOM' projct.
问题描述
我正在尝试构建"MyElevatedCOM"项目.我的构建环境是32位Windows XP,VS2005 SP1和新下载的VISTA SDK.
我在解析BIND_OPTS3结构时看到错误.然后,我首先在包含文件"列表中放置VISTA SDK的路径.解决了BIND_OPTS3问题之后,我现在看到了这个问题:
错误1 MIDL2025错误:语法错误:期望]或,靠近"annotation"
C:\ Program Files \ Microsoft SDKs \ Windows \ v6 .0 \ Include \ unknwn.idl 108
错误2错误MIDL2026:无法从较早的语法错误中恢复;正在中止编译
C:\ Program Files \ Microsoft SDKs \ Windows \ v6.0 \ Include \ unknwn.idl 108
C:\ Program Files \ Microsoft SDKs \ Windows \ v6.0 \ Include 是VISTA SDK的包含目录.
它在抱怨这部分代码:
HRESULT QueryInterface(
[in] REFIID riid,
[out,iid_is(riid),注释("__ RPC__deref_out")] void ** ppvObject);
我的问题是:VS2005与VISTA SDK之间的兼容性如何? VS2005 MIDL编译器是否理解注释关键字?
任何想法?
I am trying to build the 'MyElevatedCOM' project. My build environment is 32bit Windows XP, VS2005 SP1 and the newly download VISTA SDK.
I was seeing an error during compilation with resolving the BIND_OPTS3 structure. Then I put the path for the VISTA SDK first in the Include Files list. While that resolved the BIND_OPTS3 issue I now see this problem:
Error 1 error MIDL2025 : syntax error : expecting ] or , near "annotation"
C:\Program Files\Microsoft SDKs\Windows\v6.0\Include\unknwn.idl 108
Error 2 error MIDL2026 : cannot recover from earlier syntax errors; aborting compilation
C:\Program Files\Microsoft SDKs\Windows\v6.0\Include\unknwn.idl 108
C:\Program Files\Microsoft SDKs\Windows\v6.0\Include is the VISTA SDK include directory.
It is complaining about this section of code:
HRESULT QueryInterface(
[in] REFIID riid,
[out, iid_is(riid), annotation("__RPC__deref_out")] void **ppvObject);
My question is: What's the compatibility between VS2005 and the VISTA SDK? Does the VS2005 MIDL compiler understand the annotation keyword ?
Any Ideas ?
推荐答案
您还是否在常规包含设置中添加了可执行文件(至bin)和库(至lib)在选项下?
这篇关于建立示例"MyElevatedCOM"项目时出现问题.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!