![]() | ReadNumberNoPoll |
Reads numeric data from a device without polling for instrument errors after the read.
virtual HRESULT ReadNumberNoPoll(double* pValue, bool bFlush = true, long lTimeout = CUR_TIMEOUT) override; virtual HRESULT ReadNumberNoPoll(float* pValue, bool bFlush = true, long lTimeout = CUR_TIMEOUT) override; virtual HRESULT ReadNumberNoPoll(long* pValue, bool bFlush = true, long lTimeout = CUR_TIMEOUT) override; virtual HRESULT ReadNumberNoPoll(short* pValue, bool bFlush = true, long lTimeout = CUR_TIMEOUT) override; virtual HRESULT ReadNumberNoPoll(BYTE* pValue, bool bFlush = true, long lTimeout = CUR_TIMEOUT) override;
[out] Number read from the device.
[in] If true, the formatted I/O read buffer is flushed.
[in] I/O timeout value in milliseconds.
Returns S_OK if successful, otherwise a failure HRESULT.
This function behaves identically to ReadNumber except that the device is not polled for errors after the data is read.
The following example demonstrates use of the ReadNumberNoPoll function.
// CoAcme4321.cpp STDMETHODIMP Acme4321::IAcme4321_get_Count(long* plCount) { HRESULT hr = S_OK; hr = io.ReadNumberNoPoll(plCount); return hr; }