LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I export __int64 from a instrument driver

I am really liking the 64 bit integer now available from CVI 7.x
Unfortunately I need to export __int64's from my instrument driver (dll and fp). I have included Visa types and I have tried to do a custom definition but I cannot find the actual __int64 definition. I have tried including various headers to try to get my FP's to accept the __int64 NO DICE.
Go Cubbies!!
0 Kudos
Message 1 of 4
(3,238 Views)
Hello

Try adding a custom definition to the function panel and then in your header file, you can typedef the custom type as an int64:

typedef __int64 MYINT64

If you dont need a type library, you can disable the option to generate a type library for the function panel by going to the build settings.

If you are planning to make this instrument driver work from versions below 7.0, then you might want to select one of the other types instead of the int64 data type.

Hope this helps

Bilal Durrani
NI
Bilal Durrani
NI
0 Kudos
Message 2 of 4
(3,238 Views)
That's close and its on the right track. But I definately need a type library and according to mktypelib.exe it is still an unknown type.
Where does CVI define __int64?

Thanks,
-don
Go Cubbies!!
0 Kudos
Message 3 of 4
(3,238 Views)
__int64 is an intrinsic type. Its like char, int, long etc., which are automatically understood by the compiler and are not really defined anywhere in a header file. We use Microsoft's mktyplib tool to generate the type library for us from an ODL file. Apparently, ODL does not support the use of int64 (since VB 6.0 does not have a int64 data type) and hence the unknown type errors.

If you really need a type library, you might be better off working with a double or an unsigned int. This would be useful especially if you are planning to call your instrument from VB 6.0 and VB 6.0 does not have a int64 type.

Hope this helps

Bilal Durrani
NI
Bilal Durrani
NI
0 Kudos
Message 4 of 4
(3,238 Views)