In previous releases of COM, the primary mechanism used to create an object instance was the CoCreateInstance function. This function encapsulates the process of creating a class object, using that to create a new instance and releasing the class object. Another function of this kind is the more specific OleCreate, the OLE Compound Document helper that creates a class object and retrieves a pointer to a requested object.
To smooth the process of instance creation on distributed systems, COM has introduced four important new instance creation mechanisms:
Class monikers are a mechanism that permit you to identify the class of an object, and are typically used with another moniker, like a file moniker, to indicate the location of the object. This permits you to bind to an object ans specify the server that is to be launched for that object. Class monikers may also be composed to the right of monikers supporting binding to the IClassActivator interface. For more information, see Class Monikers.
CoCreateInstanceEx extends CoCreateInstance to make it possible to create a single uninitialized object associated with the given CLSID on a specified remote machine. In addition, rather than requesting a single interface and obtaining a single pointer to that interface, CoCreateInstanceEx makes it possible to query for multiple interfaces and (if available) receive pointers to them in a single round trip, thus permitting fewer round trips between machines. This can make remote object interaction much more efficient. To do this, the function uses an array of MULTI_QI structures.
Creating an object through CoCreateInstanceEx still requires that the object be initialized through a call to one of the initialization interfaces (such as IPersistStorage:::Load). The two helper functions, CoGetInstanceFromFile and CoGetInstanceFromIStorage encapsulate both the instance creation power of CoCreateInstanceEx and initialization, the former from a file, and the latter from a storage.