Feb 26, 2015 at 10:57pm UTC
what is the code or function to close opening file.exe .. browser like chrome.exe or game.exe or what ever ?
i know the code to open file.exe
ShellExecute(0,
"open", // Operation to perform
"c:\\windows\\notepad.exe", // Application name
"c:\\example.txt", // Additional parameters
0, // Default directory
SW_SHOW);
Thank You .
Last edited on Mar 8, 2015 at 11:32pm UTC
Feb 27, 2015 at 5:45pm UTC
Last edited on Feb 27, 2015 at 5:46pm UTC
Mar 1, 2015 at 4:04pm UTC
okay thank you for your comment and sry for late for replay .. i edited the topic as you said .. and i will check your links ..
thank you .
Mar 7, 2015 at 6:00pm UTC
If you are spawning the process then already have he handle and you have full rights, no need to enumerate all running processes to get it.
However, ShellExecute will not give you the handle, use ShellExecuteEx or CreateProcess instead.
Mar 8, 2015 at 11:31pm UTC
Thanks ..
i used this code
system("taskkill /F /T /IM file.exe");