How can I register COM Compnent in VC++

Thread Solved

Join Date: Oct 2006
Posts: 38
Reputation: asifjavaid is an unknown quantity at this point 
Solved Threads: 0
asifjavaid asifjavaid is offline Offline
Light Poster

How can I register COM Compnent in VC++

 
0
  #1
Nov 7th, 2008
Hi,

I working on COM Components in VC++.NET 2005,


  1. HRESULT hr = spCrypt.CoCreateInstance(__uuidof(Cryptographer::TMMPlayerHelper), 0);
  2. if( FAILED(hr) )
  3. spCrypt = 0;

I am facing an error here.

I debug the code and found that "CoCreateInstance()" is returning a message

"Class is not registered"

an my program gets crash.

How can I resolve this problem? Please reply me soon.

--
Regards,
Asif
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 16,574
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1612
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Still Learning

Re: How can I register COM Compnent in VC++

 
0
  #2
Nov 7th, 2008
Whose class is Cryptographer ? Is it registered ?
The most important thing in the Olympic Games is not to win but to take part, just as the most important thing in life is not the triumph but the struggle. The essential thing is not to have conquered but to have fought well.
-Pierre de Coubertin, The Olympic Creed Inspired by Bishop Ethelbert
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 38
Reputation: asifjavaid is an unknown quantity at this point 
Solved Threads: 0
asifjavaid asifjavaid is offline Offline
Light Poster

Re: How can I register COM Compnent in VC++

 
0
  #3
Nov 7th, 2008
Originally Posted by Ancient Dragon View Post
Whose class is Cryptographer ? Is it registered ?

Hi,

Cryptographer is a namespace. and it has different structs and classes. TMMPlayerHelper is declared as struct in this namespace.

I did not perform any registration step because i did not know how to register it?


--
Regards,
Asif
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 16,574
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1612
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Still Learning

Re: How can I register COM Compnent in VC++

 
0
  #4
Nov 7th, 2008
COM only works with ActiveX components or Windows Services programs, all of which must be registered before they can be used. Here is how to register them. If that registration fails then its not written as a COM component and therefore can not be used the way your attempting to use it.
The most important thing in the Olympic Games is not to win but to take part, just as the most important thing in life is not the triumph but the struggle. The essential thing is not to have conquered but to have fought well.
-Pierre de Coubertin, The Olympic Creed Inspired by Bishop Ethelbert
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 38
Reputation: asifjavaid is an unknown quantity at this point 
Solved Threads: 0
asifjavaid asifjavaid is offline Offline
Light Poster

Re: How can I register COM Compnent in VC++

 
0
  #5
Nov 10th, 2008
Originally Posted by Ancient Dragon View Post
COM only works with ActiveX components or Windows Services programs, all of which must be registered before they can be used. Here is how to register them. If that registration fails then its not written as a COM component and therefore can not be used the way your attempting to use it.

Thanks a lot.
Ancient Dragon. you have solved my problem. I have register the required dll and now its working perfectly.

--
Regards,
Asif
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Other Threads in the C++ Forum


Views: 540 | Replies: 4
Thread Tools Search this Thread



Tag cloud for C++
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2010 DaniWeb® LLC