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.