<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Software durch Windows herunterfahren benden]]></title><description><![CDATA[<p>Problem ist folgendes.<br />
Ich möchte mein Programm nicht von Hand schließen, sondernes soll geschlossen werden wenn Windows runtergefahren wird.</p>
<p>Dabei kommt es mir nicht unbedingt darauf an das alles sauber beendet wird (ideal wär es jedoch), sondern das noch eine letzte Funktion ausgeführt wird bevor die Software beendet/abgeschossen wird.</p>
<p>Ich bin dankbar für jeden Lösungsansatz <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";-)"
      alt="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/topic/170066/software-durch-windows-herunterfahren-benden</link><generator>RSS for Node</generator><lastBuildDate>Wed, 15 Jul 2026 09:07:11 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/170066.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 11 Jan 2007 13:07:01 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Software durch Windows herunterfahren benden on Thu, 11 Jan 2007 13:24:39 GMT]]></title><description><![CDATA[<p>Problem ist folgendes.<br />
Ich möchte mein Programm nicht von Hand schließen, sondernes soll geschlossen werden wenn Windows runtergefahren wird.</p>
<p>Dabei kommt es mir nicht unbedingt darauf an das alles sauber beendet wird (ideal wär es jedoch), sondern das noch eine letzte Funktion ausgeführt wird bevor die Software beendet/abgeschossen wird.</p>
<p>Ich bin dankbar für jeden Lösungsansatz <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";-)"
      alt="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1207895</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1207895</guid><dc:creator><![CDATA[haedfinger]]></dc:creator><pubDate>Thu, 11 Jan 2007 13:24:39 GMT</pubDate></item><item><title><![CDATA[Reply to Software durch Windows herunterfahren benden on Thu, 11 Jan 2007 13:22:13 GMT]]></title><description><![CDATA[<p>Afaik schickt Windows an alle Programme noch eine &quot;Achtung, ich werde abgeschaltet&quot; Nachricht, bevor/während es sich beendet. Diese Nachricht kannst du natürlich entgegennehmen und deine Aufräumarbeiten erledigen.</p>
<p>(aber das geht nur auf WinAPI-Ebene - für reine ANSI Programme ist nicht vorgesehen, sie von außen zu beenden, es kann höchstens sein, daß das Programm vor dem Abschied noch ein Signal reingereicht bekommt, auf den es reagieren kann)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1207915</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1207915</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Thu, 11 Jan 2007 13:22:13 GMT</pubDate></item><item><title><![CDATA[Reply to Software durch Windows herunterfahren benden on Thu, 11 Jan 2007 13:26:04 GMT]]></title><description><![CDATA[<p>Zur Vervollständigung: WM_QUERYENDSESSION und WM_ENDSESSION <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1207919</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1207919</guid><dc:creator><![CDATA[Badestrand]]></dc:creator><pubDate>Thu, 11 Jan 2007 13:26:04 GMT</pubDate></item><item><title><![CDATA[Reply to Software durch Windows herunterfahren benden on Thu, 11 Jan 2007 13:27:50 GMT]]></title><description><![CDATA[<p>Und wie muß ich dann vorgehen auf WinAPI-Ebene?</p>
<p>Muß ich die in der PreTranslateMessage abfangen?<br />
Sieht fast so aus</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1207920</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1207920</guid><dc:creator><![CDATA[haedfinger]]></dc:creator><pubDate>Thu, 11 Jan 2007 13:27:50 GMT</pubDate></item><item><title><![CDATA[Reply to Software durch Windows herunterfahren benden on Thu, 11 Jan 2007 13:29:27 GMT]]></title><description><![CDATA[<p>Diese Nachrichten kannst du auf dem selben Weg abfangen wie jede andere Windows-Nachricht (WM_PAINT, WM_COMMAND,...).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1207924</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1207924</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Thu, 11 Jan 2007 13:29:27 GMT</pubDate></item><item><title><![CDATA[Reply to Software durch Windows herunterfahren benden on Thu, 11 Jan 2007 13:53:04 GMT]]></title><description><![CDATA[<p>Dieser Thread wurde von Moderator/in <a href="http://www.c-plusplus.net/forum/profile.php?mode=viewprofile&amp;u=403" rel="nofollow">HumeSikkins</a> aus dem Forum <a href="http://www.c-plusplus.net/forum/viewforum.php?f=15" rel="nofollow">C++</a> in das Forum <a href="http://www.c-plusplus.net/forum/viewforum.php?f=4" rel="nofollow">WinAPI</a> verschoben.</p>
<p>Im Zweifelsfall bitte auch folgende Hinweise beachten:<br />
<a href="http://www.c-plusplus.net/forum/viewtopic.php?t=39405" rel="nofollow">C/C++ Forum :: FAQ - Sonstiges :: Wohin mit meiner Frage?</a></p>
<p><em>Dieses Posting wurde automatisch erzeugt.</em></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1207949</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1207949</guid><dc:creator><![CDATA[C++ Forumbot]]></dc:creator><pubDate>Thu, 11 Jan 2007 13:53:04 GMT</pubDate></item><item><title><![CDATA[Reply to Software durch Windows herunterfahren benden on Thu, 11 Jan 2007 14:25:02 GMT]]></title><description><![CDATA[<p><img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/27a1.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--right_arrow"
      title=":arrow_right:"
      alt="➡"
    /> <a href="http://msdn2.microsoft.com/en-us/library/aa376890.aspx" rel="nofollow">http://msdn2.microsoft.com/en-us/library/aa376890.aspx</a> <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
<p>MSDN schrieb:</p>
<blockquote>
<p>Return Value</p>
<p>Applications should respect the user's intentions and return TRUE. By default, the DefWindowProc function returns TRUE for this message.</p>
<p>If shutting down would corrupt the system or media that is being burned, the application can return FALSE. However, it is good practice to respect the user's actions.</p>
</blockquote>
<p>Id est:</p>
<pre><code class="language-cpp">// in Deiner WndProc:
// ...

case WM_QUERYENDSESSION:
   // ...
   return (TRUE); // Herunterfahren fortsetzen
   return (FALSE); // Herunterfahren abbrechen

// ...
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1207974</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1207974</guid><dc:creator><![CDATA[CodeFinder]]></dc:creator><pubDate>Thu, 11 Jan 2007 14:25:02 GMT</pubDate></item><item><title><![CDATA[Reply to Software durch Windows herunterfahren benden on Thu, 11 Jan 2007 15:05:14 GMT]]></title><description><![CDATA[<p>Vielen Dank <strong>CodeFinder</strong> das habe ich noch benötigt.<br />
Funktioniert tadellos. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f44d.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--thumbs_up"
      title=":+1:"
      alt="👍"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1208012</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1208012</guid><dc:creator><![CDATA[haedfinger]]></dc:creator><pubDate>Thu, 11 Jan 2007 15:05:14 GMT</pubDate></item></channel></rss>