Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This method passes data from an asynchronous pluggable protocol's worker thread intended for the same asynchronous pluggable protocol's apartment thread.

Syntax

HRESULT Switch(
  PROTOCOLDATA* 
pProtocolData
);

Parameters

pProtocolData

[in] Address of a PROTOCOLDATA structure containing the data to be passed back to the apartment thread.

Return Value

Returns S_OK if successful or E_FAIL if called when an asynchronous operation is pending.

Remarks

The IInternetProtocolSinkinterface should pass the data from the worker thread, without modification, back to the asynchronous pluggable protocol by calling its IInternetProtocolRoot::Continuemethod.

Asynchronous pluggable protocol handlers can operate asynchronously in a separate worker thread. This method allows the protocol handler to pass data back to the apartment (or user interface) thread it was created on.

Requirements

Header urlmon.h, urlmon.idl
Library urlmon.lib
Windows Embedded CE Windows CE .NET 4.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also