Copies 64-bit data from a Windows memory buffer into an array.
C/C++
int cbWinBufToArray64(int MemHandle, unsigned __int64* DataArray, long FirstPoint, long Count)
Visual Basic
Function cbWinBufToArray64(ByVal MemHandle&, DataArray As Variant, ByVal FirstPoint&, ByVal Count&) As Long
MemHandle
The memory handle that was returned by cbWinBufAlloc64() when the buffer was allocated. The buffer should contain the data that you want to copy.
DataArray
The array that the data is copied to.
FirstPoint
The index of the first point in the memory buffer that data is copied from.
Count
The number of data points to copy.
Refer to the following example:
/*declare and initialize the variables*/
long Count = 1000;
unsigned short *DataArray = NULL;
int MemHandle = 0;
/*allocate the buffer and cast it to a pointer to an unsigned long*/
MemHandle = cbWinBufAlloc64(Count);
DataArray = (unsigned __int64*)MemHandle;
/*scan in the data*/
cbCInScan(......,MemHandle,...);
/*print the results*/
for(int i=0; i<Count; ++i)
printf("Data[%d]=%d\n", i, DataArray[i]);
/*free the buffer and NULL the pointer*/
cbWinBufFree(MemHandle);
DataArray = NULL;