<?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[Windows Beenden ?]]></title><description><![CDATA[<p>hi, ich habe eine app. welche auf buttondruck windows (xp) beenden soll.<br />
allerdings habe ich noch keinen befehl zum beenden von windows gefunden.kann mir bitte jemand helfen ?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/74295/windows-beenden</link><generator>RSS for Node</generator><lastBuildDate>Sun, 26 Apr 2026 12:36:22 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/74295.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 19 May 2004 07:44:33 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Windows Beenden ? on Wed, 19 May 2004 07:44:33 GMT]]></title><description><![CDATA[<p>hi, ich habe eine app. welche auf buttondruck windows (xp) beenden soll.<br />
allerdings habe ich noch keinen befehl zum beenden von windows gefunden.kann mir bitte jemand helfen ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/523155</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/523155</guid><dc:creator><![CDATA[karli_k]]></dc:creator><pubDate>Wed, 19 May 2004 07:44:33 GMT</pubDate></item><item><title><![CDATA[Reply to Windows Beenden ? on Wed, 19 May 2004 07:59:34 GMT]]></title><description><![CDATA[<p>Guck dir mal &quot;shutdown&quot; an. Gib es einfach mal in die Konsole ein, dann kriegst du alle Parameter aufgelistet. Dann musst du nur noch aus deiner Anwendung Shutdown aufrufen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/523165</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/523165</guid><dc:creator><![CDATA[the_alien]]></dc:creator><pubDate>Wed, 19 May 2004 07:59:34 GMT</pubDate></item><item><title><![CDATA[Reply to Windows Beenden ? on Wed, 19 May 2004 08:34:35 GMT]]></title><description><![CDATA[<p>Versuch mal folgendes</p>
<pre><code class="language-cpp">BOOL Shutdown(UINT Flag/*=EWX_POWEROFF*/)
{
    TOKEN_PRIVILEGES TPrivileges;
    HANDLE hProc;
    OSVERSIONINFO OSVersion;
    OSVersion.dwOSVersionInfoSize=sizeof(OSVERSIONINFO);
    GetVersionEx(&amp;OSVersion);
    // prüfen, ob nt/2k/xp
    if(OSVersion.dwPlatformId==VER_PLATTFORM_WIN32_NT)
    {
        // prozess token holen
        if(OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY,&amp;hProc)
        {
            // luid besorgen
            if(LookupPrivilegeValue(NULL,SE_SHUTDOWN_NAME,&amp;TPrivileges.Privileges[0].Luid))
        {
            TPrivileges.PrivilegeCount=1;
            TPrivileges.Privileges[0].Attributes=SE_PRIVILEGE_ENABLED;
            if(AdjustTokenPrivileges(hProc,false,&amp;TPrivileges,0,(PTOKEN_PRIVILEGES)NULL,0))
            {
                return ExitWindowsEx(Flag,NULL);
            }

        }
    }    
    return FALSE;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/523192</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/523192</guid><dc:creator><![CDATA[Ernsti]]></dc:creator><pubDate>Wed, 19 May 2004 08:34:35 GMT</pubDate></item><item><title><![CDATA[Reply to Windows Beenden ? on Wed, 19 May 2004 09:19:00 GMT]]></title><description><![CDATA[<p>danke ! voll super ! wär was für die faq, oder ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/523263</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/523263</guid><dc:creator><![CDATA[karli_k]]></dc:creator><pubDate>Wed, 19 May 2004 09:19:00 GMT</pubDate></item><item><title><![CDATA[Reply to Windows Beenden ? on Wed, 19 May 2004 09:52:16 GMT]]></title><description><![CDATA[<p>karli_k schrieb:</p>
<blockquote>
<p>danke ! voll super ! wär was für die faq, oder ?</p>
</blockquote>
<p>So wie der hier ?<br />
<a href="http://www.c-plusplus.net/forum/viewtopic.php?t=39051" rel="nofollow">http://www.c-plusplus.net/forum/viewtopic.php?t=39051</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/523288</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/523288</guid><dc:creator><![CDATA[isabeau]]></dc:creator><pubDate>Wed, 19 May 2004 09:52:16 GMT</pubDate></item></channel></rss>