473,405 Members | 2,141 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Managed C++ to C#

What Method signature do you use in Managed C++ that will appear as the
following in C#--
F1(out int Int1){}

I have tried--
public void F1(int^ Int1){}

Thanks.

--
John Olbert

Dec 1 '06 #1
3 1113
using namespace System::Runtime::InteropServices;

void F1([Out] int% Int1);

Marcus

"John Olbert" <so*****@snet.netwrote in message
news:99**********************************@microsof t.com...
What Method signature do you use in Managed C++ that will appear as the
following in C#--
F1(out int Int1){}

I have tried--
public void F1(int^ Int1){}

Thanks.

--
John Olbert

Dec 1 '06 #2
Thanks that did it.

I found the keyword "%" but have not been able to find the [In] in the Msdn.
Could you suggest where to learn more about it. Is it an Attribute?

Thanks again.

--
John Olbert

"Marcus Heege" wrote:
using namespace System::Runtime::InteropServices;

void F1([Out] int% Int1);

Marcus

"John Olbert" <so*****@snet.netwrote in message
news:99**********************************@microsof t.com...
What Method signature do you use in Managed C++ that will appear as the
following in C#--
F1(out int Int1){}

I have tried--
public void F1(int^ Int1){}

Thanks.

--
John Olbert


Dec 5 '06 #3

"John Olbert" <so*****@snet.netwrote in message
news:2C**********************************@microsof t.com...
Thanks that did it.

I found the keyword "%" but have not been able to find the [In] in the
Msdn.
Could you suggest where to learn more about it. Is it an Attribute?
Yes. Lookup System.Runtime.InteropServices.InAttribute and
System.Runtime.InteropServices.OutAttribute. It also works with the full
name [OutAttribute] or [System::Runtime::InteropServices::OutAttribute], if
the name you supplied isn't found, the compiler automatically tries again
adding "Attribute" as a suffix.
>
Thanks again.

--
John Olbert

"Marcus Heege" wrote:
>using namespace System::Runtime::InteropServices;

void F1([Out] int% Int1);

Marcus

"John Olbert" <so*****@snet.netwrote in message
news:99**********************************@microso ft.com...
What Method signature do you use in Managed C++ that will appear as the
following in C#--
F1(out int Int1){}

I have tried--
public void F1(int^ Int1){}

Thanks.

--
John Olbert



Dec 5 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Bob Rock | last post by:
Hello, in the last few days I've made my first few attempts at creating mixed C++ managed-unmanaged assemblies and looking aftwerwards with ILDASM at what is visible in those assemblies from a...
1
by: lolomgwtf | last post by:
I have a managed C++ method that wraps unmanaged code and creates a managed object holding data retrieved form an unmanged one. I want create an instance of this managed class in C#, pass it to...
16
by: Ekim | last post by:
hello, I'm allocating a byte-Array in C# with byte byteArray = new byte; Now I want to pass this byte-Array to a managed C++-function by reference, so that I'm able to change the content of the...
2
by: lolomgwtf | last post by:
I have a managed C++ method that wraps unmanaged code and creates a managed object holding data retrieved form an unmanged one. I want create an instance of this managed class in C#, pass it to...
2
by: asanford | last post by:
We use StackWalk(StackWalk64) from dbghelp.dll to walk our callstacksas needed, using the various Sym* methods (SymGetSymFromAddr, SymGetLineFromAddr) to resolve source file, function name, and...
4
by: William F. Kinsley | last post by:
My understanding is that when I re-compile a existing MFC application with the /clr switch, that the code generated is managed(with some exceptions) but that the data isn't, i.e. not garbage...
9
by: Amit Dedhia | last post by:
Hi All I have a VC++ 2005 MFC application with all classes defined as unmanaged classes. I want to write my application data in xml format. Since ADO.NET has buit in functions available for...
12
by: DaTurk | last post by:
Hi, I have a rather interesting problem. I have a unmanged c++ class which needs to communicate information to managed c++ via callbacks, with a layer of c# on top of the managed c++ ultimatley...
3
by: Klaus | last post by:
Hi, I have an existing VC 6 MFC application which communicates asynchronly with a VC 2005 managed code dll. I use an unmanaged base class with virtual functions to access methods in the MFC...
8
by: Varangian | last post by:
Hello, was wondering of how to dispose of managed resources? or referencing every member of a class to null will release resources...? http://www.marcclifton.com/tabid/79/Default.aspx...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.