取消
显示结果 
搜索替代 
您的意思是: 

Sending custom windows messages (SDK) with LabVIEW

To communicate with other applications, especially LabWindows/CVI I want to send and receive windows messages. In LabWindows/CVI that can be done quite simple. But for LabVIEW I only found ways to receive messages (standard messages like WM_MOUESEMOVE etc.). Every standard message has a number, so I would like to send a message with my own number.
For the communication between CVI and LabVIEW, NI recommnends to use ActiveX or Datasocket. Windows Messages would be much faster. Can someone help me out?
0 项奖励
1 条消息(共 5 条)
3,237 次查看
Use a Call Library Node for this.

Put one down on the code page then right click and choose "configure". For the DLL you will need to point it to user32.dll from your systems folder and use the function SendMessage. You should be able to find a reference to this API from the CVI help files...
2 条消息(共 5 条)
3,228 次查看
Thanks! When I try to configure the Call Library Node, I can choose between SendMessageW and SendMessageA. What's the difference? And is there a list which Win32 Datatype corresponds to which datatype in LabVIEW? What is for example a HWND hWnd, UINT Msg, WPARAM wParam or a LPARAM lParam?
0 项奖励
3 条消息(共 5 条)
3,217 次查看

Windows functions come in two flavors: ANSI (A) and Unicode (W). Since LV is ANSI you should choose A.
As for the datatypes, there is no list, but you can look here for some more details.


___________________
Try to take over the world!
0 项奖励
4 条消息(共 5 条)
3,212 次查看
Just yesterday Ed Dickens showed me an example that listed many of the C datatypes and their LabVIEW version. I am not sure what version of LabVIEW first had this, but it is in 7.1.

In the example finder (Help -> Find Examples), search for DLLs. The one that you want to look at is Call DLL.vi.

Hope that this helps,
Bob
0 项奖励
5 条消息(共 5 条)
3,204 次查看