MemoryStream: BeginWrite |
Begins an asynchronous buffer write. For a MemoryStream, having an asynchronous buffer write is of no use.
Public Function BeginWrite( ByRef Buffer ( ) As Byte, ByVal Offset As Long, ByVal Count As Long, Optional ByVal Callback As AsyncCallback, Optional ByRef State As Variant ) As IAsyncResult
Since the stream is directly stored and accessed in memory, there is no waiting for reads to occur. The BeginWrite method works identical to the WriteBlock method in terms of reading immediately writing stream data to the stream.
When defining the Count for the number of maximum bytes to be written, if the Buffer does not have enough bytes, an exception will be thrown in the EndWrite method.
If an exception has occurred during the read, it will not be thrown until the EndRead is executed.