Declaring a parameter as a REF or OUT ARRAY

  • Thread starter Thread starter Michael Gunter
  • Start date Start date
M

Michael Gunter

Good afternoon,

I am creating an interface in C++ using the managed extensions. I need to
declare a parameter as an out string[] (as would be represented in C#). Does
anyone know how to do this? Declaring out parameters generally takes the
form:

[Out] <type> __gc* name

and arrays generally take the form:

<type> name __gc[];

However, none of the below work:

[Out] <type> name __gc[] __gc*;
[Out] <type> name __gc* __gc[];
[Out] <type> __gc* name __gc[];

Any ideas?

Michael Gunter
 
Michael,
I am creating an interface in C++ using the managed extensions. I need to
declare a parameter as an out string[] (as would be represented in C#). Does
anyone know how to do this? Declaring out parameters generally takes the
form:

[Out] <type> __gc* name

and arrays generally take the form:

<type> name __gc[];

However, none of the below work:

[Out] <type> name __gc[] __gc*;
[Out] <type> name __gc* __gc[];
[Out] <type> __gc* name __gc[];

What you want should probably be:
[Out] String * (&name) __gc[]

(ugly, yes, I know)
 
Hi Michael,

Thanks for posting in the community.

From your description, I understand that you want to declare a parameter
as an out string[] in an interface using the managed extensions.

Does Tomas's answer resolve your problem, if you still have questions or
concerns, please feel free to post it in the group.


Thanks!

Best regards,

Gary Chang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
 
Back
Top