How can I access the data associated with an event within the event handler function?

Hello

In my LabWindows code, I try to use a DLL that has been developed in .NET (c#).  I used the built-in labwindows Wizard that converts the DLL to a usable 'instrument'.  Almost everything seems to work, except that I have 1 problem.

There is an event (defined in the DLL) that I am able to detect.  I know that the reminder of the event is called at the right time.  But the problem is that in this function, I can't access the data that is supposed to be attached to the event.  It worked fine in c#, but I don't know how to do in LabWindows.  Here's what looked like in c# event handler function:

void AppLoaderEventCallback (CommonLib.CommandResult MyResults)

{

MyResults is used in the body of this function

}

But in LabWindows, I can't seem to access the MyResults data structure.  Here's what I do:

public static int CVICALLBACK AppLoaderEventCallback (CommonLib_CommandResult MyResults)

{

I can't access MyResults here

}

Can you help me with this?  I'm doing something wrong?

Thank you very much for your help.

-Mike

I think that your statement of callback function is perhaps not quite correct. Look using the parameter "callback function" function Panel of the generated __Create function associated with this event. This shows the declaration of the callback function - make sure that your callback function is declared in the same way.

Tags: NI Software

Similar Questions

Maybe you are looking for