接口中的方法声明 [英] Method declaration in an interface

查看:272
本文介绍了接口中的方法声明的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

[id(203),helpstring(方法LoadPolyDataXml)] HRESULT LoadPolyDataXml([out,retval] CComBSTR bstrPolyData);



我收到错误:

错误1错误MIDL2025:语法错误:期待CComBSTR附近的类型规范

HOw to solvE?

[id(203), helpstring("method LoadPolyDataXml")] HRESULT LoadPolyDataXml([out,retval]CComBSTR bstrPolyData);

I get an error as:
Error 1 error MIDL2025 : syntax error : expecting a type specification near "CComBSTR"
HOw to solvE?

推荐答案

CComBSTR是MIDL的一个未知类,你必须使用通用类型:BSTR

CComBSTR is an unknown class for MIDL, you must use the "generic" type: BSTR
[id(203), helpstring("method LoadPolyDataXml")]
HRESULT LoadPolyDataXml([out,retval]BSTR bstrPolyData);



CComBSTR可以在程序中使用此方法。


CComBSTR can be used in the program using this method.


这篇关于接口中的方法声明的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆