Copies 64-bit data from a Windows memory buffer into an array.
win_buf_to_array_64(memhandle, data_array, first_point, count)
memhandle (int)
The memory handle that was returned by win_buf_alloc_64() when the buffer was allocated. The buffer should contain the data that you want to copy.
data_array (POINTER(c_ulonglong))
The C array that the data is copied to.
first_point (int)
Index of the first point in the memory buffer that data is copied from
count (int)
The number of data points to copy.
Refer to the following example:
From pyul import ul
count = 1000
# Allocate the buffer and cast it to an unsigned short
memhandle = ul.win_buf_alloc_64(count)
data_array = ctypes.cast(memhandle, ctypes.POINTER(ctypes.c_ulonglong))
# Run the input scan
ul.c_in_scan(0, 0, 0, count, 100, memhandle, 0)
# Print the results
for i in range(0, count):
print("Data[" + str(i) + "] = " + str(data_array[i]) + "\n")
# Free the buffer and set the data_array to None
ul.win_buf_free(memhandle)
data_array = None