| Microsoft DirectX 8.1 (C++) | 
The ReceiveConnection method accepts a connection from another pin.
Syntax
HRESULT ReceiveConnection(
  IPin *pConnector,
  const AM_MEDIA_TYPE *pmt
);
Parameters
pConnector
[in] Pointer to the connecting pin's IPin interface.
pmt
[in] Pointer to an AM_MEDIA_TYPE structure that specifies the media type for the connection.
Return Value
Returns an HRESULT value. Possible values include the following.
| Value | Description | 
| S_OK | Success. | 
| E_POINTER | Null pointer argument. | 
| VFW_E_ALREADY_CONNECTED | The pin is already connected. | 
| VFW_E_NOT_STOPPED | Cannot connect while filter is active. | 
| 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.
See Also