CDeferredCommand class

CDeferredCommand Class Hierarchy

Deferred commands are queued by calls to methods on the IQueueCommand interface and are exposed by the filter graph manager and by some filters. A successful call to one of these methods returns an IDeferredCommand interface representing the queued command.

A CDeferredCommand object represents a single deferred command and exposes the IDeferredCommand interface as well as other methods that permit time checks and actual execution. A CDeferredCommand object contains a reference to the CCmdQueue object on which it is queued.

Reference counts control the lifetime of the CDeferredCommand class. When calling the CDeferredCommand::Invoke member function, the calling application gets an interface pointer that is reference-counted, and the CCmdQueue object also holds a reference count on the deferred command. Calling the IDeferredCommand::Cancel member function takes the deferred command off the command queue and thus reduces the reference count by one. Once taken off the queue, the command cannot be put back on the queue.

Protected Data MembersDescription
m_bStreamFlag for stream time or presentation time. to be passed to the invoked method.
m_DispatchAccesses the ITypeInfo interface.
m_dispidMethodMethod on the interface to run.
m_DispParams CDispParams object containing the DISPPARAMS parameter list
m_hrResultStores the returned HRESULT value.
m_iidGlobally unique identifier (GUID) of the interface.
m_pQueuePointer to the CCmdQueue object that exposes the IQueueCommand interface.
m_pUnkIUnknown pointer to the interface on which the command will be run.
m_pvarResultResulting information, if any, from the invoked method.
m_timeTime at which the command will be run.
m_wFlagsFlags specifying the context of the invocation.
Member FunctionsDescription
CDeferredCommand Constructs a CDeferredCommand object.
GetFlags Retrieves the context flags associated with the deferred command.
GetIID Retrieves the interface identifier (IID) of the interface on which the method will be run.
GetMethod Retrieves the dispatch identifier of the method to be run.
GetParams Retrieves the DISPPARAMS argument list to the method.
GetResult Retrieves the resulting argument list, if one exists.
GetTime Retrieves the time when the method will be run.
Invoke Provides access to methods and properties exposed by an object.
IsStreamTime Specifies whether the command is to be run at stream time or presentation time.
IDeferredCommand MethodsDescription
Cancel Cancels a previously queued CDeferredCommand::Invoke request.
Confidence Not currently implemented.
Postpone Specifies a new presentation time for a previously queued command.
GetHResult Retrieves the HRESULT value of the invoked method.