How to determine Threading Model of given COM libr

2019-04-10 20:47发布

问题:

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?

回答1:

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

HKEY_CLASSES_ROOT\{component's progid}\CLSID

Then lookup the ThreadingModel using this registry key

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


回答2:

The OLE/COM Object Viewer also shows the threading model for components.