LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

"Error Creating Type Library" for Enum type in Labwindows/CVI

We have to create a C wrapper dll in labwindows CVI for the IVI-com dll (created in VC++). The dll creation process gives the error "Error Creating Type Library for Enum" when we include Fuctional panel also in the Target settings option. But if we don't include the Functional panel, the i/o parameters info are not available in the created dll. I am new to CVI environment. I have attached the error message which we got. Thanks for your help in advance.
0 Kudos
Message 1 of 2
(3,073 Views)
Hello

I think this is one of the cases mentioned by the LabWindows/CVI Programmer Reference Manual , pg 38 of 73. Here is what it says:

Visual Basic has a more restricted set of types than C. Also, the Create Release Dynamic Link Library and
Create Debuggable Dynamic Link Library commands impose certain requirements on the declaration of
the DLL API. Use the following guidelines to ensure that Visual Basic can use your DLL.

� Always use typedefs for structure parameters and union parameters.
� Do not use enum parameters.
� Do not use structures that require forward references or that contain pointers.
� Do not use pointer types except for reference parameters.


So looks like one of your types is violating condition 2.
The thing to realize here tho
ugh is that this limitation is not defined by CVI itself, but rather it is being defined by the way Microsoft's ActiveX specification works and how type libraries are actually defined for universal use in various different programming languages. ActiveX was designed to provide cross-language integration with as little incompatibility as possible, which means that you can't expect every language feature in ANSI C to be supported in Visual Basic or Pascal, therefore they are not all supported in ActiveX either.

I hope this helps

Bilal Durrani
NI
Bilal Durrani
NI
0 Kudos
Message 2 of 2
(3,073 Views)