Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. COM
  4. "Class not registered" error after registering .tlb

"Class not registered" error after registering .tlb

Scheduled Pinned Locked Moved COM
helpcomwindows-adminquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Maya_
    wrote on last edited by
    #1

    I have a TLB that i want to register. I tried with regtlibv12.exe but i dont see the CLSID's in the registry, i could only see IID's. And in the code im getting "Class not registered" error. what could be the problem?? Any suggestions??

    R 1 Reply Last reply
    0
    • M Maya_

      I have a TLB that i want to register. I tried with regtlibv12.exe but i dont see the CLSID's in the registry, i could only see IID's. And in the code im getting "Class not registered" error. what could be the problem?? Any suggestions??

      R Offline
      R Offline
      Roger Stoltz
      wrote on last edited by
      #2

      Maya_ wrote:

      I have a TLB that i want to register. I tried with regtlibv12.exe but i dont see the CLSID's in the registry, i could only see IID's.

      Of course, since you have only registered the typelib and not the server. What you have registered with the typelib is only related to the interfaces and possibly a declaration of CLSIDs if the typelib contains a "coclass" section. This means that you have only provided information in the registry for using typelib marshalling when a server is created that implements one of the interfaces that are described in this typelib. To register a server that resides in a DLL you usually use RegSvr32.exe and provide the path to your DLL as an argument to RegSvr32. If your server is an exe-server you usually run it once and it will register itself, or with a command line argument such as "regserver". This will add the CLSID key in the registry among other things and afterwards, provided that the registration was successful, clients will be able to create instances of the server.

      "It's supposed to be hard, otherwise anybody could do it!" - selfquote
      "High speed never compensates for wrong direction!" - unknown

      M 1 Reply Last reply
      0
      • R Roger Stoltz

        Maya_ wrote:

        I have a TLB that i want to register. I tried with regtlibv12.exe but i dont see the CLSID's in the registry, i could only see IID's.

        Of course, since you have only registered the typelib and not the server. What you have registered with the typelib is only related to the interfaces and possibly a declaration of CLSIDs if the typelib contains a "coclass" section. This means that you have only provided information in the registry for using typelib marshalling when a server is created that implements one of the interfaces that are described in this typelib. To register a server that resides in a DLL you usually use RegSvr32.exe and provide the path to your DLL as an argument to RegSvr32. If your server is an exe-server you usually run it once and it will register itself, or with a command line argument such as "regserver". This will add the CLSID key in the registry among other things and afterwards, provided that the registration was successful, clients will be able to create instances of the server.

        "It's supposed to be hard, otherwise anybody could do it!" - selfquote
        "High speed never compensates for wrong direction!" - unknown

        M Offline
        M Offline
        Maya_
        wrote on last edited by
        #3

        Thanks for your reply.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups