From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.



在DLL中建立C++函數功能讓LabVIEW呼叫稱為函式庫功能節點(Library Function Node)



主要軟體:
主要軟體版本: N/A
主要軟體修正版本: N/A
次要軟體: N/A

問題:
我如何在DLL中建立能在LabVIEW中被看見的函數?

解答:
你必須宣告你的功能原型如下
// this makes my_function accessible from LabVIEW
extern "C" __declspec(dllexport) int my_function(int argument);


Your function can then be used as follows:

extern "C" __declspec(dllexport) int my_function(int argument){

// Insert Code Here

return 0;
}


請看見下面的細節更多詳盡的解譯。

相關連結:
Developer Zone Tutorial: Building a DLL with Visual C++
Developer Zone Tutorial: An Overview of Accessing DLLs or Shared Libraries from LabVIEW

附加檔案:





報告日期: 12/13/2002
最後更新: 01/04/2008
文件偏號: 2SCA44HM