Declaring a parameter as a REF or OUT ARRAY

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
 
T

Tomas Restrepo \(MVP\)

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)
 
G

Gary Chang

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.
--------------------
 

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