Generating Type Library Information to Include in a DLL
- Updated2025-03-28
- 2 minute(s) read
LabWindows/CVI can use the information specified in a function panel file to generate type library information to include in a DLL. Complete the following steps to generate a type library resource from a function panel and add the type library resource to a DLL.
- Open a new function panel file and create a function panel for each exported function you want to include in the type library.
- Add the function panel file to the LabWindows/CVI project.
- In the LabWindows/CVI project window, select Build»Target Settings to launch the Target Settings dialog box.
- In the Target Settings dialog box, click the Type Library button to launch the Type Library dialog box.
- In the Type Library dialog box, enable the Add type library resource to DLL option and enter the path to the file in the Function panel file control.
- Click OK to close the Type Library dialog box and to close the Target Settings dialog box.
- In the Project window, select Build»Create Debuggable Dynamic Link Library to build the DLL. Click OK when LabWindows/CVI prompts you that the files are created.
LabWindows/CVI imposes certain requirements on the declaration of the DLL API in a type library. Use the following guidelines to ensure that TestStand can use the DLL:
- Use typedefs for structure, union, and enumeration parameters.
- Do not use structures that require forward references or that contain pointers.
- Do not use pointer types except when passing parameters by reference.
Refer to the LabWindows/CVI documentation for more information about adding type libraries to DLLs.