Type% => out Type in C#

  • Thread starter Thread starter Lloyd Dupont
  • Start date Start date
L

Lloyd Dupont

I am writting a managed wrapper in MC++ (2.0) around a C API.
At some stage I would like to have an out parameter, as in this C#
declaration:
void Method(out AStruct anArg);

my MC++ declaration is the following:
void Method(AStruct% anArg);

unfortunately this translate in C# into a ref declaration:
void Method(ref AStruct anArg);

Is there a way to mark my MC++ as a 'ref' declaration (as opposed to an
'out' one)?

--
Regards,
Lloyd Dupont

NovaMind development team
NovaMind Software
Mind Mapping Software
<www.nova-mind.com>
 
Lloyd said:
I am writting a managed wrapper in MC++ (2.0) around a C API.
At some stage I would like to have an out parameter, as in this C#
declaration:
void Method(out AStruct anArg);

my MC++ declaration is the following:
void Method(AStruct% anArg);

unfortunately this translate in C# into a ref declaration:
void Method(ref AStruct anArg);

Is there a way to mark my MC++ as a 'ref' declaration (as opposed to an
'out' one)?

Apply the OutAttribute to the argument.

Arnaud
MVP - VC
 
Is there a way to mark my MC++ as a 'out' declaration (as opposed to an
Apply the OutAttribute to the argument.
oh.. well, that was easy.
thanks for that!
 
Back
Top