I'm creating a C++/CLI wrapper DLL that depends on numerous C++ static libraries. Some of the function calls expect unmanaged pointers to be passed in. How do i pass them properly?
Also, other functions expect a "this pointer" to be passed in as a void*. What's the right way to pass "this"?
Here's my class definition...
public ref class RTPClient
{
public:
RTPClient();
~RTPClient();
bool Connect();
void Disconnect();
private:
CIsmaClient* mClient;
};
Here's my usage where the pointers in question are used...
RTPClient::RTPClient():
mClient(NULL)
{
CIsmaClient::Create(&mClient, NULL, &AllocBuffer, &GetDataPointer, this);
}
The usage of &mClient and "this" cause the following compiler errors... 1>.\VBLoadSimulatorDll.cpp(40) : error C2664: 'CIsmaClient::Create' : cannot convert parameter 1 from 'cli::interior_ptr' to 'CIsmaClient **' 1> with 1> [ 1> Type=CIsmaClient * 1> ]
1>.\VBLoadSimulatorDll.cpp(40) : error C2664: 'CIsmaClient::Create' : cannot convert parameter 5 from 'VBLoadSimulator::RTPClient ^const ' to 'VOID *'