However there seems to be a few problems.
I have a prototype in C++/CLI which looks like the following:
int
f1(int nType, array<MY_TYPE ^> ^%pOut, int ^%npOut)There are a few problems with the following though. I want that the last two parameters should be output only parameters. In C# I want them to be specified with "out" keyword and not "ref".
However when I try to compile my code I get:
MY_TYPE [] Custom;
int nCustomCount;
Gives:
error CS1502: The best overloaded method match for
'f1(int, ref MY_TYPE[], ref System.ValueType)' has some invalid arguments
error CS1503: Argument '3': cannot convert from 'ref int' to
'ref System.ValueType'
I'm in doubt how to change the prototype to become output parameters instead of references and secondly why the last 'int' became a 'System.ValueType'.
Thanks in advance.

Specifying "out" parameters in C++/CLI
jrboddie
R&#233;mi
f1(int nType, [Out] array<MY_TYPE ^> ^%pOut, [Out] int %npOut)
-- Henrik
Art Gaisin