Academic Company Events Community Support Solutions Products & Services Contact NI MyNI
5 ratings:
 2.20 out of 5   

Call Library Function Returns the Wrong Function Prototype and Function Parameters for DLLs



Primary Software: LabVIEW Development Systems>>LabVIEW Full Development System
Primary Software Version: 6.0.1
Primary Software Fixed Version: N/A
Secondary Software: LabVIEW Development Systems

Problem:
Sometimes when I use the Call Library Function with its built-in functionality to pull up all the functions, it is completely incorrect. It then defaults to return type of void, and input parameter of void. When I open the Call Library Function Node properties, and search for my specific DLL and select my wanted Function name I get the following error: 

Why does this happen?

Solution:
The reason that you receive this error is because the DLL must recognize a Type Library (typelib, or LIB) file that is created for the DLL. The typelib file contains the list of public functions in the DLL, function prototypes, parameters, parameter types, and so on. Not all compilers will generate a LIB file by default when creating a DLL.

The LabVIEW DLL builder and LabWindows/CVI do create them, however Microsoft Visual C++ does not.

Related Links:
KnowledgeBase 1P68ATSR: What is a Type Library and How is it Used by NI TestStand?
KnowledgeBase 2UD9OMW0: Creating Dynamic Link Library (DLL) in Microsoft Visual C++ 6.0 for use in LabVIEW


Attachments:





Report Date: 04/02/2001
Last Updated: 05/12/2016
Document ID: 281A5HQO

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit