Click here to Skip to main content
15,921,028 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionCPU Usage - 100% Pin
Programm3r14-Nov-06 6:21
Programm3r14-Nov-06 6:21 
AnswerRe: CPU Usage - 100% Pin
Anthony Mushrow14-Nov-06 6:34
professionalAnthony Mushrow14-Nov-06 6:34 
GeneralRe: CPU Usage - 100% Pin
Programm3r14-Nov-06 6:48
Programm3r14-Nov-06 6:48 
GeneralRe: CPU Usage - 100% Pin
Zac Howland14-Nov-06 10:18
Zac Howland14-Nov-06 10:18 
QuestionRe: CPU Usage - 100% Pin
Programm3r14-Nov-06 18:26
Programm3r14-Nov-06 18:26 
AnswerRe: CPU Usage - 100% Pin
Zac Howland15-Nov-06 4:57
Zac Howland15-Nov-06 4:57 
QuestionRe: CPU Usage - 100% Pin
Programm3r14-Nov-06 18:45
Programm3r14-Nov-06 18:45 
AnswerRe: CPU Usage - 100% Pin
Zac Howland15-Nov-06 5:01
Zac Howland15-Nov-06 5:01 
You can pass as many handles as you want (and as resources call allow for) to the WaitForMultipleObjects method. You can set the flag to either wait for 1 or more, or wait for all before the function returns, depending on what you want (though, I suspect with many objects, you will want to know if any 1 of them has triggered since the liklihood of all of them triggering isn't very high).

You should also note that with network communications (which is what I think you are using it for?) you only really need 1 HANDLE (just an event saying that an incoming connection is being requested). When you handle that event (presumably by spawning a thread to handle the connection), you can reset the event to non-signaled state and resume waiting for connections.

If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week

Zac

AnswerRe: CPU Usage - 100% Pin
Mark Salsbery14-Nov-06 6:43
Mark Salsbery14-Nov-06 6:43 
GeneralRe: CPU Usage - 100% Pin
Programm3r14-Nov-06 6:51
Programm3r14-Nov-06 6:51 
GeneralRe: CPU Usage - 100% Pin
Mark Salsbery14-Nov-06 6:54
Mark Salsbery14-Nov-06 6:54 
GeneralRe: CPU Usage - 100% Pin
Programm3r14-Nov-06 6:57
Programm3r14-Nov-06 6:57 
QuestionRe: CPU Usage - 100% Pin
David Crow14-Nov-06 6:51
David Crow14-Nov-06 6:51 
AnswerRe: CPU Usage - 100% Pin
Programm3r14-Nov-06 6:54
Programm3r14-Nov-06 6:54 
GeneralRe: CPU Usage - 100% Pin
Programm3r14-Nov-06 7:52
Programm3r14-Nov-06 7:52 
QuestionGetline() in thread Pin
Max++14-Nov-06 4:58
Max++14-Nov-06 4:58 
AnswerRe: Getline() in thread Pin
Cedric Moonen14-Nov-06 5:05
Cedric Moonen14-Nov-06 5:05 
AnswerRe: Getline() in thread Pin
Viorel.14-Nov-06 5:12
Viorel.14-Nov-06 5:12 
Answeruse <pre></pre> tags Pin
toxcct14-Nov-06 5:19
toxcct14-Nov-06 5:19 
Questionactivex with managed assembly Pin
Sandra197414-Nov-06 4:56
Sandra197414-Nov-06 4:56 
QuestionProblem in Owner Draw Button Pin
Parthi_Appu14-Nov-06 4:51
Parthi_Appu14-Nov-06 4:51 
AnswerRe: Problem in Owner Draw Button Pin
PJ Arends14-Nov-06 5:51
professionalPJ Arends14-Nov-06 5:51 
GeneralRe: Problem in Owner Draw Button Pin
Parthi_Appu14-Nov-06 17:20
Parthi_Appu14-Nov-06 17:20 
GeneralRe: Problem in Owner Draw Button Pin
Hamid_RT14-Nov-06 19:09
Hamid_RT14-Nov-06 19:09 
GeneralRe: Problem in Owner Draw Button Pin
Parthi_Appu14-Nov-06 19:36
Parthi_Appu14-Nov-06 19:36 

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.