|
-
Jul 27th, 2012, 02:30 AM
#1
Thread Starter
Lively Member
Kill program which was started with CreateProcess
Hello,
I need a way to kill a program which was started with CreateProcess.
My CreateProcess line:
Code:
CreateProcess sA, sB, ByVal 0&, ByVal 0&, 1, 0&, ByVal 0&, vbNullString, si, pi
I want to send WM_CLOSE with PostMessage, wait for 2 seconds and if program is still running use TerminateProcess.
I had no luck in doing any of that. TerminateProcess is working only if I call it straight after CreateProcess, if I want 1 second for example it is no longer working. EnumWindows API is somehow also not working, so I cannot use PostMessage.
-
Aug 1st, 2012, 01:51 AM
#2
Thread Starter
Lively Member
Re: Kill program which was started with CreateProcess
Anyone?
I know why TerminateProcess was not working for me as expected. It was not killing child processes. Question is how to find them.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|