Click here to Skip to main content
15,892,480 members
Home / Discussions / COM
   

COM

 
GeneralRe: Exception in COM Pin
denghp18-Jun-09 23:05
denghp18-Jun-09 23:05 
GeneralRe: Exception in COM Pin
Stuart Dootson18-Jun-09 23:15
professionalStuart Dootson18-Jun-09 23:15 
GeneralRe: Exception in COM Pin
denghp18-Jun-09 23:25
denghp18-Jun-09 23:25 
AnswerRe: Exception in COM Pin
Md. Marufuzzaman6-Jul-09 21:58
professionalMd. Marufuzzaman6-Jul-09 21:58 
QuestionATL COM server crash Pin
Harish Pulimi17-Jun-09 5:36
Harish Pulimi17-Jun-09 5:36 
AnswerRe: ATL COM server crash Pin
Roger Stoltz17-Jun-09 6:42
Roger Stoltz17-Jun-09 6:42 
GeneralRe: ATL COM server crash Pin
Harish Pulimi17-Jun-09 21:46
Harish Pulimi17-Jun-09 21:46 
GeneralRe: ATL COM server crash Pin
Roger Stoltz18-Jun-09 0:57
Roger Stoltz18-Jun-09 0:57 
Harish Pulimi wrote:
apologies for not providing more details.


No worries. There's no point in posting a lot of details before it's clear what to provide the details for. Smile | :)

I don't really understand your architecture and how this mysterious "exe" keeps track of the running servers. It seems like the "exe" is a COM server itself.... Unsure | :~


Harish Pulimi wrote:
I have an exe which keeps track of all the servers


How is this accomplished if CreateInstance() isn't called from this "exe" in order to create the other servers?


Harish Pulimi wrote:
This exe needs to run all the time and if not already started, it will start through the next CreateInstance() call made by a client.


How is the "exe" started?
Is it an out-of-process COM server and "started" with CreateInstance()?
Perhaps you should consider to have it running as a service.
If the "exe" is an out-of-process COM server that doesn't run as a service, it is quite expected that it will terminate if its reference count reaches zero unless you've provided functionality to prevent it.

The call stack snippets you've provided implies that the call to the server is made in an RPC-thread which means that you're using a multithreaded solution.
In such case it's fairly reasonable to suspect thread synchronization issues, but first we have to agree on how the apartments are set up. So I have a couple of questions for you...

  1. Are you certain that every thread that uses any kind of COM related stuff contains a call to ::CoInitialize() or one if its equivalents?
  2. Are you certain that every thread that instantiates a COM server has a message pump that will not be blocked?
  3. What threading model have you registered below the server entry in the registry?
    In other words; what value is assigned to the registry value "ThreadingModel" in the registry entry HKCR\CLSID\{<your server CLSID>}\InprocServer32?
  4. How is the apartment initialized from which you create the server?
    I suspect it is initialized as a multithreaded apartment.
  5. Are you using proper marshalling? How?



"It's supposed to be hard, otherwise anybody could do it!" - selfquote
"High speed never compensates for wrong direction!" - unknown


GeneralRe: ATL COM server crash Pin
Harish Pulimi10-Feb-10 2:28
Harish Pulimi10-Feb-10 2:28 
GeneralRe: ATL COM server crash Pin
Member 176963118-Jul-11 12:21
Member 176963118-Jul-11 12:21 
QuestionCan we get object size from the Interface pointer? Pin
Mahesh Kulkarni16-Jun-09 22:45
Mahesh Kulkarni16-Jun-09 22:45 
AnswerRe: Can we get object size from the Interface pointer? Pin
Roger Stoltz16-Jun-09 23:52
Roger Stoltz16-Jun-09 23:52 
AnswerRe: Can we get object size from the Interface pointer? Pin
Stephen Hewitt17-Jun-09 3:14
Stephen Hewitt17-Jun-09 3:14 
GeneralRe: Can we get object size from the Interface pointer? Pin
led mike17-Jun-09 4:47
led mike17-Jun-09 4:47 
AnswerRe: Can we get object size from the Interface pointer? Pin
Vi221-Jun-09 22:35
Vi221-Jun-09 22:35 
QuestionCOM (system.__comobject) i need to convert it to byte[] C# Pin
Sander123432116-Jun-09 4:58
Sander123432116-Jun-09 4:58 
AnswerRe: COM (system.__comobject) i need to convert it to byte[] C# Pin
led mike16-Jun-09 5:53
led mike16-Jun-09 5:53 
GeneralRe: COM (system.__comobject) i need to convert it to byte[] C# Pin
Sander123432116-Jun-09 6:28
Sander123432116-Jun-09 6:28 
GeneralRe: COM (system.__comobject) i need to convert it to byte[] C# Pin
led mike16-Jun-09 8:41
led mike16-Jun-09 8:41 
QuestionHow to Interop 2D char from COM function in c# Pin
platso_58816-Jun-09 4:44
platso_58816-Jun-09 4:44 
AnswerRe: How to Interop 2D char from COM function in c# Pin
Stuart Dootson16-Jun-09 8:59
professionalStuart Dootson16-Jun-09 8:59 
Questionhelp me ! resolve this error and tell me . Why ? Pin
chungduy14-Jun-09 17:00
chungduy14-Jun-09 17:00 
AnswerRe: help me ! resolve this error and tell me . Why ? Pin
Stuart Dootson14-Jun-09 23:34
professionalStuart Dootson14-Jun-09 23:34 
QuestionCOM wrapper for .net library Pin
noob42013-Jun-09 1:21
noob42013-Jun-09 1:21 
QuestionOut of memory problem in Matlab with ActiveX event handling Pin
LaiAlan11-Jun-09 17:32
LaiAlan11-Jun-09 17:32 

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.