[in] Specifies whether to set the size of the read buffer, the write buffer, or both buffers.
SetBufferSize
Specifies the size of the I/O read and/or write buffers.
Syntax
Section titled “Syntax”virtual HRESULT SetBufferSize(IoBufferMask eMask, long cbSize) sealed override;Parameters
Section titled “Parameters”eMask
cbSize
[in] Desired size of the buffer(s) indicated by the eMask parameter.
Return value
Section titled “Return value”Returns S_OK if successful, otherwise a failure HRESULT.
Remarks
Section titled “Remarks”The default size of the read and write buffers is 4096 bytes.
Example
Section titled “Example”The following example demonstrates use of the SetBufferSize function.
HRESULT Acme4321::OnFinalInitialize(){ HRESULT hr = S_OK;
// Set both the read and write buffers to be 8K bytes hr = io.SetBufferSize(IoReadAndWriteBuffers, 8192);
return hr;}