12-27-2010 12:48 AM
The IEC61850_Associate_Req function has a callback fuction Confirmation as one of its parameters. How do I implement the callback using the Call Library Function node
int_stdcall Confirmation(LPCTSTR Msg)
{
printf("\n***Confirmation (callback)***\n%s\n", Msg);
return 0;
}
result= IEC61850_Associate_Req(request.c_str(), Confirmation, confirmation, 1024);
if(result)
{
return result;
}
Thanks in advance.
Regards,
Vivek
12-27-2010 05:44 AM
Basically you can't. LabVIEW does not allow to use pointers, much less function pointers. The only feasable solution IMHO is to write a wrapper DLL in C/C++ that translates the Callback function into a LabVIEW user event or similar. Search for PostLVUserEvent() here in the forum for many discussions and possible solutions to the callback function problem.