PipeStream.EndWrite(IAsyncResult) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Ends a pending asynchronous write request.
public:
override void EndWrite(IAsyncResult ^ asyncResult);
public override void EndWrite (IAsyncResult asyncResult);
[System.Security.SecurityCritical]
public override void EndWrite (IAsyncResult asyncResult);
override this.EndWrite : IAsyncResult -> unit
[<System.Security.SecurityCritical>]
override this.EndWrite : IAsyncResult -> unit
Public Overrides Sub EndWrite (asyncResult As IAsyncResult)
Parameters
- asyncResult
- IAsyncResult
The reference to the pending asynchronous request.
- Attributes
Exceptions
asyncResult
is null
.
asyncResult
did not originate from a BeginWrite(Byte[], Int32, Int32, AsyncCallback, Object) method on the current stream.
The stream is closed or an internal error has occurred.
Remarks
EndWrite must be called once for every call to BeginWrite. This can be done either in the same code that called BeginWrite or in a callback that is passed to BeginWrite.
Use the CanWrite property to determine whether the current PipeStream object supports write operations.
If the pipe is closed or an invalid argument is passed to BeginWrite, the appropriate exceptions are raised immediately. Errors that occur during an asynchronous write request occur on the thread pool thread that is performing the request. The exceptions are raised when the code the calls EndWrite method.