Search code examples
comassembliesregistrycom+

What's the Maximum length for a registered COM Class?


When objects get added to the Windows Registry, they show up like so:

MyNamespace.MyType

I seem to remember running into issues with my namespaces and classnames being too long when trying to register them for COM. Is there a maximum length limitation in registering classes in Windows or COM+?


Solution

    • Have no more than 39 characters.
    • Contain no punctuation (including underscores) except one or more periods.
    • Not start with a digit.
    • Be different from the class name of any OLE 1 application, including the OLE 1 version of the same application, if there is one.*

    source = MSDN