佚名通过本文主要向大家介绍了
把SAFEARRAYpSa变量作为参数传给一个接口的方法,为什么会出错?在一个方法中参数类型是不是只能用固定的几种?等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
问题: 把SAFEARRAY pSa 变量作为参数传给一个接口的方法,为什么会出错?在一个方法中参数类型是不是只能用固定的几种?
描述:
描述:
方法声明
[id(1), helpstring("method Show")] HRESULT Show([in] SAFEARRAY *pSa);
错误类型:
error MIDL2139 : type of the parameter cannot derive from void or void * : [ Type 'PVOID' ( Parameter 'pSa' ) ]
error MIDL2105 : pointee / array does not derive any size : [ Field 'rgsabound' of Struct 'tagSAFEARRAY' ( Parameter 'pSa' ) ]
warning MIDL2039 : interface does not conform to [oleautomation] attribute : [ Parameter 'pSa' of Procedure 'Show' ( Interface 'ITA' ) ]
Error executing midl.exe.