描述:
用Atl方式编写一个组件,其中一个接口需要传递CObArray或其它数组参数,问如何设置集合型参数?如何编写这个接口?
解决方案1:
use SafeArray
http://www.codeguru.com/activex/csafe.shtml
A Simple SafeArray Wrapper - Praveen S. Kumar (1999/07/18)
http://www.codeguru.com/activex/sending_com_arrays.shtml
Using COM to Pass Arrays - Jeff Lundgren (1998/11/08)
http://www.codeguru.com/activex/multiarray.shtml
Using a Multidimensional SAFEARRAY to pass data across from COM objects - Aravind Corera (1998/11/10)
http://www.codeguru.com/activex/safearray.shtml
Passing DYNAMIC Data QUICKLY using SafeArrays - 2 - Andrew Schafer (1999/02/14)
http://www.codeguru.com/activex/comarray_struct.shtml
Passing arrays of structures in COM - Reg Anderson (1999/03/05)