Switch method

Passes data from a worker thread for an asynchronous pluggable protocol that is intended for the apartment thread of the same asynchronous pluggable protocol.

Syntax

HRESULT retVal = object.Switch(pProtocolData);

Parameters

  • pProtocolData [in]
    Type: [PROTOCOLDATA](aa767745(v=vs.85).md)

    The address of a PROTOCOLDATA structure containing the data to be passed back to the apartment thread.

Remarks

The IInternetProtocolSink interface should pass the data from the worker thread, without modification, back to the asynchronous pluggable protocol by calling its IInternetProtocolRoot::Continue method.

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