every one. We know that COM server exsits as dll or ax. We can use COM component through calling CoCreateInstance. you known that each COM class has a 开发者_如何学运维CLSID. we use CLSID to create a object. I want to answer that how many COM classes can implement in one dll(COM server).
A single .dll file (in-proc COM server) can serve any sane number of COM classes - we have a commercial product that is shipped with a single COM server implementing something like twenty COM classes.
The fact that Windows registry will map multiple class ids onto the same .dll file isn't a problem - there's DllGetClassObject()
function in every in-proc COM server that is passed the class id requested and retrieves the right class factory. So a single in-proc COM server cam serve multiple COM classes.
精彩评论