Click or drag to resize

GetTimeout

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

virtual HRESULT GetTimeout(long* plTimeout) abstract;
Parameters
str

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

Return Value

Returns S_OK if successful, otherwise a failure HRESULT.

Remarks

The default timeout is 2000 ms.

Example

The following example demonstrates use of the SetTimeout function.

C++
// 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;
}
See Also

Download a complete CHM version of this documentation here.