LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

no 64-bit support in CVI 5.01. is it in 5.5?

I've noticed 5.01 has no 64 bit integer support.
And specifically, there is no support for the SDK _int64 type.

Is this in 5.5? All I'm really looking for is 64 bit integer add/subtract support.

I'm trying to use QueryPerformanceCounter for some timing, but I can't get get a difference result from the 64 bit returned counts.
0 Kudos
Message 1 of 2
(2,852 Views)
Hello Joe,
CVI 5.5 added some functions to the Programmers Toolbox that demonstrate how to use a PULARGE_INTEGER (pointer to an unsigned 64-bit integer) with the SDK function GetDiskFreeSpaceExA(). However, no special support has been added for performing math operations on 64-bit integers. You might look for a third-party library that accomplishes this task or consider writing your own. I believe the open source gcc compiler handles 64-bit integers, it may have some source that shows how to handle 64-bit math operations on 32-bit processors (or it may not support them on 32-bit processors, I am not sure). If you are not overflowing into the high DWORD of the 64-bit values, it should be a trivial task of subtracting a.LowPart from b.LowPart and looking at the results.
If the values are spilling into the HighPart, then conceptually:
diff = (b.HighPart - a.HighPart) * 2^33 + (b.LowPart - a.LowPart)

However, this will overflow a 32-bit integer so you would generally see:

diff.HighPart = b.HighPart - a.HighPart
diff.LowPart = b.LowPart - a.LowPart

Now it is up to you to deal with the difference.

Jeremiah Cox
Applications Engineer
National Instruments
http://www.ni.com/ask
0 Kudos
Message 2 of 2
(2,852 Views)