Click here to Skip to main content
15,895,656 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: COM message pump Pin
Roger Stoltz27-Mar-08 22:47
Roger Stoltz27-Mar-08 22:47 
GeneralRe: COM message pump Pin
George_George27-Mar-08 23:38
George_George27-Mar-08 23:38 
GeneralRe: COM message pump Pin
Roger Stoltz28-Mar-08 0:04
Roger Stoltz28-Mar-08 0:04 
GeneralRe: COM message pump Pin
George_George28-Mar-08 0:29
George_George28-Mar-08 0:29 
GeneralRe: COM message pump Pin
Roger Stoltz28-Mar-08 0:53
Roger Stoltz28-Mar-08 0:53 
GeneralRe: COM message pump Pin
George_George28-Mar-08 4:24
George_George28-Mar-08 4:24 
GeneralRe: COM message pump Pin
Roger Stoltz28-Mar-08 4:41
Roger Stoltz28-Mar-08 4:41 
GeneralRe: COM message pump Pin
George_George28-Mar-08 5:05
George_George28-Mar-08 5:05 
Thanks Roger,


I think I almost get your idea. Let me repeat to see whether my understanding is correct.

1. You create main thread (STA) and the worker thread (as COM client);
2. Worker thread will call the main thread, through marshelling;
3. When the main thread receives the method call in (2), it will call some method in worker thread through ::SendMessage, and will wait for reply from worker thread;
4. Since worker thread in (2) will be in wait status for main thread to return its call, the method call from main thread to the worker thread in step (3) will be blocked -- since the worker thread is in waiting status.

My understanding correct?

I think it is a situation when the main thread and the worker thread will wait for each other at the same time, it should be called deadlock??


regards,
George
GeneralRe: COM message pump Pin
Stephen Hewitt27-Mar-08 15:33
Stephen Hewitt27-Mar-08 15:33 
GeneralRe: COM message pump Pin
Iain Clarke, Warrior Programmer27-Mar-08 22:49
Iain Clarke, Warrior Programmer27-Mar-08 22:49 
GeneralRe: COM message pump Pin
George_George27-Mar-08 23:48
George_George27-Mar-08 23:48 
GeneralProblem in Focusing... Pin
Ashish Chauhan26-Mar-08 21:16
Ashish Chauhan26-Mar-08 21:16 
GeneralRe: Problem in Focusing... Pin
Naveen26-Mar-08 21:49
Naveen26-Mar-08 21:49 
GeneralRe: Problem in Focusing... Pin
Ashish Chauhan26-Mar-08 22:42
Ashish Chauhan26-Mar-08 22:42 
GeneralRe: Problem in Focusing... Pin
Naveen26-Mar-08 22:49
Naveen26-Mar-08 22:49 
GeneralRe: Problem in Focusing... Pin
Ashish Chauhan26-Mar-08 22:57
Ashish Chauhan26-Mar-08 22:57 
GeneralRe: Problem in Focusing... Pin
Naveen26-Mar-08 23:12
Naveen26-Mar-08 23:12 
GeneralRe: Problem in Focusing... Pin
Ashish Chauhan26-Mar-08 23:24
Ashish Chauhan26-Mar-08 23:24 
GeneralRe: Problem in Focusing... Pin
Ashish Chauhan26-Mar-08 23:29
Ashish Chauhan26-Mar-08 23:29 
GeneralRe: Problem in Focusing... Pin
Naveen26-Mar-08 23:39
Naveen26-Mar-08 23:39 
GeneralRe: Problem in Focusing... Pin
Ashish Chauhan26-Mar-08 23:42
Ashish Chauhan26-Mar-08 23:42 
GeneralRe: Problem in Focusing... Pin
Naveen27-Mar-08 1:04
Naveen27-Mar-08 1:04 
GeneralRe: Problem in Focusing... Pin
Rajkumar R26-Mar-08 21:50
Rajkumar R26-Mar-08 21:50 
QuestionRe: Problem in Focusing... Pin
David Crow27-Mar-08 3:18
David Crow27-Mar-08 3:18 
QuestionDate and time format conversion Pin
monsieur_jj26-Mar-08 20:26
monsieur_jj26-Mar-08 20:26 

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.