Einzelnen Beitrag anzeigen

Benutzerbild von rollstuhlfahrer
rollstuhlfahrer

Registriert seit: 1. Aug 2007
Ort: Ludwigshafen am Rhein
1.529 Beiträge
 
Delphi 7 Professional
 
#24

AW: Anti End Task, not WM_Close?

  Alt 3. Jan 2011, 11:36
Then search for all ways how to terminate a process and block them. The easiest way to do so is to block OpenProcess for all matters (and to handle OnCloseQuery). To let Windows shutdown, Windows is issuing a broadcast message on WM_ENDSESSION. After this message (and the check, that this message came from Windows and not from anybody else issuing WM_ENDSESSION to your window) your program needs to be terminatable.

Bernhard

ADD: Which implies: If someone hooks GetSystemMetrics, and tells your program after issuing the WM_ENDSESSION-Message to your window, your process becomes terminateable even if Windows does not really shut down.
Bernhard
Iliacos intra muros peccatur et extra!
  Mit Zitat antworten Zitat