stopping an exe
-
-
Hi there, I have in my application a button that launches another application such as the on-screen keyboard using the createprocess function. If the button is pressed again I want to close the application. How can I do this safely? Many thanks Jim
jimjim733 wrote:
If the button is pressed again I want to close the application. How can I do this safely?
By calling
ExitProcess()
."Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
-
Hi there, I have in my application a button that launches another application such as the on-screen keyboard using the createprocess function. If the button is pressed again I want to close the application. How can I do this safely? Many thanks Jim
jimjim733 wrote:
safely
Define what you mean by 'safe' - that'll help indicate what an appropriate solution is.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
-
jimjim733 wrote:
If the button is pressed again I want to close the application. How can I do this safely?
By calling
ExitProcess()
."Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
Or if you want to kill the new application from the one that spawned it, use TerminateProcess().
-
Or if you want to kill the new application from the one that spawned it, use TerminateProcess().
I am BATMAN wrote:
...use TerminateProcess().
Which is unsafe.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
-
I am BATMAN wrote:
...use TerminateProcess().
Which is unsafe.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
I suppose Batman isn't expected to terminate gracefully a process... :rolleyes:
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles]