Although classes are typically identified directly with CLSID's to APIs such as CoCreateInstance or CoGetClassObject, classes may also now be identified with a moniker called a class moniker. Class monikers bind to the class object of the class for which they are created.
The ability to identify classes with a moniker supports useful operations which are otherwise unweildy. For example, file monikers traditionally only supported rich binding to the class associated with the class of file they referred to – a moniker to an Excel file would bind to an instance of an Excel object, and a moniker to a GIF image would bind to an instance of the currently registered GIF handler. Class moniker allows you to indicate the class you want to use to manipulate a file through composition with a file moniker. A class moniker for a 3D charting class composed with a moniker to an Excel file yields a moniker which binds to an instance of the 3D charting object and initializes the object with the contents of the Excel file.
Class monikers are therefore most useful in composition with other types of monikers, such as file monikers or item monikers.
Class monikers may also be composed to the right of monikers supporting binding to the IClassActivator interface. When composed in this manner IClassActivator simply gives access to the class object and instances of the class through IClassActivator::GetClassObject. Class monikers may be identified through IMoniker::IsSystemMoniker which returns MKSYS_CLASSMONIKER in pdwMkSys.
Programmers typically create class monikers using the CreateClassMoniker function or through MkParseDisplayName (see IMoniker - Class Moniker Implementation about ParseDisplayName for details).