Guest Posted February 6, 2015 Share Posted February 6, 2015 (edited) Hi, I have a question.Is there any advantage or a good reason to use _ProcessTerminate with $iExitCode ? What exactly does it mean if I terminate process with $iExitCode ? I did not found about this information on the Internet. What are the advantages in using _ProcessTerminate Instead of ProcessClose ? Edited February 6, 2015 by Guest Link to comment Share on other sites More sharing options...
JohnOne Posted February 7, 2015 Share Posted February 7, 2015 (edited) Link to _ProcessTerminate EDIT: Never mind, thought this was in GHAS for some reason. Edited February 7, 2015 by JohnOne AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
FaridAgl Posted February 8, 2015 Share Posted February 8, 2015 ProcessClose() calls TerminateProcess() API internally. TerminateProcess() needs a process handle and an exit code. When you call ProcessClose(), at least three APIs are called: OpenProcess(), TerminateProcess() and CloseHandle(). The exit code of a process could be retrieved using GetExitCodeProcess(). The exit code of a process comes from three places: first parameter of ExitProcess(), second parameter of TerminateProcess() and return value of the entry point (int main(...) function in C/C++ etc). http://faridaghili.ir Link to comment Share on other sites More sharing options...
Guest Posted February 8, 2015 Share Posted February 8, 2015 (edited) ProcessClose() calls TerminateProcess() API internally. TerminateProcess() needs a process handle and an exit code. When you call ProcessClose(), at least three APIs are called: OpenProcess(), TerminateProcess() and CloseHandle(). The exit code of a process could be retrieved using GetExitCodeProcess(). The exit code of a process comes from three places: first parameter of ExitProcess(), second parameter of TerminateProcess() and return value of the entry point (int main(...) function in C/C++ etc). Thank you.This information useful.So it is better for me to use TerminateProcess In cases when I already opened handle.. Edited February 8, 2015 by Guest Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now