I need to pass an empty Array of Variants to a DLL written in C (and available on all Windows versions), and the C code (which I have no control over and cannot edit) will populate the Empty Array of Variants with its some return values.
Bascially, when I try this - the ByRef Array is always empty when it should contain the results of the function/sub call (if I do the exact same thing in .NET, it works).
I'm thinking I need to do a custom declaration so VB knows how to call the C function, or?
Here is how the C sub/function is declared. Given this, what do I need to do in order to ensure C is able to use my Empty Array properly and I in tern get my results back?
HRESULT InvokeAction(
[in] BSTR bstrActionName,
[in] VARIANT varInActionArgs,
[in, out] VARIANT *pvarOutActionArgs,
[in, out] VARIANT *pvarRetVal
);
More information about this function: http://msdn.microsoft.com/en-us/library/aa382237(VS.85).aspx
Thanks