How to terminate a process? 
Author Message
 How to terminate a process?

How do I terminate a process which was created by CreateProcess function?
Here is what I got so far:

void CMFPView::OnFaxEditor()
{
    STARTUPINFO sinfo = {sizeof(sinfo), NULL, NULL, NULL, NULL, NULL, NULL,
               NULL, NULL, NULL, NULL, STARTF_USESHOWWINDOW, SW_SHOW, 0,
NULL,
               NULL, NULL, NULL};
    PROCESS_INFORMATION pinfo;
    CreateProcess(NULL, "d:\\mfp\\faxNumStg-VB\\faxNumStg.exe",
                  NULL,NULL,FALSE,CREATE_DEFAULT_ERROR_MODE,NULL,NULL,
                  &sinfo,&pinfo);

Quote:
}

The faxNumStg AP doesn't terminate unless user choose to close the AP.  If
user did not close faxNumStg AP, how do I terminate faxNumStg AP
automatically when the calling AP was terminated.  Any suggestion would be
greatly appreciated.  Thanks in advance.

Best Regards,
Tiffany Chen



Sun, 16 Sep 2001 03:00:00 GMT  
 How to terminate a process?
how about TerminateProcess( pinfo.hProcess, 0 );
Quote:

>How do I terminate a process which was created by CreateProcess function?
>Here is what I got so far:

>void CMFPView::OnFaxEditor()
>{
>    STARTUPINFO sinfo = {sizeof(sinfo), NULL, NULL, NULL, NULL, NULL, NULL,
>               NULL, NULL, NULL, NULL, STARTF_USESHOWWINDOW, SW_SHOW, 0,
>NULL,
>               NULL, NULL, NULL};
>    PROCESS_INFORMATION pinfo;
>    CreateProcess(NULL, "d:\\mfp\\faxNumStg-VB\\faxNumStg.exe",
>                  NULL,NULL,FALSE,CREATE_DEFAULT_ERROR_MODE,NULL,NULL,
>                  &sinfo,&pinfo);
>}

>The faxNumStg AP doesn't terminate unless user choose to close the AP.  If
>user did not close faxNumStg AP, how do I terminate faxNumStg AP
>automatically when the calling AP was terminated.  Any suggestion would be
>greatly appreciated.  Thanks in advance.

>Best Regards,
>Tiffany Chen



Sun, 16 Sep 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Find and terminate a process under WIN98

2. How to terminate a process

3. How to terminate a Process by Name ??

4. About terminate a process:

5. How to terminate a process created with CreateProcess(...)

6. Cannot terminate a process.

7. How to terminate a process?

8. How do I terminate a process that I created

9. How to terminate a Process by Name ??

10. (Q) How to terminate a Process

11. How to terminate a process

12. How to terminate child process when calling process exits?

 

 
Powered by phpBB® Forum Software