Click here to Skip to main content
15,927,344 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: Set registry key permissions Pin
KellyR9-Jun-07 12:07
KellyR9-Jun-07 12:07 
AnswerRe: Set registry key permissions Pin
KellyR10-Jun-07 6:51
KellyR10-Jun-07 6:51 
QuestionHelp Pin
dellthinker9-Jun-07 10:32
dellthinker9-Jun-07 10:32 
AnswerRe: Help Pin
KellyR9-Jun-07 11:03
KellyR9-Jun-07 11:03 
AnswerRe: Help Pin
Christian Graus9-Jun-07 14:10
protectorChristian Graus9-Jun-07 14:10 
QuestionForce Closing of a Module Pin
Bram van Kampen9-Jun-07 9:37
Bram van Kampen9-Jun-07 9:37 
AnswerRe: Force Closing of a Module Pin
Perspx9-Jun-07 13:26
Perspx9-Jun-07 13:26 
AnswerRe: Force Closing of a Module Pin
Mark Salsbery9-Jun-07 14:21
Mark Salsbery9-Jun-07 14:21 
LateNightsInNewry wrote:
How can I use either at a later stage to determine whether the module is still running,


The hProcess member (assuming you've used the SEE_MASK_NOCLOSEPROCESS flag) of SHELLEXECUTEINFO
can be used in a synchronization wait function - it will be signaled when the process terminates.

// polling method - wait timeout is 0
if (WAIT_OBJECT_0 == ::WaitForSingleObject(ShellExecuteInfo.hProcess, 0))
{
//process has ended
}

A process should be allowed to terminate normally. If you absolutely must terminate it from
another process you can use TerminateProcess with the same handle as above. Remember you
don't know the state of the other process when you do this so data loss can occur. It's
much better to get the other process to terminate itself normally if at all possible.

Mark




"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder

GeneralRe: Force Closing of a Module Pin
Bram van Kampen10-Jun-07 3:17
Bram van Kampen10-Jun-07 3:17 
QuestionAfxGetApp()->LoadStandardIcon but no Icon!! Pin
mercenary019-Jun-07 8:12
mercenary019-Jun-07 8:12 
AnswerRe: AfxGetApp()->LoadStandardIcon but no Icon!! Pin
Mark Salsbery9-Jun-07 8:28
Mark Salsbery9-Jun-07 8:28 
GeneralRe: AfxGetApp()->LoadStandardIcon but no Icon!! Pin
mercenary019-Jun-07 16:49
mercenary019-Jun-07 16:49 
GeneralRe: AfxGetApp()->LoadStandardIcon but no Icon!! Pin
Mark Salsbery9-Jun-07 18:35
Mark Salsbery9-Jun-07 18:35 
Questionresetting pagefaults Pin
JimmyRopes9-Jun-07 7:42
professionalJimmyRopes9-Jun-07 7:42 
QuestionExporting a function to DLL Pin
Cyrilix9-Jun-07 7:08
Cyrilix9-Jun-07 7:08 
AnswerRe: Exporting a function to DLL Pin
karle9-Jun-07 7:23
karle9-Jun-07 7:23 
GeneralRe: Exporting a function to DLL Pin
Cyrilix9-Jun-07 7:31
Cyrilix9-Jun-07 7:31 
AnswerRe: Exporting a function to DLL Pin
Mark Salsbery9-Jun-07 8:16
Mark Salsbery9-Jun-07 8:16 
GeneralRe: Exporting a function to DLL Pin
Cyrilix9-Jun-07 10:00
Cyrilix9-Jun-07 10:00 
QuestionAddString to combobox problem Pin
Max++9-Jun-07 6:53
Max++9-Jun-07 6:53 
AnswerRe: AddString to combobox problem Pin
Mark Salsbery9-Jun-07 8:22
Mark Salsbery9-Jun-07 8:22 
Questiongetting com port listing! Pin
Leo_13319-Jun-07 3:27
Leo_13319-Jun-07 3:27 
AnswerRe: getting com port listing! Pin
rp_suman9-Jun-07 4:20
rp_suman9-Jun-07 4:20 
QuestionRe: getting com port listing! Pin
David Crow9-Jun-07 6:36
David Crow9-Jun-07 6:36 
QuestionHow open winword file in VC++ Pin
Y_Kaushik9-Jun-07 2:22
Y_Kaushik9-Jun-07 2:22 

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.