"Class not registered" error after registering .tlb
-
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??
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 -
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