Hi,
I don't know how to pass a CSharp class type object to a CPP function that takes void pointer argument in the function.
eg.
in C#:
MQMDs md = new MQMDs();
MQGMOs gmo = new MQGMOs();
MQCBDs cbd = new MQCBDs();
using (Managed managed = new Managed())
{
managed.Execute();
int ret = managed.MQCBX(qMgr.myHconn,
operation,
cbd,
myQueue.hObj,
md,
gmo,
ref completionCode,
ref reason);
}
in VC++ (CLR):
public ref class Managed
{
public:
int MQCBX(MQHCONN hConn,
MQLONG op,
System::Void *cbd,
MQHOBJ hObject,
System::Void *mqmd,
System::Void *gmo,
MQLONG *iCompCode,
MQLONG *iReason);
I have created a CLR project in Visual Studio 2005, and also created a CSharp project as well. The CSharp project is the caller to the CLR project. The CLR project is compiled as a DLL.
Your help is greatly appreciated.
Thanks
SS