MemoryMappedViewStream: BeginRead

BeginRead

Begins an asynchronous read operation.



 Public Function BeginRead(
	  Buffer ( ) As Byte,
	  ByVal Offset As Long,
	  ByVal Count As Long,
	  Optional ByVal Callback As AsyncCallback,
	  Optional State As Variant ) As IAsyncResult

Parameters

Buffer
[ByRef] Byte. The buffer to read the data into.
Offset
[ByVal] Long. The byte offset in buffer at which to begin writing data read from the stream.
Count
[ByVal] Long. The maximum number of bytes to read.
Callback
[ByVal] Optional. AsyncCallback. An optional asynchronous callback, to be called when the read is complete.
State
[ByRef] Optional. Variant. A user-provided object that distinguishes this particular asynchronous read request from other requests.

Return Values

IAsyncResult -  An IAsyncResult that represents the asynchronous read, which could still be pending.

Remarks

The default implementation of BeginRead on a stream calls the ReadBlock method synchronously.

Exceptions

Exception Condition
ArgumentExceptionOne or more of the arguments is invalid.
ObjectDisposedExceptionMethods were called after the stream was closed.
NotSupportedExceptionThe current Stream implementation does not support the read operation.

See Also

Project CorLib Overview

Class MemoryMappedViewStream Overview