7

I'd like to access a COM library via late binding.
How can I find out its progID?

Type oClassType = Type.GetTypeFromProgID("THE MISSING PROGID");
Marc
  • 9,012
  • 13
  • 57
  • 72

1 Answers1

6

The progID is generally going to be of the form Library.Class, you can view what classes a COM library exposes using oleview.

The feature you want in oleview is View TypeLib (three little red triangles). The Library name will be at the top and you will want to use the name of the class as seen under CoClasses

Hydrargyrum
  • 3,378
  • 4
  • 27
  • 41
cmsjr
  • 56,771
  • 11
  • 70
  • 62
  • Thanks a lot. I just had to manually download (and register) iviewers.dll from some site via Google. Somehow this DLL wasn't included in the download and I also couldn't find it on the systsem. – Marc Aug 14 '09 at 06:13
  • 1
    This answer had a dead link for obtaining oleview, so it took me a while to locate it. For the benefit of people finding this answer later, if you have Visual Studio installed, oleview is probably already on your system under `Program Files (x86)\Windows Kits\x.x\bin\x86`. If you don't have oleview installed already, it can be obtained by installing the SDK Tools component of your preferred version of the Windows SDK: http://www.microsoft.com/en-us/search/DownloadResults.aspx?q=Windows%20SDK – Hydrargyrum May 07 '14 at 07:21
  • Thanks for tracking that down. – cmsjr May 09 '14 at 03:13