Click here to Skip to main content
15,882,376 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to get Windows Handler from process id of excel instance. Pin
includeh107-Nov-09 1:01
includeh107-Nov-09 1:01 
GeneralRe: How to get Windows Handler from process id of excel instance. Pin
NarVish7-Nov-09 1:40
NarVish7-Nov-09 1:40 
GeneralRe: How to get Windows Handler from process id of excel instance. Pin
includeh107-Nov-09 2:06
includeh107-Nov-09 2:06 
GeneralRe: How to get Windows Handler from process id of excel instance. Pin
NarVish7-Nov-09 2:21
NarVish7-Nov-09 2:21 
QuestionRe: How to get Windows Handler from process id of excel instance. Pin
David Crow7-Nov-09 10:09
David Crow7-Nov-09 10:09 
AnswerRe: How to get Windows Handler from process id of excel instance. Pin
includeh107-Nov-09 10:29
includeh107-Nov-09 10:29 
Questionthread to process call Pin
includeh106-Nov-09 23:27
includeh106-Nov-09 23:27 
AnswerRe: thread to process call Pin
«_Superman_»7-Nov-09 10:50
professional«_Superman_»7-Nov-09 10:50 
When you say a process, there is a main thread in the process.
The main thread creates thread-a.

The thread-a needs to communicate to the main thread to create the other thread.

You can do this using events.
Create an event in the main thread using CreateEvent.
The main thread can then wait for the event to be signaled using WaitForSingleObject.
The other threads can then use SetEvent to signal this event.

If your main thread is a UI thread, you will need another dedicated thread to wait for the event to become signaled so that the UI thread is not blocked.

But I believe PostThreadMessage is a better way to do this.
If your process has a window, you can also use PostMessage to the main window to achieve this.

«_Superman
I love work. It gives me something to do between weekends.

Microsoft MVP (Visual C++)

Questionfunctions of raw socket Pin
includeh106-Nov-09 22:57
includeh106-Nov-09 22:57 
AnswerRe: functions of raw socket Pin
Richard MacCutchan7-Nov-09 4:30
mveRichard MacCutchan7-Nov-09 4:30 
Questionnamed IP to digital IP Pin
includeh106-Nov-09 22:38
includeh106-Nov-09 22:38 
AnswerRe: named IP to digital IP Pin
Tony Richards6-Nov-09 23:34
Tony Richards6-Nov-09 23:34 
GeneralRe: named IP to digital IP Pin
includeh107-Nov-09 2:10
includeh107-Nov-09 2:10 
AnswerRe: named IP to digital IP Pin
David Crow7-Nov-09 10:14
David Crow7-Nov-09 10:14 
AnswerRe: named IP to digital IP Pin
Moak7-Nov-09 15:46
Moak7-Nov-09 15:46 
Question"PostMessage" without window Pin
includeh106-Nov-09 22:26
includeh106-Nov-09 22:26 
AnswerRe: "PostMessage" without window Pin
Richard MacCutchan6-Nov-09 22:32
mveRichard MacCutchan6-Nov-09 22:32 
GeneralRe: "PostMessage" without window Pin
includeh106-Nov-09 22:41
includeh106-Nov-09 22:41 
AnswerRe: "PostMessage" without window Pin
Code-o-mat6-Nov-09 22:50
Code-o-mat6-Nov-09 22:50 
GeneralRe: "PostMessage" without window Pin
Richard MacCutchan6-Nov-09 22:55
mveRichard MacCutchan6-Nov-09 22:55 
Answer[Message Deleted] Pin
Kushagra Tiwari6-Nov-09 23:38
Kushagra Tiwari6-Nov-09 23:38 
GeneralRe: "PostMessage" without window Pin
Rajesh R Subramanian7-Nov-09 4:32
professionalRajesh R Subramanian7-Nov-09 4:32 
RantRe: "PostMessage" without window Pin
Rajesh R Subramanian8-Nov-09 19:37
professionalRajesh R Subramanian8-Nov-09 19:37 
GeneralRe: "PostMessage" without window Pin
Kushagra Tiwari8-Nov-09 20:02
Kushagra Tiwari8-Nov-09 20:02 
GeneralRe: "PostMessage" without window Pin
Kushagra Tiwari8-Nov-09 20:07
Kushagra Tiwari8-Nov-09 20:07 

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.