Click here to Skip to main content
15,923,006 members
Home / Discussions / COM
   

COM

 
QuestionBrowser Helper Object, problem with SHDocVw.DWebBrowserEvents2_Event.DocumentComplete [modified] Pin
klepa11235813-Jun-06 5:04
klepa11235813-Jun-06 5:04 
QuestionHow to get a HBITMAP? Pin
athomass13-Jun-06 4:52
athomass13-Jun-06 4:52 
AnswerRe: How to get a HBITMAP? Pin
Laxman Auti13-Jun-06 21:58
Laxman Auti13-Jun-06 21:58 
GeneralRe: How to get a HBITMAP? Pin
athomass14-Jun-06 2:09
athomass14-Jun-06 2:09 
AnswerRe: How to get a HBITMAP? Pin
Laxman Auti14-Jun-06 3:41
Laxman Auti14-Jun-06 3:41 
QuestionWMI Pin
abhiramsss12-Jun-06 21:07
abhiramsss12-Jun-06 21:07 
QuestionHow to embed external document? Pin
Super Lloyd12-Jun-06 19:55
Super Lloyd12-Jun-06 19:55 
AnswerRe: How to embed external document? Pin
Aamir Butt14-Jun-06 1:16
Aamir Butt14-Jun-06 1:16 
GeneralRe: How to embed external document? Pin
Super Lloyd14-Jun-06 1:53
Super Lloyd14-Jun-06 1:53 
QuestionServer busy message box Pin
Rinu_Raj11-Jun-06 23:43
Rinu_Raj11-Jun-06 23:43 
Generalusing com object of photoshop Pin
santhoshkumar_pv9-Jun-06 20:25
santhoshkumar_pv9-Jun-06 20:25 
QuestionCOM-.NET interoperability (string - BSTR marshalling) Pin
Prasadrn9-Jun-06 1:23
Prasadrn9-Jun-06 1:23 
AnswerRe: COM-.NET interoperability (string - BSTR marshalling) Pin
Andy Moore10-Jun-06 11:45
Andy Moore10-Jun-06 11:45 
Questionuse an automation object from a service Pin
joepadmiraal8-Jun-06 23:32
joepadmiraal8-Jun-06 23:32 
QuestionProblem in using Mlang Pin
Abhinav agrawal7-Jun-06 5:42
Abhinav agrawal7-Jun-06 5:42 
AnswerRe: Problem in using Mlang Pin
Stephen Hewitt8-Jun-06 17:52
Stephen Hewitt8-Jun-06 17:52 
QuestionCOM Servers Pin
HakunaMatada7-Jun-06 2:29
HakunaMatada7-Jun-06 2:29 
AnswerRe: COM Servers Pin
Roger Stoltz7-Jun-06 11:04
Roger Stoltz7-Jun-06 11:04 
GeneralRe: COM Servers Pin
HakunaMatada7-Jun-06 17:40
HakunaMatada7-Jun-06 17:40 
GeneralRe: COM Servers Pin
Roger Stoltz7-Jun-06 22:23
Roger Stoltz7-Jun-06 22:23 
TechyMaila wrote:
Its an InProc Server, so I assume that it runs in the same thread which created it. Am I right?


Yes, it's correct.


TechyMaila wrote:
if something goes wrong with the server, it crashes the client too. I do not want this to happen


Of course one never desires to crash the client. In fact, one never desires a crash at all. Wink | ;)
What do you mean by "if something goes wrong"? Usually you should write code that handles situations when something went wrong, such as checking return values, validating pointers and so forth.
You have to watch out for call chains that can generate C++ exceptions because you cannot pass exceptions through COM interfaces. If your using classes that throws exceptions you have to catch all exceptions before returning from a call to your server. Otherwise those exceptions could be the culprit that crashes your client.
The COM way of passing exceptions is the use of ISupportErrorInfo and IErrorInfo.


TechyMaila wrote:
What would be the best solution to tackle this problem?


As I understand it you have two problems: crashes and blocking calls.
Regarding the crashes you have to write code that tackles situations that can cause a crash.
Regarding blocking calls it's difficult to advise you since you haven't described what you're trying to do in more detail. I suggest you try to use asynchronous non-blocking methods, or at least something with a timeout.
Perhaps you can find something useful in this article[^].

Hope this helps
--
Roger


It's supposed to be hard, otherwise anybody could do it!

Regarding CodeProject: "resistance is pointless; you will be assimilated"

GeneralRe: COM Servers Pin
HakunaMatada7-Jun-06 22:59
HakunaMatada7-Jun-06 22:59 
AnswerRe: COM Servers Pin
Roger Stoltz8-Jun-06 0:03
Roger Stoltz8-Jun-06 0:03 
GeneralRe: COM Servers Pin
HakunaMatada8-Jun-06 1:06
HakunaMatada8-Jun-06 1:06 
AnswerRe: COM Servers Pin
Roger Stoltz8-Jun-06 2:12
Roger Stoltz8-Jun-06 2:12 
GeneralRe: COM Servers Pin
HakunaMatada8-Jun-06 17:28
HakunaMatada8-Jun-06 17:28 

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.