如何确定给定的COM库的线程模型?线程、模型、COM

2023-09-03 23:10:21 作者:把刀藏进袖里

我有一个COM库,我应该在我的ASP.NET MVC应用程序中使用。但是我不能确定它的线程单元模型。如何确定的呢?

I have a COM library I should use in my ASP.NET MVC application. However I am unsure about its thread apartment model. How can I determine it?

推荐答案

确定组件的 CLSID 使用此键在注册表:

Determine the component's CLSID from the registry using this key:

HKEY_CLASSES_ROOT\{component's progid}\CLSID

然后查找了的ThreadingModel 使用此注册表项

HKEY_CLASSES_ROOT\CLSID\{component's clsid}\InprocServer32\ThreadingModel