I have a .NET class library that I wrote in C++. "public ref class MyClass" defines a method "MyMethod" that takes two System::Int32 parameters.
Here is MyClass first then my question:
namespace MyNetAssembly {
public ref class MyClassThatDoesStuff
{
public:
MyClassThatDoesStuff();
void MyMethod(System::Int32^ number1, System::Int32^ number2);
property System::Int32 MyProperty{
int get (){
return *_result;
}
void set(System::Int32 value){
}
}
private:
int^ _result;
};
}
Here is the cpp code:
MyNetAssembly::MyClassThatDoesStuff::MyClassThatDoesStuff()
{
*_result = 0;
}
void MyNetAssembly::MyClassThatDoesStuff::MyMethod(System::Int32^ number1, System::Int32^ number2)
{
*_result =(*number1 + *number2) * 100;
}
When I load this assembly from LabView 8.5 using "Constructor Node" vi. Then, I try to invoke MyMethod() using an "Invoke Method" vi, I get the parameters to the method to be of "ValuteType" and not "Int32" as I expect to use directly with LabView constants and controls. Rather, when I create a constant by right clicking on the connector for the parameter, I get ".NET Object"!
Please, How can I get LabView to recognize parameter types?
Note: I tried to change parameters from System::Int32^ number1
to System::Int32 number1
. That did not help either.