How to send WM_QUIT to a process

Hi, im new to C++ and can make simple console applications and such. I would like to know how i can send a WM_QUIT to a process by specifying the process name. For example, if the processname variable contains "notepad.exe", it will send WM_QUIT to it.

I want to send WM_QUIT not WM_CLOSE tho, for reasons i cant reveal :O

If anyone can help me, i would be eternally grateful
If you feel that strongly about it, why not just kill the process?
Because the process can only be killed using WM_QUIT :) You cant end it with task manager, taskkill, pskill, etc. Only WM_QUIT will work.
TerminateProcess?
how about some sample code for terminating a process?
closed account (S6k9GNh0)
Sound's like a virus.
Topic archived. No new replies allowed.