I have a C++\CLI wrapper to a C++ API of a commercial program. A certain wrapper function looks like this:
int ReleaseObject(WDataObject^ object) {
return (m_api->ReleaseObject(object->m_object));
};
On the previous version of the API, the C++ side was:
m_api->ReleaseObject(const api:DataObject *object)
And in the current API version the function has changed to:
m_api->ReleaseObject(const api:DataObject *&object)
My knowledge on C++\CLI is none and my C++ knowledge is very basic, and I have no clue on how to modify the wrapper function to make it compile.
I'd like to know how to modify the wrapper c++\CLI function to pass the object by reference according to what the C++ API expects.
EDIT:
Error when compiling:
Error 3 error C2664: 'int api::Api::ReleaseObject(api::DataObject *&)' : cannot convert argument 1 from 'api::DataObject *' to 'api::DataObject *&' ...\pf_api_test - 15.2.2\libs\digapiwrapper15.1_64bit\digApiWrapper.h 851 1 digApiWrapper
EDIT 2:
[SerializableAttribute]
public ref class WDataObject {
public:
api::DataObject* m_object;
WApi^ t_api;
String^ Name;
int Class;
String^ key;
WDataObject(api::DataObject* obj) { m_object = obj; };
~WDataObject();
/*HERE GOES ALL THE FUNCTIONS WHICH I'M NOT SURE IF THEY ARE RELEVANT*/
}