R
Ryan Gregg
I'm working on creating a wrapper for some old code we have in C++ so that
we can call it from a C# program. In C++ we have several functions defined
that use the following notation:
static long CalcCPL(double API60, double Temperature, double Pressure,
double& ComputationalCPL, double& PrintingCPL);
Where the double& arguments are output values from the function call. When
I compile these into a managed C++ class, and try to use it from inside a C#
program, I get the following message:
C:\Class1.cs(27): Argument '3': cannot convert from 'out double' to
'double*'
C:\Class1.cs(27): Argument '4': cannot convert from 'out double' to
'double*'
C:\Class1.cs(27): Argument '5': cannot convert from 'out short' to 'short*'
I've tried defining the function using the [Out] attribute or the [Ref]
attribute, but I get the same errors. Can someone help me figure out what
I'm doing wrong?
Thanks.
Ryan Gregg
we can call it from a C# program. In C++ we have several functions defined
that use the following notation:
static long CalcCPL(double API60, double Temperature, double Pressure,
double& ComputationalCPL, double& PrintingCPL);
Where the double& arguments are output values from the function call. When
I compile these into a managed C++ class, and try to use it from inside a C#
program, I get the following message:
C:\Class1.cs(27): Argument '3': cannot convert from 'out double' to
'double*'
C:\Class1.cs(27): Argument '4': cannot convert from 'out double' to
'double*'
C:\Class1.cs(27): Argument '5': cannot convert from 'out short' to 'short*'
I've tried defining the function using the [Out] attribute or the [Ref]
attribute, but I get the same errors. Can someone help me figure out what
I'm doing wrong?
Thanks.
Ryan Gregg