CoCreateInstance和CreateInstance之间的确切区别 [英] Exact difference between CoCreateInstance and CreateInstance

查看:191
本文介绍了CoCreateInstance和CreateInstance之间的确切区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我读了很多文章,但总是想知道CreateInstance和CoCreateInstance之间究竟有什么区别。我知道COM的基本原理,但不知道其错综复杂。



谢谢

Hi,

I have read lot many articles but always wonder what is exact difference between CreateInstance and CoCreateInstance. I know fundamentals of COM but do not know its intricacies.

Thanks

推荐答案

CoCreateInstance 是COM库中的辅助函数,它定位您所关注对象的classfactory(通过CLSID或PROGID)并调用其 IClassFactory :: CreateInstance 方法



因此,在实践中它们是相同的东西
CoCreateInstance is the helper function in the COM libraries, that locates the classfactory for the object you're after (by CLSID or PROGID) and invokes its IClassFactory::CreateInstance method

So, in practice they're the same thing


这篇关于CoCreateInstance和CreateInstance之间的确切区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆