Class not registered

  • Thread starter Thread starter rua17
  • Start date Start date
R

rua17

I add tow Com libraries to my project, I can see their content with
intellisense, but when I instantiate a class contained in the library:

PDDirectLib.PDDatabaseQuery pDbQuery = new PDDirectLib.PDDatabaseQuery();

It raises an unhandled exception "Class not registered"



any idea???
 
It raises an unhandled exception "Class not registered"
any idea???

The underlying COM object that the generated RCW (which is what you are
programming to when you add a COM Reference) must be registered in the
Registry through regsvr32 as it always has been. COM is COM and requires the
Registry. For a thorough explanation of all this please see my MSDN article
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/bridge.asp

--
Sam Gentile [C#/.NET MVP]
..NET Blog http://samgentile.com/blog/
MSDN Column:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/bridge.asp
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
 
thanks, now I have a diferent problem

After I registered the dll's, in the same line it tells me Unspecified Error

Sam Gentile said:
It raises an unhandled exception "Class not registered"



any idea???

The underlying COM object that the generated RCW (which is what you are
programming to when you add a COM Reference) must be registered in the
Registry through regsvr32 as it always has been. COM is COM and requires the
Registry. For a thorough explanation of all this please see my MSDN articlehttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/bridge.asp

--
Sam Gentile [C#/.NET MVP]
.NET Blog http://samgentile.com/blog/
MSDN Column:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/bridge.asp
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.


rua17 said:
I add tow Com libraries to my project, I can see their content with
intellisense, but when I instantiate a class contained in the library:

PDDirectLib.PDDatabaseQuery pDbQuery = new PDDirectLib.PDDatabaseQuery();

It raises an unhandled exception "Class not registered"



any idea???
 
Yikes, well that's not a very intuitive error message now is it? -) Can you
say more about what kind of COM component it is? I could steer you down the
path of using the .NET Framework Interop command line tools like tlbimp.exe
rather than using the IDE (my preferred approach) but I am not sure you want
to go down that path.
--
Sam Gentile [C#/.NET MVP]
..NET Blog http://samgentile.com/blog/
MSDN Column:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/bridge.asp
Please reply only to the newsgroup so that others can benefit.


This posting is provided "AS IS" with no warranties, and confers no rights.
rua17 said:
thanks, now I have a diferent problem

After I registered the dll's, in the same line it tells me Unspecified Error

Sam Gentile said:
The underlying COM object that the generated RCW (which is what you are
programming to when you add a COM Reference) must be registered in the
Registry through regsvr32 as it always has been. COM is COM and requires the
Registry. For a thorough explanation of all this please see my MSDN article
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/bridge.asp
--
Sam Gentile [C#/.NET MVP]
.NET Blog http://samgentile.com/blog/
MSDN Column:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/bridge.asp
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Back
Top