LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

using PostLVUserEvent function from Labview.dll

I am trying to use the PostLVuserEvent function from the labview.dll and corresponding extcode.h file.  I have made my own dll using CVI that uses this function.  I then use Labview to call my dll.  My dll compiles fine.  No issues, no errors.  LabView can call my dll function containing the PostLVUserEvent function with no errors.  However, the event number LabView passes my dll is not the same event number I receive so no LabView event is triggered. 

 

Has anyone had this issue? 

 

We are trying to solve it from the LabView side and the CVI side but cannot seem to get it to work.  The examplesI have found here were compiled using C++ and those seem to work.  I do not know why when I compile my program in C, it creates the dll but does not work.   If I had to guess, i think it's an issue with pointers vs non-pointers.  When the LAbview program selects my function from the dll, it shows the argument PostLVUserEvent as a pointer when in my dll, it is not a pointer PostLVUserEvent....

 

Any ideas?

 

Thanks in advance. 

0 Kudos
Message 1 of 2
(4,386 Views)

Hello Blue

 

Take a look to this one, it was created on C, I think the .c and the .h files will give a good idea, how the function should be implemented. It is important when calling the dll on LabVIEW, to use the std calling convention and run it on the UI thread.

 

 

Regards

 

Mart G

0 Kudos
Message 2 of 2
(4,376 Views)