Copies data from a Windows memory buffer into a one-dimensional or two-dimensional array.
Member of the MccService class.
VB .NET
Copies data to a one-dimensional array of short values:
Public Function WinBufToArray(ByVal memHandle As IntPtr, ByVal dataArray As Short(), ByVal firstPoint As Integer, ByVal numPoints As Integer) As MccDaq.ErrorInfo
Copies data to a one-dimensional array of System.UInt16 values:
Public Function WinBufToArray(ByVal memHandle As IntPtr, ByVal dataArray As System.UInt16(), ByVal firstPoint As Integer, ByVal numPoints As Integer) As MccDaq.ErrorInfo
Copies data to a two-dimensional array of double values:
public ErrorInfo WinBufToArray(ByVal memHandle As IntPtr, ByVal dataArray As Double(,), ByVal firstPoint As Integer, ByVal numPoints As Integer, ByVal numChannels As Integer) As MccDaq.ErrorInfo
C# .NET
Copies data to a one-dimensional array of short values:
public MccDaq.ErrorInfo WinBufToArray(IntPtr memHandle, short[] dataArray, int firstPoint, int numPoints)
Copies data to a one-dimensional array of System.UInt16 values:
public MccDaq.ErrorInfo WinBufToArray(IntPtr memHandle, ushort[] dataArray, int firstPoint, int numPoints)
Copies data to a two-dimensional array of double values:
public MccDaq.ErrorInfo WinBufToArray(IntPtr memHandle, double[,] dataArray, int firstPoint, int numPoints, int numChannels)
The following methods are deprecated, and should only be used for legacy applications. The methods above are preferred, and must be used for 64-bit application development.
VB .NET
Copies data to a one-dimensional array of short values:
Public Shared Function WinBufToArray(ByVal memHandle As Integer, ByRef dataArray As Short, ByVal firstPoint As Integer, ByVal numPoints As Integer) As MccDaq.ErrorInfo
Copies data to a one-dimensional array of System.UInt16 values:
Public Shared Function WinBufToArray(ByVal memHandle As Integer, ByRef dataArray As System.UInt16, ByVal firstPoint As Integer, ByVal numPoints As Integer) As MccDaq.ErrorInfo
Copies data to a two-dimensional array of double values:
public static ErrorInfo WinBufToArray(ByVal memHandle As Integer, ByRef dataArray As Double(,), ByVal firstPoint As Integer, ByVal numPoints As Integer, ByVal numChannels As Integer) As MccDaq.ErrorInfo
C# .NET
Copies data to a one-dimensional array of short values:
public static MccDaq.ErrorInfo WinBufToArray(int memHandle, out short dataArray, int firstPoint, int numPoints)
Copies data to a one-dimensional array of System.UInt16 values:
public static MccDaq.ErrorInfo WinBufToArray(int memHandle, out ushort dataArray, int firstPoint, int numPoints)
Copies data to a two-dimensional array of double values:
public static MccDaq.ErrorInfo WinBufToArray(int memHandle, out double[,] dataArray, int firstPoint, int numPoints, int numChannels)
memHandle
This must be a memory handle that was returned by WinBufAllocEx() when the buffer was allocated. The data will be copied from this buffer
dataArray
The array that the data will be copied to. The first dimension should equal the number of channels. The second dimension should equal the number of points/channel.
firstPoint
Index of the first point in the memory buffer that data will be copied from.
numPoints
Number of data points to copy into dataArray.
numChannels
Number of channels to copy into dataArray.