HRESULT TestArray([in] SAFEARRAY lOp1,[out,retval] SAFEARRAY * plResult);错在哪里?
在idl文件中加了这一句之后编译就不能通过!
编译信息:
error MIDL2139 : type of the parameter cannot derive from void or void * : [ Type 'PVOID' ( Parameter 'lOp1' ) ]
error MIDL2105 : pointee / array does not derive any size : [ Field 'rgsabound' of Struct 'tagSAFEARRAY' ( Parameter 'lOp1' ) ]
warning MIDL2039 : interface does not conform to [oleautomation] attribute : [ Parameter 'lOp1' of Procedure 'TestArray' ( Interface 'IMath' ) ]
error MIDL2139 : type of the parameter cannot derive from void or void * : [ Type 'PVOID' ( Parameter 'plResult' ) ]
error MIDL2105 : pointee / array does not derive any size : [ Field 'rgsabound' of Struct 'tagSAFEARRAY' ( Parameter 'plResult' ) ]
error MIDL2040 : [out] only parameter cannot be a pointer to an open structure : [ Parameter 'plResult' of Procedure 'TestArray' ( Interface 'IMath' ) ]
warning MIDL2039 : interface does not conform to [oleautomation] attribute : [ Parameter 'plResult' of Procedure 'TestArray' ( Interface 'IMath' ) ]
Error executing midl.exe.
- 5 error(s), 2 warning(s)
是不是因为没有包括某些文件啊?
高手指点!