[out] Array of delimited values parsed from the device.
ReadListNoPoll
Reads a delimited list of values from a device without polling for instrument errors after the read.
Syntax
Section titled “Syntax”virtual HRESULT ReadListNoPoll(double* pValues, long lMaxLength, long* plActualLength, const CString& strListSeparator = _T(","), long lTimeout = CUR_TIMEOUT) abstract;
virtual HRESULT ReadListNoPoll(float* pValues, long lMaxLength, long* plActualLength, const CString& strListSeparator = _T(","), long lTimeout = CUR_TIMEOUT) abstract;
virtual HRESULT ReadListNoPoll(long* pValues, long lMaxLength, long* plActualLength, const CString& strListSeparator = _T(","), long lTimeout = CUR_TIMEOUT) abstract;
virtual HRESULT ReadListNoPoll(short* pValues, long lMaxLength, long* plActualLength, const CString& strListSeparator = _T(","), long lTimeout = CUR_TIMEOUT) abstract;
virtual HRESULT ReadListNoPoll(BYTE* pValues, long lMaxLength, long* plActualLength, const CString& strListSeparator = _T(","), long lTimeout = CUR_TIMEOUT) abstract;
virtual HRESULT ReadListNoPollReadListNoPoll(CComBSTR* pValues, long lMaxLength, long* plActualLength, const CString& strListSeparator = _T(","), long lTimeout = CUR_TIMEOUT) abstract;
virtual HRESULT ReadListNoPoll(SAFEARRAY** pValues, IoDataType eType, const CString& strListSeparator = _T(","), long lTimeout = CUR_TIMEOUT) abstract;Parameters
Section titled “Parameters”pValues
IoDataType
[in] Type of element data for the SAFEARRAY.
lMaxLength
[in] Maximum number of elements (not bytes) to read from the device.
plActualLength
[out] Actual number of elements (not bytes) read from the device.
strListSeparator
[in] Set of characters that act as delimiters between elements in the list.
lTimeout
[in] I/O timeout value in milliseconds.
Return value
Section titled “Return value”Returns S_OK if successful, otherwise a failure HRESULT.
Remarks
Section titled “Remarks”This function behaves identically to ReadList except that the device is not polled for errors after the data is read.
Example
Section titled “Example”The following example demonstrates use of the ReadListNoPoll function.
STDMETHODIMP Acme4321::IAcme4321_ReadData(SAFEARRAY** ppsa){ HRESULT hr = S_OK;
hr = io.WriteStringNoPoll(_T("DATA?"));
// Instrument response is: // 1.43,2E-6,5.66 hr = io.ReadList(ppsa, IoDataTypeReal64);
return hr;}