Click here to Skip to main content
15,914,642 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: to send message to console exe Pin
Randor 27-Nov-11 9:06
professional Randor 27-Nov-11 9:06 
GeneralRe: to send message to console exe Pin
Richard Andrew x6427-Nov-11 9:57
professionalRichard Andrew x6427-Nov-11 9:57 
GeneralRe: to send message to console exe Pin
Randor 27-Nov-11 11:15
professional Randor 27-Nov-11 11:15 
GeneralRe: to send message to console exe Pin
Albert Holguin28-Nov-11 7:46
professionalAlbert Holguin28-Nov-11 7:46 
AnswerRe: to send message to console exe Pin
Software_Developer27-Nov-11 7:46
Software_Developer27-Nov-11 7:46 
AnswerRe: to send message to console exe Pin
David Crow27-Nov-11 11:03
David Crow27-Nov-11 11:03 
QuestionDifferent GUI rendereng between WinXP and Vista-Win7 Pin
Bram van Kampen26-Nov-11 14:38
Bram van Kampen26-Nov-11 14:38 
Questionhow to read a character array line by line in C? Pin
robin70025-Nov-11 14:38
robin70025-Nov-11 14:38 
AnswerRe: how to read a character array line by line in C? Pin
robin70025-Nov-11 18:49
robin70025-Nov-11 18:49 
GeneralRe: how to read a character array line by line in C? Pin
enhzflep25-Nov-11 21:35
enhzflep25-Nov-11 21:35 
AnswerRe: how to read a character array line by line in C? Pin
Richard MacCutchan25-Nov-11 22:24
mveRichard MacCutchan25-Nov-11 22:24 
AnswerRe: how to read a character array line by line in C? Pin
CPallini26-Nov-11 0:45
mveCPallini26-Nov-11 0:45 
GeneralRe: how to read a character array line by line in C? Pin
enhzflep26-Nov-11 0:59
enhzflep26-Nov-11 0:59 
GeneralRe: how to read a character array line by line in C? Pin
CPallini26-Nov-11 1:11
mveCPallini26-Nov-11 1:11 
QuestionWaitForSingleObject, Run do loop, win32 api Pin
jkirkerx25-Nov-11 13:44
professionaljkirkerx25-Nov-11 13:44 
AnswerRe: WaitForSingleObject, Run do loop, win32 api Pin
Chris Meech25-Nov-11 14:13
Chris Meech25-Nov-11 14:13 
GeneralRe: WaitForSingleObject, Run do loop, win32 api Pin
jkirkerx25-Nov-11 15:18
professionaljkirkerx25-Nov-11 15:18 
AnswerRe: WaitForSingleObject, Run do loop, win32 api Pin
Randor 25-Nov-11 14:24
professional Randor 25-Nov-11 14:24 
GeneralRe: WaitForSingleObject, Run do loop, win32 api Pin
jkirkerx25-Nov-11 15:19
professionaljkirkerx25-Nov-11 15:19 
AnswerRe: WaitForSingleObject, Run do loop, win32 api Pin
Chuck O'Toole25-Nov-11 15:05
Chuck O'Toole25-Nov-11 15:05 
GeneralRe: WaitForSingleObject, Run do loop, win32 api Pin
jkirkerx25-Nov-11 15:20
professionaljkirkerx25-Nov-11 15:20 
AnswerRe: WaitForSingleObject, Run do loop, win32 api Pin
Erudite_Eric26-Nov-11 9:15
Erudite_Eric26-Nov-11 9:15 
GeneralRe: WaitForSingleObject, Run do loop, win32 api Pin
jkirkerx26-Nov-11 12:37
professionaljkirkerx26-Nov-11 12:37 
QuestionRe: WaitForSingleObject, Run do loop, win32 api Pin
Randor 26-Nov-11 13:35
professional Randor 26-Nov-11 13:35 
jkirkerx wrote:
I tried Randor's Do Loop with WaitForSingleOject, but it didn't work out.


What type of problem were you having? The do/while loop sample was given because that appeared to be what you were trying to accomplish in your original post.

jkirkerx wrote:
Does the CloseHandle delete the memset, or do I have to do that manually?


The question does not make any sense. If you are referring to the variables si and pi in my code sample... they are local variables created on the stack and you do not need to perform any clean-up. The memset call is required because the STARTUPINFO struct needs to be initialized to zero to avoid passing garbage to the CreateProcess function. The only cleanup you would need to do is close the handles in the PROCESS_INFORMATION struct.

If you are looking for a complete function to copy and paste that will launch a process and wait for it to complete... the post by Chuck O'Toole will do just fine. Something tells me there is more your not telling us... but when I consult my magic 8 ball it says 'Ask again later'. Smile | :)

Best Wishes,
-David Delaune
AnswerRe: WaitForSingleObject, Run do loop, win32 api Pin
jkirkerx26-Nov-11 16:39
professionaljkirkerx26-Nov-11 16:39 

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.