How to Query the COM Apartment State for the Current Thread

吃可爱长大的小学妹 提交于 2019-12-11 02:15:51

问题


The .NET Thread class has a handy function GetApartmentState() that returns the apartment of context of the thread. Is there a similar Co<something-something> function for native code (C++, C)? I feel like I should know, since I've been programming COM for almost 10 years, but I cannot find the answer.


回答1:


The function you're looking for is CoGetApartmentType.



来源:https://stackoverflow.com/questions/15981228/how-to-query-the-com-apartment-state-for-the-current-thread

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!