Click or drag to resize

QueryListNoPoll

Performs a write and read of a delimited list of results through as a single operation without polling for instrument errors after the read.


				virtual HRESULT QueryListNoPoll(const CString& strCommand, double* pValues, long lMaxLength, long* plActualLength, const CString& strListSeparator = _T(","), long lTimeout = CUR_TIMEOUT) abstract;

				virtual HRESULT QueryListNoPoll(const CString& strCommand, float* pValues, long lMaxLength, long* plActualLength, const CString& strListSeparator = _T(","), long lTimeout = CUR_TIMEOUT) abstract;

				virtual HRESULT QueryListNoPoll(const CString& strCommand, long* pValues, long lMaxLength, long* plActualLength, const CString& strListSeparator = _T(","), long lTimeout = CUR_TIMEOUT) abstract;

				virtual HRESULT QueryListNoPoll(const CString& strCommand, short* pValues, long lMaxLength, long* plActualLength, const CString& strListSeparator = _T(","), long lTimeout = CUR_TIMEOUT) abstract;

				virtual HRESULT QueryListNoPoll(const CString& strCommand, BYTE* pValues, long lMaxLength, long* plActualLength, const CString& strListSeparator = _T(","), long lTimeout = CUR_TIMEOUT) abstract;

				virtual HRESULT QueryListNoPoll(const CString& strCommand, CComBSTR* pValues, long lMaxLength, long* plActualLength, const CString& strListSeparator = _T(","), long lTimeout = CUR_TIMEOUT) abstract;

				virtual HRESULT QueryListNoPoll(const CString& strCommand, SAFEARRAY** pValues, IoDataType  eType, const CString& strListSeparator = _T(","), long lTimeout = CUR_TIMEOUT) abstract;
			
Parameters
strCommand

[in] Command string to send to the device.

pValues

[out] Array of delimited values parsed from the device.

lMaxLength

[in] Maximum number or 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

Returns S_OK if successful, otherwise a failure HRESULT.

Remarks

This function behaves identically to QueryList except that the device is not polled for errors after the data is read.

Example

The following example demonstrates use of the QueryListNoPoll function.

C++
// CoAcme4321.cpp
STDMETHODIMP Acme4321::IAcme4321_QueryData(SAFEARRAY** ppsa)
{
  HRESULT hr = S_OK;

  // Instrument response is:
  //    1.43,2E-6,5.66
  hr = io.QueryListNoPoll(_T("DATA?"), ppsa, IoDataTypeReal64);

  return hr;
}
See Also

Download a complete CHM version of this documentation here.