My goal is to close a certain user process (screensaver) by its process ID when enumerated from my local service. I can obtain its PID, but there comes two issues, so I want to ask first before I begin implementing it. Namely:
Is it possible to obtain main thread's HWND by PID from a service?
Even if I have an HWND of a user process, will I be able to
SendMessage
it from a service?
I can obviously TerminateProcess
it, I'm just trying to be "nice" first.