Hi all,
I'm hosting CLR in a C++ unmanaged application.
Everything works fine, but I'm having just one problem.
When I try to call a C# method with a signature like this:

public long MyMethod(ref uint[] myValues) { ... };

I can't find the right way to declare the myValues parameter as an array in
DISPPARAMS parameter of the IDispatch Invoke method.
I'm using a SAFEARRAY, declared as:

dispparams.rgvarg[2].vt = VT_ARRAY | VT_BYREF;
dispparams.rgvarg[2].pparray = myArray;

And I'm creating myArray with SafeArrayCreate.
The array crosses unmanaged boundaries and my C# code can read it, but when
the call comes back I get a 80004002 error (No such interface supported).
Does someone have any idea/suggestion?
Thanks,
Paolo

===================================
This list is hosted by DevelopMentor�  http://www.develop.com
Some .NET courses you may be interested in:

NEW! Guerrilla ASP.NET, 26 Jan 2004, in Los Angeles
http://www.develop.com/courses/gaspdotnetls

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to