>Hi,
> Anyone know which API can use to close the runned application(.exe)? Is it got any API that don't need to get the window handle or proccess ID of the runned program ?
As Larry Miller pointed out earlier today, search the API section for the SendMessage() function. The example uses the WM_CLOSE message, which is what you want. Getting the window handle is trivial (FindWindow()), so it shouldn't be necessary to know the actual target path (e. g., "c:\myappdir\myapp.exe") of the process in order to send the message.
Mike Stewart