![]() | QueryNumberNoPoll |
Performs a write and read of a numeric result through as a single operation without polling for instrument errors after the read.
virtual HRESULT QueryNumberNoPoll(const CString& strCommand, double* pResult, bool bFlush = true, long lTimeout = CUR_TIMEOUT) abstract; virtual HRESULT QueryNumberNoPoll(const CString& strCommand, float* pResult, bool bFlush = true, long lTimeout = CUR_TIMEOUT) abstract; virtual HRESULT QueryNumberNoPoll(const CString& strCommand, long* pResult, bool bFlush = true, long lTimeout = CUR_TIMEOUT) abstract; virtual HRESULT QueryNumberNoPoll(const CString& strCommand, short* pResult, bool bFlush = true, long lTimeout = CUR_TIMEOUT) abstract; virtual HRESULT QueryNumberNoPoll(const CString& strCommand, BYTE* pResult, bool bFlush = true, long lTimeout = CUR_TIMEOUT) abstract;
[in] Command string to send to the device.
[out] Numeric response read from the device.
[in] true to flush the formatted I/O read buffer.
[in] I/O timeout value in milliseconds.
Returns S_OK if successful, otherwise a failure HRESULT.
This function behaves identically to QueryNumber except that the device is not polled for errors after the data is read.
The following example demonstrates use of the QueryNumberNoPoll function.
// CoAcme4321.cpp STDMETHODIMP Acme4321::IAcme4321_get_TriggerCount(long* plCount) { HRESULT hr = S_OK; hr = io.QueryNumberNoPoll(_T("TRIG:COUNT?"), plCount); return hr; }