开发者

how many class is here in only one COM?

开发者 https://www.devze.com 2023-02-26 11:16 出处:网络
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 o

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消