How to know which COM component is called by a certain PIA?

梦想的初衷 提交于 2019-12-08 06:03:22

问题


I got a PIA installed on my box, it is Microsoft.mshtml. If I understandd it correctly, these PIA is provided by Microsoft to ease our life of COM interop. But I want to know which COM component is actually wrapped/called by this PIA. Because I am having a UnauthorizedAccessException, I want to locate the actual COM component and use dcomcnfg.exe to grant it proper permission. I hope this is the right direction.

Thanks!


回答1:


It is c:\windows\system32\mshtml.dll. I seriously doubt that dcomcnfg.exe is going to solve your problem, this is an in-process COM server. You might get more insight by using Sysinternals' ProcMon utility to see exactly which registry or file access is generating the exception. Look for error code 5.

You only need the PIA when you expose types from that COM server in your own public classes. Not that common. PIAs are history with the terrific "Embed Interop Types" option in VS2010. Nicknamed the "no pia" option. You avoid the PIA with Project + Add Reference, Browse tab, select c:\windows\system32\mshtml.tlb. The .dll in earlier versions of Windows.



来源:https://stackoverflow.com/questions/6871492/how-to-know-which-com-component-is-called-by-a-certain-pia

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