Click here to Skip to main content
15,914,406 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralRe: Does IE forward WM_DISPLAYCHANGE Message to ATL Plugin Pin
chatko27-Oct-08 2:51
chatko27-Oct-08 2:51 
QuestionHow to Monitor "Internet explorer" ? Pin
mohamed hedi16-Oct-08 23:48
mohamed hedi16-Oct-08 23:48 
AnswerRe: How to Monitor "Internet explorer" ? Pin
Michael Dunn18-Oct-08 17:10
sitebuilderMichael Dunn18-Oct-08 17:10 
GeneralRe: How to Monitor "Internet explorer" ? Pin
mohamed hedi19-Oct-08 23:30
mohamed hedi19-Oct-08 23:30 
QuestionNever Created a ATL project from scratch on VC2003 - Manging COM ATL output files Pin
Stone Free16-Oct-08 6:12
Stone Free16-Oct-08 6:12 
AnswerRe: Never Created a ATL project from scratch on VC2003 - Manging COM ATL output files Pin
Stone Free16-Oct-08 6:32
Stone Free16-Oct-08 6:32 
QuestionRe: Never Created a ATL project from scratch on VC2003 - Manging COM ATL output files Pin
Stone Free16-Oct-08 6:49
Stone Free16-Oct-08 6:49 
QuestionReturning any HRESULT from FinalConstruct other than S_OK, results in client receiving REGDB_E_CLASSNOTREG Pin
Stone Free15-Oct-08 7:33
Stone Free15-Oct-08 7:33 
Does anyone know what valid values can be returned from FinalConstruct?

Originally I was helping out some colleagues on how to set the error information in an ATL component. They wanted to be able to set the COM error information. I showed them what to do so that their COM object implemented ISupportErrorInfo. They want to return information to the client if there is an error accessing certain state information needed for the COM object to do its job. So I told them to put their code in FinalConstruct, but they are saying that the error info in _com_error::Description() is blank. An HRESULT had been set in _com_error, but it just showed as a hex value when added to the watch window with m"_hRes, hr".

When they created their COM object they didn't know to click supports ISupportErrorInfo in the atl object wizard, so this has all been added by hand.

I tried to test this using a dummy com object implementation on my PC, but the client returns REGDB_E_CLASSNOTREG. I did find a nntp message saying that you should not set any rich error info in FinalConstruct but just to return an HRESULT. However if I return any HRESULT other than S_OK, the client returns REGDB_E_CLASSNOTREG.

I have tried other code of ours that tries to set rich error info with AtlReportError etc, but I don't think this ever gets called because they are just constructing other COM objects that usually succeed. When I deliberately change the active code line to set the error information then they too return REGDB_E_CLASSNOTREG.
AnswerRe: Returning any HRESULT from FinalConstruct other than S_OK, results in client receiving REGDB_E_CLASSNOTREG Pin
Stuart Dootson15-Oct-08 10:09
professionalStuart Dootson15-Oct-08 10:09 
GeneralRe: Returning any HRESULT from FinalConstruct other than S_OK, results in client receiving REGDB_E_CLASSNOTREG Pin
Stone Free15-Oct-08 23:35
Stone Free15-Oct-08 23:35 
GeneralRe: Returning any HRESULT from FinalConstruct other than S_OK, results in client receiving REGDB_E_CLASSNOTREG Pin
Stuart Dootson16-Oct-08 2:57
professionalStuart Dootson16-Oct-08 2:57 
GeneralRe: Returning any HRESULT from FinalConstruct other than S_OK, results in client receiving REGDB_E_CLASSNOTREG Pin
Stone Free16-Oct-08 4:37
Stone Free16-Oct-08 4:37 
QuestionC#.net and VC++ Pin
balu1234514-Oct-08 7:23
balu1234514-Oct-08 7:23 
AnswerRe: C#.net and VC++ Pin
Stuart Dootson14-Oct-08 21:46
professionalStuart Dootson14-Oct-08 21:46 
QuestionIs it safe to use a iterator to keep a reference to an element in a container? Pin
followait10-Oct-08 17:34
followait10-Oct-08 17:34 
AnswerRe: Is it safe to use a iterator to keep a reference to an element in a container? Pin
Stuart Dootson11-Oct-08 7:44
professionalStuart Dootson11-Oct-08 7:44 
QuestionAssertion failed: _pAtlModule == 0 Pin
Christian Bayer8-Oct-08 23:32
Christian Bayer8-Oct-08 23:32 
AnswerRe: Assertion failed: _pAtlModule == 0 Pin
led mike10-Oct-08 5:22
led mike10-Oct-08 5:22 
GeneralRe: Assertion failed: _pAtlModule == 0 Pin
Christian Bayer12-Oct-08 22:14
Christian Bayer12-Oct-08 22:14 
GeneralRe: Assertion failed: _pAtlModule == 0 Pin
led mike13-Oct-08 6:07
led mike13-Oct-08 6:07 
GeneralRe: Assertion failed: _pAtlModule == 0 Pin
Christian Bayer13-Oct-08 9:40
Christian Bayer13-Oct-08 9:40 
GeneralRe: Assertion failed: _pAtlModule == 0 Pin
led mike13-Oct-08 9:56
led mike13-Oct-08 9:56 
GeneralRe: Assertion failed: _pAtlModule == 0 Pin
Christian Bayer13-Oct-08 12:38
Christian Bayer13-Oct-08 12:38 
QuestionAutomatically Start Windows Service on Startup [modified] Pin
narayanagvs6-Oct-08 22:10
narayanagvs6-Oct-08 22:10 
AnswerRe: Automatically Start Windows Service on Startup Pin
KarstenK6-Oct-08 23:22
mveKarstenK6-Oct-08 23:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.