It's not easy: you have to find the process's main window and post it a WM_CLOSE message. There are WinAPI functions to help you with this though; see EnumWindows.

See also http://support.microsoft.com/kb/178893