OnComplete Method
Collapse the table of content
Expand the table of content

ICLRIoCompletionManager::OnComplete Method


Notifies the common language runtime (CLR) of the status of an I/O request that was made by using a call to the IHostIoCompletionManager::Bind method.

HRESULT OnComplete (
    [in] DWORD dwErrorCode,
    [in] DWORD NumberOfBytesTransferred,
    [in] void* pvOverlapped


[in] An HRESULT value that indicates the status of the bind operation.

  • S_OK indicates that the operation completed successfully.

  • HOST_E_INTERRUPTED indicates that the call terminated before completion.

  • E_FAIL indicates that an unknown, unrecoverable, catastrophic failure occurred.


[in] The number of bytes transferred during the processing of the I/O request.


[in] A pointer to the OVERLAPPED structure that was passed to the call to the IHostIoCompletionManager::Bind method.




OnComplete returned successfully.


The CLR has not been loaded into a process, or the CLR is in a state in which it cannot run managed code or process the call successfully.


The call timed out.


The caller does not own the lock.


An event was canceled while a blocked thread or fiber was waiting on it.


An unknown catastrophic failure occurred. After a method returns E_FAIL, the CLR is no longer usable within the process. Subsequent calls to hosting methods return HOST_E_CLRNOTAVAILABLE.

If the host implements an I/O completion abstraction, the CLR makes I/O requests through the host by using methods of IHostIoCompletionManager. The host then calls the OnComplete method to notify the runtime of the outcome of such requests.


Platforms: See .NET Framework System Requirements.

Header: MSCorEE.h

Library: Included as a resource in MSCorEE.dll

.NET Framework Versions: Available since 2.0

© 2016 Microsoft