When you create a COM object, you primarily use the CoCreateInstance(ex) function. The second way to create COM objects is to get the class factory from the DLL, and then use the class factory object. This method is most frequently used when you create more than one COM object at a time.
CoCreateInstance counts as a single object creation request. If you use the class factory approach, this counts as two object creation requests. This is because the first creation is for the class factory object. If you have application pooling enabled, this configuration starts two Dllhost.exe processes.
Because .NET uses the class factory method to create COM objects, two DLL hosts are started on .NET clients when you create an object from the targeted COM+ application.
Article ID: 3148846 - Last Review: Apr 7, 2016 - Revision: 1