How to find a COM dll installation working back fr

2019-09-11 05:53发布

问题:

I have a project that references a COM dll, and the Interop assembly is available and visible in my project, but I would like to locate the actual COM dll and dependencies, so that I can build a complete deployment package.

Short of just searching the registry in Regedit, is there anything else I can do to get a grip on this COM package?

回答1:

You'll always end up going to the registry. You can obtain CLSIDs from the interop, by looking for [Guid] attributes on classes. From these, you can look in HKEY_CLASSES_ROOT\CLSID\<guid>\InprocServer32 for the location of the DLL.

The OleView tool -- included with Visual Studio -- is helpful for this. One you locate your COM class under "All Objects", it can show you all the relevant registry entries in one place.