佚名通过本文主要向大家介绍了com 检查失败问题,dr.com常见问题,dr.com问题,com问题,sem结构化面试问题等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
问题: COM 传递结构问题
描述:
描述:
用ATL写的COM,自定义了两个结构MSG_Req和MSG_Resp,接口GetTransInfo([in]BSTR TCode,[in]MSG_Req *pMSG_Req,[out]MSG_Resp *pMSG_Resp),其中的后2个参数是一个输入结构,一个是输出结构,是否在使用上有问题。
编译时提示:E:\SSCC\SSCC.idl(18) : error MIDL2025 : syntax error : expecting a type specification near "MSG_Req"
错误定位在:[id(3), helpstring("method GetTransInfo")] HRESULT GetTransInfo([in]BSTR TCode,[in]MSG_Req *pMSG_Req,[out]MSG_Resp *pMSG_Resp);