04-08-2010 10:28 AM
I have developed an IVI-C driver in LabWindows 2009. I have the option to include the typlib in the Dll, selected. In the h file for the driver there are several #defines that have floating point values. Using these values in the CVI source code works just fine.
If I create a VB6 example and reference the Dll I can use these values but they are humungous values - obviously not correct. If I use Oleview and look at the typlib in the Dll the values are correct. If I use the Object browser in VB6 I can see that all the floating point #define values are equal to "blank" (nothing I guess).
Anybody have any idea what's going on?
I have looked at sveral of the class driver h files and notice for the #define declarations they are all integers but they are using a syntax like this:
#define xyz (2L) <- I assume L means long. Is there a similar syntax for doubles? I am just declaring my floating point values like so:
#define abc 0.1
04-08-2010 12:23 PM
04-08-2010 12:27 PM
Now that I think about it (and I double checked it in a program) you can apply a type cast to a constant.
So try something like this:
#define DOUBLE_CONST {(double) 1234}
Maybe that will get you the result you want but I have no VB experience so I can't confirm that.