Marking System.IntPtr as ref ... but in MC++

M

Markus Eßmayr

Hello,

I believe, this is an easy task to do, but I couldn't find the way to do it!

I'd like to code the following function

[C#]
void DemoFunction(ref IntPtr somePointer)
{
somePointer = 1234;
}

in MC++.
But how should I declare it?

[MC++]
void DemoFunction(IntPtr^ somePointer)
translates to
[C#]
void DemoFunction(ValueType somePointer)

Please help!
Thanks VERY MUCH in advance!

Regards,
Max
 
G

Guest

I think you're confusing MC++ with C++/CLI. The C++/CLI equivalent is (via
Instant C++):
private:
void DemoFunction(IntPtr %somePointer)
{
somePointer = 1234;
}
The MC++ (2003) equivalent is:
private:
void DemoFunction(IntPtr &somePointer)
{
somePointer = 1234;
}

--
http://www.tangiblesoftwaresolutions.com
C++ to C#
C++ to VB
C++ to Java
C++ to C++/CLI
Instant C#: VB to C# converter
Instant VB: C# to VB converter
Instant C++: convert VB or C# to C++/CLI
 

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