LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to Get Windows User Message in LabVIEW

Dear All!

 

I have to build a VI that can receive windows user message(Msg ID:0x46E) to read data from a CAN Board in an interrupt mode.  I have used GetMessage()and PeekMessage in user32.dll, but either can't get the 0x46E message generated by the CAN Driver that can be received by a Demo applicaton. Moreover, my VI calling GetMessage() can't do anything when it is waiting for the windows message, but, this is not what I want. I just want a VI working like the “Dequeue element.vi”.

 

I have downloaded a VI llb from website named:Windows Message Queue.llb, but this llb can neither receive a windows user message(ID:0x46E), nor a message from other application window(not a VI)

 

Any help would be greatly appreciated!

Download All
0 Kudos
Message 1 of 3
(3,550 Views)

I'm not an expert in Windows messaging, but I believe the Windows Messaging Library will do what you want, you just need to pull it apart a bit.  There should be no problem registering for the user event, and you might be able to register for an event on a non-VI window by specifying the window title; look inside the Get Window Refnum VI.

0 Kudos
Message 2 of 3
(3,534 Views)

thank you,

0 Kudos
Message 3 of 3
(3,521 Views)