Skip to content

LowLevelWriteStringNoPoll

Writes raw bytes directly to a device without going through the formatted I/O write buffer.

virtual HRESULT LowLevelWriteStringNoPoll(const CString& strBuf, long* pcchActual = NULL, bool bAddTrailing = true, long lTimeout = CUR_TIMEOUT) override;
virtual HRESULT LowLevelWriteStringNoPoll(BSTR strBuf, long* pcchActual = NULL, bool bAddTrailing = true, long lTimeout = CUR_TIMEOUT) override;

strBuf

[in] Array of characters to be written to the device.

pcchActual

[out] Actual number of bytes written to the device. pcchActual may be set to NULL if the caller is not interested in knowing the actual number of bytes written.

bAddTrailing

[in] true to have the trailing characters specified by the SetTrailingForWrites function automatically added to strBuf before sending to the device.

lTimeout

[in] I/O timeout value in milliseconds.

Returns S_OK if successful, otherwise a failure HRESULT.

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

The following example demonstrates use of the LowLevelWriteStringNoPoll function.

CoAcme4321.cpp
STDMETHODIMP Acme4321::IAcme4321_Configure(BSTR bstrData)
{
HRESULT hr = S_OK;
hr = io.LowLevel.LowLevelWriteStringNoPoll(bstrData);
return hr;
}