Click here to Skip to main content
15,890,670 members
Home / Discussions / COM
   

COM

 
GeneralRe: Design + technical issue Pin
Ahmed Charfeddine21-Aug-09 7:40
Ahmed Charfeddine21-Aug-09 7:40 
GeneralRe: Design + technical issue Pin
Baltoro21-Aug-09 12:12
Baltoro21-Aug-09 12:12 
GeneralRe: Design + technical issue Pin
Ahmed Charfeddine21-Aug-09 12:14
Ahmed Charfeddine21-Aug-09 12:14 
QuestionIPictureDisp to byte array Pin
vibindia18-Aug-09 19:12
vibindia18-Aug-09 19:12 
AnswerRe: IPictureDisp to byte array Pin
Stephen Hewitt20-Aug-09 3:52
Stephen Hewitt20-Aug-09 3:52 
AnswerRe: IPictureDisp to byte array Pin
Vi220-Aug-09 21:00
Vi220-Aug-09 21:00 
GeneralRe: IPictureDisp to byte array Pin
Stephen Hewitt23-Aug-09 4:37
Stephen Hewitt23-Aug-09 4:37 
QuestionForwarding Error Description through CComCoClass::Error crashs my app Pin
Don Rolando18-Aug-09 11:02
Don Rolando18-Aug-09 11:02 
Hi everyone!

I have a COM control that makes also use of some COM server.
Within the control I am receiveing a COM exception from the server and I have to report this error again to the control's parent.

So my naive approach was something like this:
<br />
try { ... } catch( _com_error &e)<br />
{<br />
    std::string description = e.Description();<br />
    Log(ERROR, "COM error: " << description);<br />
    return Error(description.c_str(), IID_MY_CONTROL);<br />
}<br />


But this statement makes the control's container crash without any message! Confused | :confused:
If I replace my description string with some harcoded message, it works just fine. But whenever I rely somehow on the e.Description, bang, it crashs.
I assumed it could already be freed the time it would be read on the container side, so in a further step I tried to copy the description in a new allocated variable, to save it somewhere within the control instead of locally within the catch-block, etc. But nothing works.

What are the reasons why I cannot "forward" this errror description? It can be logged correctly, but I have no chance to bring it on the containers side.


Best regards, Roland
AnswerRe: Forwarding Error Description through CComCoClass::Error crashs my app Pin
Don Rolando19-Aug-09 6:47
Don Rolando19-Aug-09 6:47 
QuestionHow can I add c# user control to c++ ATL? Pin
oleg fadi18-Aug-09 11:01
oleg fadi18-Aug-09 11:01 
AnswerRe: How can I add c# user control to c++ ATL? Pin
Don Rolando19-Aug-09 6:52
Don Rolando19-Aug-09 6:52 
QuestionConvert System.__ComObject to a class Pin
DeepToot17-Aug-09 9:35
DeepToot17-Aug-09 9:35 
AnswerRe: Convert System.__ComObject to a class Pin
Adam Maras17-Aug-09 10:25
Adam Maras17-Aug-09 10:25 
GeneralRe: Convert System.__ComObject to a class Pin
DeepToot17-Aug-09 10:34
DeepToot17-Aug-09 10:34 
GeneralRe: Convert System.__ComObject to a class Pin
warale00121-Oct-09 1:30
warale00121-Oct-09 1:30 
QuestionHolding a WMI provider instance Pin
srikanthos16-Aug-09 21:38
srikanthos16-Aug-09 21:38 
Questiondraw Visualization in custom directshow [modified] Pin
raj157616-Aug-09 19:43
raj157616-Aug-09 19:43 
QuestionMODI Microsoft Document Image Viewer 11 and 12 Pin Pin
JollyMansArt15-Aug-09 4:35
JollyMansArt15-Aug-09 4:35 
QuestionHow can I disable a KillBit for a special CLSID in a secure environment? Pin
ieaeitsch11-Aug-09 5:31
ieaeitsch11-Aug-09 5:31 
QuestionHow to set Caption and ToolTip to Toolbar button Pin
am 200910-Aug-09 22:47
am 200910-Aug-09 22:47 
QuestionQuestion about VARIANT deallocation Pin
GuimaSun10-Aug-09 4:53
GuimaSun10-Aug-09 4:53 
AnswerRe: Question about VARIANT deallocation Pin
Hristo-Bojilov10-Aug-09 6:12
Hristo-Bojilov10-Aug-09 6:12 
GeneralRe: Question about VARIANT deallocation Pin
GuimaSun10-Aug-09 6:27
GuimaSun10-Aug-09 6:27 
GeneralRe: Question about VARIANT deallocation Pin
Hristo-Bojilov10-Aug-09 6:45
Hristo-Bojilov10-Aug-09 6:45 
GeneralRe: Question about VARIANT deallocation Pin
GuimaSun10-Aug-09 7:08
GuimaSun10-Aug-09 7:08 

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.