01-27-2009 01:32 PM
I am using an ActiveX control that wants me to provide a pointer to the location of a sub routine. The subroutine processes information passed back by the ActiveX control. How would this be coded in LV? In C++, it looks like the code below:
int ProcessFile(const char *filein)
{
SetOutputHandler(myOutputHandler);
// addtional calls to ActiveX to process filein
}
void myOutputHandler(int type,int param)
{
// routine to process tyep and param
}
So to sum it up, how do I create myOutputHandler in LV and provide the ActiveX control a pointer to it?
01-28-2009 03:40 AM
01-28-2009 04:12 AM
Hi there
if the control exports an event then you can use the "register event callback" function. This will let you pass a VI reference to a vi that will be called when the event arrives.
Can you post some code (including the control)?
01-28-2009 04:57 PM
No.... unfortunatly no event is returned by the .dll. It insists that I pass it a pointer and the it will decide when my code will be called. I tossed that particular software in the trash and am going with a software vendor that is a bit more complient in the ways of coding.
I looked at the .net stuff as well as it might have worked with the whole delegate and proxy, but again decided it was too much trouble.
Thanks for the feedback!