LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Enumerated Types Exposed in Teststand Not Working Quite Right

Hi All,

 

I have a LabWindows/CVI driver where one of the APIs is an enumerated type. I followed some of the posts where it instructed me to create the enumerated data type in *.h file, add it to the *.c API, create a FP and add the new type to the API, configure the target settings to "add type library resource to DLL" and build.

 

I see the enumerated data types, but the description of the new type is garbage. See the attached JPG. I see "__MIDL__MIDL_itf_IALdi1_0000_0001" for the description of the enumerated type.

 

I have looked all over the place for a setting, etc. but can't figure it out. Does anyone else have or had the same problem? And a solution.

 

Thanks

 

Minesh

0 Kudos
Message 1 of 5
(2,854 Views)

Hi All Again,

 

I found an example from NI, cvi_enumerated_values.zip. If I include the DLL that was prebuilt, everything is fine, no Enumeration name mangling. But if I rebuild with LabWindows/CVI 8.5 or 2010 and then use the corresponding DLL, I get the description naming mangling again. So, it seems to be a build or environment issue. Still trying to track the issue down.

 

Thanks

 

Minesh

0 Kudos
Message 2 of 5
(2,845 Views)

Change the CVI Enumerated Values.c function declaration as following. So we just need to add __stdcall calling convention to the myfucntion.


  
From:   void DLLEXPORT myfunction(MyDMM input) 

  To:       void DLLEXPORT __stdcall myfunction(MyDMM input) 

National Instruments
Applications Engineer
0 Kudos
Message 3 of 5
(2,828 Views)

Thank you for the solution.

 

I also found solution last night. My problem still happens on LabWindows 8.5. But I was mistaken on the LabWindows 2010. I rebuilt the code as is in 2010 and I could see the enumerated values as well as a proper description.

 

So it seems like a version issue as well.

 

Thanks

 

Minesh

0 Kudos
Message 4 of 5
(2,825 Views)

This document showes you the compatiblity charts. http://www.ni.com/teststand/product_lifecycle/. It surely can be the version issue as well. Thanks for pointing that out.

National Instruments
Applications Engineer
0 Kudos
Message 5 of 5
(2,816 Views)