Ends a pending asynchronous read request.
[Visual Basic] Overrides Public Function EndRead( _ ByVal asyncResult As IAsyncResult _ ) As Integer [C#] public override int EndRead( IAsyncResult asyncResult ); [C++] public: int EndRead( IAsyncResult* asyncResult ); [JScript] public override function EndRead( asyncResult : IAsyncResult ) : int;
- The pending asynchronous request.
The number of bytes read from the stream, between zero and the number of requested bytes. Streams will only return zero at the end of the stream. Otherwise, they will block until at least one byte is available.
|ArgumentNullException||The asyncResult is a null reference (Nothing in Visual Basic).|
EndRead must be called exactly once on every IAsyncResult from BeginRead, and calling EndRead is the only way to know how many bytes were read from the Stream. EndRead will block until the I/O operation has completed.
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family