M
microsoft
Hi All,
I am fairly new to Managed C++ extensions. I started trying to implement a
interface defined in a C# project, in C++. The problem was with passing
value arrays from c# to c++. I found examples on the web which worked, but
found mine didn't. After narrowing down the interface I found what I believe
to be the problem. The order of the parameters! The code below shows the
function that does not compile named QueryPositionsForward. When reversing
the parameters illustrated by function QueryPositionsReverse, all appears to
work. ildasm reveals that the function, when reversed, compiles to the same
signature as the c# interface with function reversed (not included in the
code).
Any ideas as to what is causing this? Is it a compiler glitch, or a user
glitch
Thanks
Olly
#include "stdafx.h"
#using <mscorlib.dll>
using namespace System;
public __gc class DriveClass
{
public:
void QueryPositionsForward(Object* AxisList __gc[], double (__gc *
Positions) __gc[]){}
void QueryPositionsReverse(double (__gc * Positions) __gc[], Object*
AxisList __gc[]){}
};
I am fairly new to Managed C++ extensions. I started trying to implement a
interface defined in a C# project, in C++. The problem was with passing
value arrays from c# to c++. I found examples on the web which worked, but
found mine didn't. After narrowing down the interface I found what I believe
to be the problem. The order of the parameters! The code below shows the
function that does not compile named QueryPositionsForward. When reversing
the parameters illustrated by function QueryPositionsReverse, all appears to
work. ildasm reveals that the function, when reversed, compiles to the same
signature as the c# interface with function reversed (not included in the
code).
Any ideas as to what is causing this? Is it a compiler glitch, or a user
glitch
Thanks
Olly
#include "stdafx.h"
#using <mscorlib.dll>
using namespace System;
public __gc class DriveClass
{
public:
void QueryPositionsForward(Object* AxisList __gc[], double (__gc *
Positions) __gc[]){}
void QueryPositionsReverse(double (__gc * Positions) __gc[], Object*
AxisList __gc[]){}
};