Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / November 2005

Tip: Looking for answers? Try searching our database.

Type% => out Type in C#

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Lloyd Dupont - 07 Nov 2005 06:52 GMT
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)?

Signature

Regards,
Lloyd Dupont

NovaMind development team
NovaMind Software
Mind Mapping Software
<www.nova-mind.com>

adebaene@club-internet.fr - 07 Nov 2005 09:53 GMT
> 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#
[quoted text clipped - 9 lines]
> 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
Lloyd Dupont - 07 Nov 2005 23:41 GMT
>> Is there a way to mark my MC++ as a 'out' declaration (as opposed to an
>> 'ref' one)?
>
> Apply the OutAttribute to the argument.

oh.. well, that was easy.
thanks for that!

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.