Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6136053
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T17:33:22+00:00 2026-05-23T17:33:22+00:00

Is there a way to determine if a registered COM component is creatable as

  • 0

Is there a way to determine if a registered COM component is creatable as a stand-alone component simply by parsing the information available in the registry? In particular, by the information found in HKCR/ClsId?

My system has over 12,000 entries in this key, and I am already excluding any items that do not have an InProcServer32 or LocalServer32 key, but this only eliminates about half of the items. I believe there are still another couple thousand that are not creatable objects. I really don’t want to have to attempt to do a CreateObject() on every one of them to distinguish the ones that can be created from the ones that cannot. Is there a more efficient way?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T17:33:22+00:00Added an answer on May 23, 2026 at 5:33 pm

    Oleview

    I used Oleview
    for this purpose (back in the day :))

    Manual/programmatic

    If I remember correctly (no Windows PC nearby):

    • the class should link to a typelibrary
    • the typelib will point to a binary (dll, ocx, exe)
    • this binary contains the physical typelibrary, which you should parse
      • the midl compiler can do that (generate stubs/C headers)
      • oleview can do that (extract IDL)
      • tlbimp can do that
      • you can do it with Win32 API
      • any creatable objects should be marked coclass (not interface or source; there were also global modules which I suppose are creatable too: I’m just not sure whether they are defined as coclasses

    Show me the code

    It is possible to read the information within a type library with the ITypeLib and ITypeInfo interfaces. They can be created with the ICreateTypeLib and ICreateTypeInfo interfaces. However, the Microsoft IDL compiler (MIDL) is probably the only application to ever use ICreateType and ICreateTypeInfo.

    A quick google turned up this useful page: Reading Type Libraries with C++.

    It contains just the code to get started. Just to see whether it was worth anything, I fired up a cloud Windows instance, grabbed all the sources and compiled it.

    In contrast with the options mentioned on the site, I simply compiled on windows with

    cl.exe *.cpp /EHs ole32.lib oleaut32.lib
    

    Just for fun, I compiled the stuff on Linux (64 bit) using MingW:

    i586-mingw32msvc-g++ *.cpp -loleaut32 -lole32 -o Typelib.exe
    

    To save you the work I have put a zip-file up for download containing:

    win32_Unicode.cpp     - sources by René Nyffenegger
    win32_Unicode.h
    TestTypelib.cpp
    Typelib.cpp
    Typelib.h
    VariantHelper.cpp
    VariantHelper.h
    TestTypelib.exe       - binary compiled on windows
    

    A test run:

    # linux: ./a.exe ~/.wine/drive_c/windows/system32/msxml6.dll
    C:\Games\Stacko>TestTypelib.exe c:\Windows\System32\msxml6.dll
    
    MSXML2: Microsoft XML, v6.0
    Nof Type Infos: 149
    
    IXMLDOMImplementation
    ----------------------------
      Interface: Dispatch
      functions: 8
      variables: 0
    
      Function     : QueryInterface
        returns    : VT_VOID
        flags      : 
        invoke kind: function
        params     : 2
        params opt : 0
        Parameter  : riid type = VT_PTR (VT_USERDEFINED (GUID)) in
        Parameter  : ppvObj type = VT_PTR (VT_PTR) out
    
      Function     : AddRef
        returns    : VT_UI4
        flags      : 
        invoke kind: function
        params     : 0
        params opt : 0
    

    (snip) and 15499 lines more

    Concluding

    I hope this gives you a good starting point in scanning your system for installed, creatable, COM components

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a way to determine who is logged on to a particular (remote)
Is there a way to determine which event listeners are registered with a display
Is there any way to determine whether the Accelerate.framework is available at runtime from
Is there a way to determine how many capture groups there are in a
Is there a way to determine the number of users that have active sessions
Is there any way to determine a removable drive speed in Windows without actually
Is there any way to determine if an object is a generic list? I'm
Is there a way to determine the display length of a given string (in
Is there a way to determine if the screen has been shut off via
Is there a way to determine (.NET preferably) if the current user is a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.