07-10-2012 10:05 AM
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!
07-10-2012 12:30 PM
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.
07-10-2012 06:36 PM
thank you,