[in] String data to send to the device.
WriteStringNoPoll
Sends data to a device without polling for instrument errors after the write.
Syntax
Section titled “Syntax”virtual HRESULT WriteStringNoPoll(const CString& strData, bool bFlush = true, long lTimeout = CUR_TIMEOUT) override;
virtual HRESULT WriteStringNoPoll(BSTR strData, bool bFlush = true, long lTimeout = CUR_TIMEOUT) override;
virtual HRESULT WriteStringNoPoll(LPCTSTR strData, bool bFlush = true, long lTimeout = CUR_TIMEOUT) override;Parameters
Section titled “Parameters”strData
bFlush
[in] If true, the formatted I/O write buffer is flushed to the device.
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 WriteString except that the device is not polled for errors after the data is sent.
Example
Section titled “Example”The following example demonstrates use of the WriteStringNoPoll function.
STDMETHODIMP Acme4321::IAcme4321_Configure(BSTR bstrSource1, BSTR bstrSource2, BSTR bstrSource3){ HRESULT hr = S_OK;
// Queue up commands in the write buffer hr = io.WriteStringNoPoll(bstrSource1, false); hr = io.WriteStringNoPoll(bstrSource2, false);
// Send string and flush buffer to device hr = io.WriteString(bstrSource3);
return hr;}