|
-
July 2nd, 2001, 09:49 AM
#1
how to pass a array
I had a ATL class,
It has a method,
the method retrieves a array,
for examples:
MyMethod([in] VARIANT myArray)
it can't work
when I create instance follow:
Dim x as Object
Set x = CreateObject("MyObjectID")
Dim a(10)
X.MyMethod a
but it work normally follow:
Dim x as New MyObjectTypeLib.MyObjectID
Dim a(10)
X.MyMethod a
Why?
Who can help me?
Thanks
jiatiejun
-
July 2nd, 2001, 10:25 AM
#2
Re: how to pass a array
Check the type of the variant that is passed in using the first method.
Chances are it is VT_BYREF|VT_VARIANT, so you should "dereference" it
using VariantCopyInd function.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|