CDynamicOutputPin.Block 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 Block
method blocks or unblocks the flow of data from the pin. This method implements the IPinFlowControl::Block method.
Syntax
HRESULT Block(
DWORD dwBlockFlags,
HANDLE hEvent
);
Parameters
-
dwBlockFlags
-
Flag that indicates whether to block or unblock the pin. Must be one of the following values:
Zero: Unblock data flow from the pin.
AM_PIN_FLOW_CONTROL_BLOCK: Block data flow from the pin.
-
hEvent
-
Handle to an event object, or NULL.
Return value
Returns an HRESULT value. Possible values include those shown in the following table.
Return code | Description |
---|---|
|
Pin is already unblocked. |
|
Success. |
|
Invalid argument. |
|
Pin is already blocked on another thread. |
|
Pin is already blocked on the calling thread. |
Remarks
For more information about this method, see IPinFlowControl::Block. Internally, this method calls one of the following protected methods:
- Block (asynchronous): CDynamicOutputPin::AsynchronousBlockOutputPin
- Block (synchronous): CDynamicOutputPin::SynchronousBlockOutputPin
- Unblock: CDynamicOutputPin::UnblockOutputPin
Unblocking is always performed synchronously.
Requirements
Requirement | Value |
---|---|
Header |
|
Library |
|