CBaseDispatch class
[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 CBaseDispatch class is a base class for implementing the IDispatch interface in a DirectShow filter.
This class is limited to supporting the Automation-compatible interfaces exported by the DirectShow type library, QuartzTypeLib. For example, the CMediaControl and CMediaPosition classes use CBaseDispatch to implement IMediaControl and IMediaPosition, respectively. Because of this limitation, there is probably no reason to use CBaseDispatch directly in your own filters.
To use this class, do the following:
- Declare a new class that supports IDispatch.
- Give your new class a private member variable of type CBaseDispatch.
- Implement the IDispatch methods.
- In your IDispatch methods, call the CBaseDispatch methods.
For more details, refer to the source code for any of the sample classes declared in Ctlutil.h.
Public Methods | Description |
---|---|
CBaseDispatch | Constructor method. |
~CBaseDispatch | Destructor method. |
GetIDsOfNames | Maps a set of names to a corresponding set of DISPIDs. |
GetTypeInfo | Retrieves the type information for the object, which can then be used to get the type information for an interface. |
GetTypeInfoCount | Retrieves the number of type information interfaces the object provides. |
Requirements
Requirement | Value |
---|---|
Header |
|
Library |
|