-
February 28th, 2009, 11:11 PM
#1
Quitting a Process...
I'm creating a small, console app to close a running process (utorrent.exe).
I was wondering how i would go about doing that... TerminateProcess, ExitProcess, some sort of system() control?
Any input would be appreciated.
-
March 1st, 2009, 02:44 AM
#2
Re: Quitting a Process...
Use TerminateProcess.
But it is not a clean termination.
Certain resources held by the process may become corrupt.
-
March 2nd, 2009, 07:36 AM
#3
Re: Quitting a Process...
Originally Posted by patyork
I'm creating a small, console app to close a running process (utorrent.exe).
I was wondering how i would go about doing that... TerminateProcess, ExitProcess, some sort of system() control?
The best way is to go the way a regular user does: send Exit command. Find out the Exit menu item command id and send that command message to the utorrent.exe window. Use Spy++ for finding out the mentioned id value.
Best regards,
Igor
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
|