Click here to Skip to main content
15,912,328 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: regsrv32 command Pin
Matthew Faithfull12-Jun-07 23:29
Matthew Faithfull12-Jun-07 23:29 
QuestionRibbon Control Pin
CDRAIN12-Jun-07 23:03
CDRAIN12-Jun-07 23:03 
QuestionHooking problem Pin
rrrado12-Jun-07 22:37
rrrado12-Jun-07 22:37 
Questionclose an application Pin
Russell'12-Jun-07 22:04
Russell'12-Jun-07 22:04 
AnswerRe: close an application Pin
Doc Lobster12-Jun-07 22:34
Doc Lobster12-Jun-07 22:34 
AnswerRe: close an application Pin
Naveen13-Jun-07 0:22
Naveen13-Jun-07 0:22 
GeneralRe: close an application Pin
Russell'13-Jun-07 1:46
Russell'13-Jun-07 1:46 
GeneralRe: close an application Pin
Stephen Hewitt13-Jun-07 13:47
Stephen Hewitt13-Jun-07 13:47 
_Russell_ wrote:
It works

Does it?....
Here's a quote from MSDN on TerminateProcess:
The TerminateProcess function is used to unconditionally cause a process to exit. The state of global data maintained by dynamic-link libraries (DLLs) may be compromised if TerminateProcess is used rather than ExitProcess.

ExitProcess is of no use to you however as it exits the calling process! Calling TerminateProcess like you are is, in general, dangerous and unpredictable. For example, the process could be half way through updating a file and terminating it will result in data corruption. Another example, as eluded to by MSDN, is if the DLL uses shared memory: in this case the corruption will spread to other processes using the same DLL. TerminateProcess in only meant as a last resort: you can’t make reliable software that uses it as the primary mechanism to get a process to exit.


Steve

GeneralRe: close an application Pin
Stephen Hewitt13-Jun-07 13:49
Stephen Hewitt13-Jun-07 13:49 
GeneralRe: close an application Pin
Naveen13-Jun-07 14:03
Naveen13-Jun-07 14:03 
GeneralRe: close an application Pin
Stephen Hewitt13-Jun-07 14:09
Stephen Hewitt13-Jun-07 14:09 
GeneralRe: close an application Pin
Naveen13-Jun-07 14:10
Naveen13-Jun-07 14:10 
GeneralRe: close an application Pin
Stephen Hewitt13-Jun-07 14:13
Stephen Hewitt13-Jun-07 14:13 
GeneralRe: close an application Pin
Naveen13-Jun-07 14:23
Naveen13-Jun-07 14:23 
GeneralRe: close an application Pin
Stephen Hewitt13-Jun-07 14:26
Stephen Hewitt13-Jun-07 14:26 
GeneralRe: close an application Pin
Russell'13-Jun-07 22:57
Russell'13-Jun-07 22:57 
GeneralRe: close an application Pin
David Crow14-Jun-07 2:31
David Crow14-Jun-07 2:31 
AnswerRe: close an application Pin
Jhony george13-Jun-07 1:01
Jhony george13-Jun-07 1:01 
GeneralRe: close an application Pin
Russell'13-Jun-07 1:21
Russell'13-Jun-07 1:21 
AnswerRe: close an application Pin
Hamid_RT13-Jun-07 3:40
Hamid_RT13-Jun-07 3:40 
GeneralRe: close an application Pin
Russell'13-Jun-07 3:45
Russell'13-Jun-07 3:45 
GeneralRe: close an application Pin
Russell'13-Jun-07 3:53
Russell'13-Jun-07 3:53 
GeneralRe: close an application Pin
Hamid_RT13-Jun-07 9:01
Hamid_RT13-Jun-07 9:01 
GeneralRe: close an application Pin
Hamid_RT13-Jun-07 8:59
Hamid_RT13-Jun-07 8:59 
Questionhelp with WM_KEYDOWN Pin
Sam Rens12-Jun-07 21:50
Sam Rens12-Jun-07 21:50 

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.