Autor Beitrag
Alstar
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 827



BeitragVerfasst: Sa 20.11.04 21:38 
Hallo Leute!

Ich arbeite an einem Programm, was bei einem Windows-Shutdown/Restart/Logoff noch eine Funktion ausführen muss.
Ich fange das Signal mit dem onClose-Event ab. Wie kann ich den Shutdown/Restart/Logoff hinauszögern, bis die Funktion beendet wurde?

Danke!

Alstar
Karlson
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 2088



BeitragVerfasst: Sa 20.11.04 22:11 
Servus,

Schreibe einen Messagehandler und fange das event : WM_QuerryEndSession ab. Dort setzt du dass Messageresult auf 0. Wenn er runterfahren darft setzt du das Messageresult <> 0.
Alstar Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 827



BeitragVerfasst: Sa 20.11.04 22:21 
Hi Karlson!

Danke für deine Antwort! Allerdings bin ich der Meinung, gelesen zu haben, dass das bei Windows NT nicht mehr funktioniert ... Is das so?!

Alstar
Karlson
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 2088



BeitragVerfasst: Sa 20.11.04 23:13 
Ne, das klappt noch, zumindest bei w2k wie's bei xp aussieht hab ich keine Ahnung ;)