LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems creating type library in CVI 5.5

Having a DLL project, somewhat large, about 20-30 functions... Some use 'struct references' to write to data structures (s.a. error info) held by the caller. Okay so far...

When trying to make a type library for the functions, CVI politely suggests using typedefs instead of structs. No problem. But even after that, having replaced all structs with custom types in both the code and the FP, odl compiler still fails... This is driving me nuts!

Only solution I see is faking those pointers as 'void*' but that's not very neat, is it. Am I missing something, if so, what.

Some concerned files are attached if they help.

-asko

P.S. I got it to compile, by changing "const char*" struct members into plain "char*". Woul
d like to use the consts there though... Also, function pointer I'm passing to 'SetProgressCallback' needed to be faked as 'void*'. Any way I could get the real types through?
0 Kudos
Message 1 of 2
(2,558 Views)
I don't think it is the best idea to continue to use structures in your type library. The main reason for this is that a structure is not an ActiveX data type. With CVI, it will suggest you use a typedef in order to get around this. This allows you to use structures, but only with members that are of ActiveX data types. I believe CVI will then treat this structure as an array of variants.
I think this is also why the compiler will barf on the const char* because this is not a ActiveX data type. You noticed that the change to char did work, as this is a recognized type.

Daniel McChane
Application Engineer
National Instruments
0 Kudos
Message 2 of 2
(2,559 Views)