Asynchronous DLL Access in LabVIEW?

I have a LabVIEW application that sends data to a C ++ application through a DLL. Now I need to send the data back to the LabVIEW application from C ++. Can I run the code in LabVIEW from a DLL call, or do I need to periodically poll the DLL to see if new data is waiting?

Or am I completely wrong about this?

+5
source share
1 answer

You can create an event from C ++ to fire a regular LabVIEW event.
Here is the NI forum post discussing this structure. And the code snippet from this thread:

#include <utility.h>
#include <extcode.h>
#include "EventDLL.h"
//Generate a LabVIEW event
int GenerateLVEvent(LVUserEventRef *msg, int param)
{
PostLVUserEvent( *msg, (void *)&param);
return 0;
}

PNG: alt text http://vi-lib.com/forForum/eventDLL.PNG
LabVIEW:
alt text http://vi-lib.com/forForum/eventLV.PNG
- LabVIEW, DLL LabVIEW. DLL. U32.

,

PS, DLL LabVIEW, , RolfKK, .

+6

All Articles