这是MSDN2003里关于CoGetClassObject的riid参数的描述,DllGetClassObject的riid也有类似的描述,原因如你所说,是CoGetClassObject调用了DllGetClassObject,并传递了riid:
Reference to the identifier of the interface, which will be supplied in ppv on successful return. This interface will be used to communicate with the class object(这个接口是跟类对象即类厂通信的,而不是欲创建的com对象). Typically this value is IID_IClassFactory, although other values – such as IID_IClassFactory2 which supports a form of licensing – are allowed(通常它是IID_IClassFactory,但其它的值也是接受的,譬如IID_IClassFactory2).
类厂 - 创建组件对象的对象。COM为通用化以及在管理上统一和方便,COM规范要求所有标准COM组件都应实现IClassFactory接口(有关IClassFactory的功能各个方法的作用请参阅MSND/Welcome to the msnd library/msnd resource/selected online columns/Dr.GUI online/Dr. GUI on Components, COM, and ATL/part 5)