Skip to content

GetTimeout

Gets the timeout value for the I/O session (in milliseconds).

virtual HRESULT GetTimeout(long* plTimeout) abstract;

str

[out] The timeout value for the I/O session (in milliseconds).

Returns S_OK if successful, otherwise a failure HRESULT.

The default timeout is 2000 ms.

The following example demonstrates use of the SetTimeout function.

CoAcme4321.cpp
HRESULT Acme4321::OnFinalInitialize()
{
HRESULT hr = S_OK;
// Set the I/O session timeout value to 5000 ms
hr = io.SetTimeout(5000);
return hr;
}