Microsoft DirectX 8.1 (C++) |
The ReceiveConnection method accepts a connection from another pin. This method implements the IPin::ReceiveConnection method.
Syntax
HRESULT ReceiveConnection(
IPin *pConnector,
AM_MEDIA_TYPE *pmt
);
Parameters
pConnector
Pointer to the connecting pin's IPin interface.
pmt
Pointer to an AM_MEDIA_TYPE structure that specifies the media type.
Return Value
Returns an HRESULT value. Possible values include those in the following table.
Value | Description |
S_OK | Success. |
E_POINTER | Null pointer argument. |
VFW_E_ALREADY_CONNECTED | The pin is already connected. |
VFW_E_NOT_STOPPED | The filter is active and the pin does not support dynamic reconnection. |
VFW_E_TYPE_NOT_ACCEPTED | The specified media type is not acceptable. |
Remarks
The pin that initiates the connection calls this method on the receiving pin. If the receiving pin returns an error code, the connection fails.
In the base class, this method performs the following steps:
If all of these steps succeed, the method calls the CBasePin::CompleteConnect and SetMediaType methods to complete the connection. If CheckConnect or CheckMediaType fail, the method calls the CBasePin::BreakConnect method.
See Also