R
Randy
Hi all,
I want to pass a reference from a C# app to a
managed CPP dll, keep getting the errors
Argument '1': cannot convert from 'out double' to 'double*'
Argument '2': cannot convert from 'out int' to 'int*'
I've been tying things till I'm red in the eyes....
Thanks for any help. I've searched the web several times,
and looked at maybe 0.0002% of the 1 GHits, haven't found
anything that helps.
I can use unsafe/fixed to get pointers in C#, but that
seems silly.
Randy
C# -----------
CClassM cls = new CClassM();
double A;
int B;
cls.DoSomething(out A, out B);
// also tried ref A, ref B
Managed CPP ------------------
public __gc class CClassM
{
CClassM() { }
~CClassM() { }
void DoSomething(double* pA, int* pB)
{ ........ }
// Also tried double&, int&
// Also tried [Out]double, [Out]int
// Also tried [Out]double*, [Out]int*
// Also tried [Out]double**, [Out]int**
};
I want to pass a reference from a C# app to a
managed CPP dll, keep getting the errors
Argument '1': cannot convert from 'out double' to 'double*'
Argument '2': cannot convert from 'out int' to 'int*'
I've been tying things till I'm red in the eyes....
Thanks for any help. I've searched the web several times,
and looked at maybe 0.0002% of the 1 GHits, haven't found
anything that helps.
I can use unsafe/fixed to get pointers in C#, but that
seems silly.
Randy
C# -----------
CClassM cls = new CClassM();
double A;
int B;
cls.DoSomething(out A, out B);
// also tried ref A, ref B
Managed CPP ------------------
public __gc class CClassM
{
CClassM() { }
~CClassM() { }
void DoSomething(double* pA, int* pB)
{ ........ }
// Also tried double&, int&
// Also tried [Out]double, [Out]int
// Also tried [Out]double*, [Out]int*
// Also tried [Out]double**, [Out]int**
};