K
kpkirilov_bg
Guest
I am use C++/CLI to wrapper native C++ class. I'm use wrapper class in C#.
One the methods of the C++ native class has the following declaration:
void Test(int *pnNum1, int *pnNum2);
The method Test of the C++/CLI managed class has the following declaration:
void Тest([Out]interior_ptr<int> pnNum1, [Out]interior_ptr<int> pnNum2); The parameter pnNum1 and pnNum2 passing by reference.
void ManageClass::Test[Out]interior_ptr<int> pnNum1, [Out]interior_ptr<int> pnNum2)
{
NativeClassPtr->Test((int *)&pnNum1, (int *)&pnNum2); //did not work!!!
}
How do I pass a parameter by reference of the method Test NativeClassPtr->Test?
Continue reading...
One the methods of the C++ native class has the following declaration:
void Test(int *pnNum1, int *pnNum2);
The method Test of the C++/CLI managed class has the following declaration:
void Тest([Out]interior_ptr<int> pnNum1, [Out]interior_ptr<int> pnNum2); The parameter pnNum1 and pnNum2 passing by reference.
void ManageClass::Test[Out]interior_ptr<int> pnNum1, [Out]interior_ptr<int> pnNum2)
{
NativeClassPtr->Test((int *)&pnNum1, (int *)&pnNum2); //did not work!!!
}
How do I pass a parameter by reference of the method Test NativeClassPtr->Test?
Continue reading...