Share via


COM Utility Classes (Compact 2013)

3/26/2014

COM interface classes in DirectShow fall into the following groups: object creation and interface implementation. Class factory classes are provided for object creation, and other classes are provided to implement existing COM interfaces.

The COM utility classes include the following:

The following illustration shows the relationship between the COM classes and the interfaces they implement.

Ee492355.9b092cee-8ecf-49fb-8dde-0db3c7df244b(en-us,WinEmbedded.80).gif

CClassFactory and CFactoryTemplate are implemented by the base classes to handle automatic instantiation of filters, pins, and other DirectShow COM objects. These classes provide a scaffolding for object construction that wraps the actual COM elements required to construct an object.

CClassFactory, located in Dllentry.cpp, inherits from CBaseObject and implements the COM IClassFactory interface. This interface is used by CoCreateInstance, which instantiates a COM object by calling IClassFactory::CreateInstance, which, in turn, calls the static CreateInstance member function in your derived class.

The base classes use CFactoryTemplate to provide CClassFactory with a template containing the CLSID of your object and a pointer to the static CreateInstance function for your object class.

See Also

Reference

Utility Classes