Click or drag to resize

SetTimeout

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

virtual HRESULT SetTimeout(long lTimeout) abstract;
Parameters
str

[in] Sets 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

Other Resources

Download a complete CHM version of this documentation here.