05-08-2013 08:47 AM
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
05-08-2013 10:21 AM
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
05-09-2013 10:22 AM
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)
05-09-2013 10:31 AM
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
05-10-2013 10:52 AM
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.