SAFEARRAY [in] and [out]

M

MB Blackburn

I tried posting this over in microsoft.public.office.developer.automation &
microsoft.public.vb.ole.automation.
But no one has answered there so I'm going to give this group a shot!

I have a question about VBA code in Excel.
It is talking to an ActiveX component.
Several methods in the component have method signatures that contain [in]
parameters of type SAFEARRAY.
More precisely the idl code reads:
[in] SAFEARRAY (float)* for the input and [out, retval] SAFEARRAY (float)*
for the output.

When I call a method with the [in] SAFEARRAY param, life is good.
However, when I try to call a method with the [out, retval] SAFEARRAY param,
the methods fails with message: Unsupported automation type.
To get the method to work I have to change the idl code to read: [out,
retval] VARIANT *

The question: why is the SAFEARRAY recognized as a legit type for in params
but not out params?

m blackburn
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top