You can search on Msdn from Microsoft for keyword like close(kill) application. If not too easy to implement I'll try to ask somebody for code. I am sure that are enough free codes in internet for this action.
http://msdn.microsoft.com/library/default.asp