Microsoft DirectX 8.1 (C++)

IFilterGraph2::ReconnectEx

The ReconnectEx method breaks the existing pin connection and reconnects it to the same pin, using a specified media type.

Syntax

HRESULT ReconnectEx(
  IPin *ppin,
  const AM_MEDIA_TYPE *pmt
);

Parameters

ppin

[in] Pointer to the pin to disconnect and reconnect.

pmt

[in] Pointer to the media type to reconnect with. Specify NULL to use the existing media type.

Return Value

Returns an HRESULT value. Possible values include the following:

Value Description
S_OK Success.
S_FALSE Pin was not connected. No error.
E_FAIL Failure.
E_POINTER Null pointer argument.
VFW_E_NOT_STOPPED The filter is not stopped, but it does not support reconnection while in a running state.

Remarks

Like the IFilterGraph::Reconnect method, the ReconnectEx method schedules a reconnection of the pin with the pin it is currently connected to. By specifying a media type when this method is called, the pins don't have to check what type they were originally connected with or enumerate possible new types. This makes the reconnection more likely to succeed.

See Also