Accessing .Net Object methods which are generic containers of methods from native code

1 view (last 30 days)
I'm using a .NET version 4.0 assembly to load custom classes and methods. In one particular .NET class I am having difficulty invoking it's methods and one property with a get function, but have full access to most of it's properties (get() and set()). The class property is something like:
In Class1.h -
#pragma region Properties public: { property MyClass2^ MyDotNetPropertyForClass1 { MyClass2^ get(); } } #pragma region Properties #pragma region Member Functions public: bool MyDotNetMethodForClass1() { return MyNativeObject->MyNativeObjectMethod(); } #pragma region Member Functions
In Class1.cpp
MyClass2^ MyClass1::MyDotNetPropertyForClass1::get() { return gcnew MyClass2( &MyNativeObject->NativeMethod()); }
Basically Class1 has a method that creates a Class2 Object which is internal data from the Class1 object. Class1 and Class 2 are .NET wrappers of native code. When creating these .NET objects in VS, I have full access to the property and method, but in Matlab, these methods are hidden and cannot be invoked because they are not recognized.
I've tried to query the available property/method, to at least see the property and method using the the following how to guide: https://www.mathworks.com/help/matlab/matlab_external/display-net-generic-methods-using-reflection.html which describes a possible way to display generic methods of .NET classes, but this has not worked, and the function in that post returns nothing.
Any help would be greatly appreciated. Thank you.
rh

Answers (0)

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!