How can I register COM Compnent in VC++

Please support our C++ advertiser: Intel Parallel Studio Home
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: 15,437
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: 1473
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is online now Online
Still Learning

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

 
0
  #2
Nov 7th, 2008
Whose class is Cryptographer ? Is it registered ?
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
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: 15,437
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: 1473
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is online now Online
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.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
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
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC