Es bleibt die Frage zu klären, wann eine Anwendung als
hängend gilt. Wenn die Anwendung korrekt auf die Nachrichten innerhalb der vorgegebenen Zeitfenster die Rückmeldungen gibt, dann hängt diese eben nicht.
- Application shutdown procedure in a non-critical shutdown
Message | Visible top-level window or reason string specified | No visible top-level window and no reason string specified |
---|
WM_QUERYENDSESSION | Application can take as much time as needed to respond to WM_QUERYENDSESSION. Windows displays new UI after 5 seconds. | Application has 5 seconds to respond to WM_QUERYENDSESSION, and then Windows terminates the application if the application is unresponsive. |
WM_QUERYENDSESSION | Windows displays new UI if the application responds FALSE to WM_QUERYENDSESSION. | Windows sends WM_ENDSESSION message to the application if the application responds FALSE to WM_QUERYENDSESSION. |
WM_ENDSESSION | Application can take as much time as needed to respond to WM_ENDSESSION. Windows displays new UI after 5 seconds. | Application has 5 seconds to respond to WM_ENDSESSION, and then Windows terminates the application if the application is unresponsive. |
- Application shutdown procedure in a critical shutdown
Message | Visible top-level window or reason string specified | No visible top-level window and no reason string specified |
---|
WM_QUERYENDSESSION | Application has 1 second to respond to WM_QUERYENDSESSION, and then Windows terminates the application if the application is unresponsive. | Application has 1 second to respond to WM_QUERYENDSESSION, and then Windows terminates the application if the application is unresponsive. |
WM_QUERYENDSESSION | If the application responds FALSE to WM_QUERYENDSESSION, Windows sends WM_ENDSESSION message to the application. | If the application responds FALSE to WM_QUERYENDSESSION, Windows sends WM_ENDSESSION message to the application. |
WM_ENDSESSION | Application has 30 seconds to respond to WM_ENDSESSION, and then Windows terminates the application if the application is unresponsive. | Application has 5 seconds to respond to WM_ENDSESSION, and then Windows terminates the application if the application is unresponsive. |
Der Benutzer kann das Herunterfahren aber immer noch provozieren (egal welche Meldungen man an das System abgegeben hat), denn der soll entscheiden.
ShutdownBlockReasonCreate
Zitat:
Because users are typically in a hurry when shutting down the system, they may spend only a few seconds looking at the shutdown reasons that are displayed by the system. Therefore, it is important that your reason strings are short and clear. For example "A CD burn is in progress." is better than "This application is blocking system shutdown because a CD burn is in progress. Do not shut down."
Kaum macht man's richtig - schon funktioniert's
Zertifikat: Sir Rufo (Fingerprint: ea 0a 4c 14 0d b6 3a a4 c1 c5 b9
dc 90 9d f0 e9 de 13 da 60)