O
obiwanjacobi
Hi there,
This is probably a really dump question but I'm stuck and need a leg-
up with this.
I'm writing a C++ interop layer that couples a managed plugin to an
unmanaged host (specifically its a managed implementation for a
Virtual Studio Technology -VST- plugin). So I'm writing a thin C++
layer that does little more than marshal calls to the managed layer.
In this scenario I need to call a managed method with an out parameter
(or ref, I control the method, but it has more than one return value)
from C++. My last C++ experience dates back from when .NET 1.0 was in
beta, so I'm a little rusty ;-), I've been doing C# ever since.
So the compiler keeps telling me it can convert all kinds of pointer
types I've tried to "MyType%". I have no clue how to get a '%' pointer/
reference. This is what I've got so far (an doesn't work) - left out
some details to focus on problem-:
managed:
bool MyMethod(out string extraReturn);
unmanaged:
gcroot<System::String^> myString; -or-
System::String myString;
bool success = MyMethod(string); -or-
bool success = MyMethod(&string);
Please do not fear to give me the RTFM advice, as long as you point
out where I can find the "manual" ;-)
Thanx,
Marc Jacobi
This is probably a really dump question but I'm stuck and need a leg-
up with this.
I'm writing a C++ interop layer that couples a managed plugin to an
unmanaged host (specifically its a managed implementation for a
Virtual Studio Technology -VST- plugin). So I'm writing a thin C++
layer that does little more than marshal calls to the managed layer.
In this scenario I need to call a managed method with an out parameter
(or ref, I control the method, but it has more than one return value)
from C++. My last C++ experience dates back from when .NET 1.0 was in
beta, so I'm a little rusty ;-), I've been doing C# ever since.
So the compiler keeps telling me it can convert all kinds of pointer
types I've tried to "MyType%". I have no clue how to get a '%' pointer/
reference. This is what I've got so far (an doesn't work) - left out
some details to focus on problem-:
managed:
bool MyMethod(out string extraReturn);
unmanaged:
gcroot<System::String^> myString; -or-
System::String myString;
bool success = MyMethod(string); -or-
bool success = MyMethod(&string);
Please do not fear to give me the RTFM advice, as long as you point
out where I can find the "manual" ;-)
Thanx,
Marc Jacobi