怎样传递给ocx控件一个variant数组??是用safearray吗?
--vb如下
Sub ReFFT_Example() 'Generate an array with random numbers and compute its FFT. Const n = 256 Dim x As Variant, y As Variant, z As Variant Dim seed As Variant seed = 17 x = CWDSP1.Uniform(n, seed) //返回一variant数组,n=数组个数,CWDSP1--ocx CWDSP1.ReFFT x, y, zEnd Sub
----
可是我在vc中用_varint_t vt[100],程序却非法。
--vb如下
Sub ReFFT_Example() 'Generate an array with random numbers and compute its FFT. Const n = 256 Dim x As Variant, y As Variant, z As Variant Dim seed As Variant seed = 17 x = CWDSP1.Uniform(n, seed) //返回一variant数组,n=数组个数,CWDSP1--ocx CWDSP1.ReFFT x, y, zEnd Sub
----
可是我在vc中用_varint_t vt[100],程序却非法。
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)