CBasePin.BreakConnect method
[The feature associated with this page, DirectShow, is a legacy feature. It has been superseded by MediaPlayer, IMFMediaEngine, and Audio/Video Capture in Media Foundation. Those features have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer, IMFMediaEngine and Audio/Video Capture in Media Foundation instead of DirectShow, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]
The BreakConnect
method releases the pin from a connection.
Syntax
virtual HRESULT BreakConnect();
Parameters
This method has no parameters.
Return value
Returns S_OK.
Remarks
This method is called during pin disconnection by the CBasePin::Disconnect method. It is also called during a connection attempt if the CBasePin::CheckConnect method fails.
This method must free any resources that were obtained by the CheckConnect method. For example, if CheckConnect allocates memory, BreakConnect
should free the memory. If CheckConnect queries the connecting pin for an interface, BreakConnect
should free the interface.
Note that BreakConnect
can be called without a corresponding call to CompleteConnect. Therefore, you cannot assume that CompleteConnect has been called previously.
Requirements
Requirement | Value |
---|---|
Header |
|
Library |
|