如何查询当前线程的COM公寓状态 [英] How to Query the COM Apartment State for the Current Thread

查看:190
本文介绍了如何查询当前线程的COM公寓状态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

.NET Thread类有一个方便的函数GetApartmentState(),返回线程上下文的公寓。对于本地代码(C ++,C),是否有类似的 Co< something-something> 函数?我觉得我应该知道,因为我已经编程COM近10年,但我找不到答案。

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.

推荐答案

您要查找的功能是 CoGetApartmentType

The function you're looking for is CoGetApartmentType.

这篇关于如何查询当前线程的COM公寓状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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