Click or drag to resize

WriteStringNoPoll

Sends data to a device without polling for instrument errors after the write.

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
strData

[in] String data to send to the device.

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

Returns S_OK if successful, otherwise a failure HRESULT.

Remarks

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

Example

The following example demonstrates use of the WriteStringNoPoll function.

C++
// CoAcme4321.cpp
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;
}
See Also

Download a complete CHM version of this documentation here.