<?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[neustart????]]></title><description><![CDATA[<p>also ich will mit winxp einen neustart machen aber wenn ich</p>
<p>ExitWindowsEx(EWX_REBOOT, 0)</p>
<p>benutze bleibts immer stehen</p>
<p>also beendet alles!!dann kann ich nur noch den hintergrund sehen und nix mehr machen aber warum????</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/65465/neustart</link><generator>RSS for Node</generator><lastBuildDate>Tue, 07 Apr 2026 18:05:30 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/65465.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 19 Feb 2004 10:48:54 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to neustart???? on Thu, 19 Feb 2004 10:48:54 GMT]]></title><description><![CDATA[<p>also ich will mit winxp einen neustart machen aber wenn ich</p>
<p>ExitWindowsEx(EWX_REBOOT, 0)</p>
<p>benutze bleibts immer stehen</p>
<p>also beendet alles!!dann kann ich nur noch den hintergrund sehen und nix mehr machen aber warum????</p>
]]></description><link>https://www.c-plusplus.net/forum/post/462934</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/462934</guid><dc:creator><![CDATA[Funkyman]]></dc:creator><pubDate>Thu, 19 Feb 2004 10:48:54 GMT</pubDate></item><item><title><![CDATA[Reply to neustart???? on Thu, 19 Feb 2004 12:47:43 GMT]]></title><description><![CDATA[<p>hi,<br />
vielleicht hast du nicht die noetigen rechte dazu. versuchs mal hiermit</p>
<pre><code class="language-cpp">#include &quot;stdafx.h&quot;
#include &lt;windows.h&gt;
#include &lt;winuser.h&gt;
#include &lt;stdlib.h&gt;

bool Down() 
	{ 

		//Windows NT 
		HANDLE hToken;
		TOKEN_PRIVILEGES tkp;
		OpenProcessToken(GetCurrentProcess(),TOKEN_ADJUST_PRIVILEGES|TOKEN_QUERY,&amp;hToken);
		LookupPrivilegeValue(NULL,SE_SHUTDOWN_NAME,&amp;tkp.Privileges[0].Luid);
		tkp.PrivilegeCount=1;
		tkp.Privileges[0].Attributes=SE_PRIVILEGE_ENABLED;
		AdjustTokenPrivileges(hToken,false,&amp;tkp,0,(PTOKEN_PRIVILEGES)NULL,0);

	    return ExitWindowsEx(EWX_POWEROFF ,0); 

}

int main()
{
    Down();
	return 0;
}
</code></pre>
<p><strong>edit:</strong> Codetags hinzugefügt.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/462945</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/462945</guid><dc:creator><![CDATA[msp]]></dc:creator><pubDate>Thu, 19 Feb 2004 12:47:43 GMT</pubDate></item><item><title><![CDATA[Reply to neustart???? on Thu, 19 Feb 2004 10:58:39 GMT]]></title><description><![CDATA[<p>Du musst dir erst die Rechte holen. Aber das kauen wir jede Woche einmal durch. Und das Forum hat eine Suche. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f644.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_rolling_eyes"
      title=":rolling_eyes:"
      alt="🙄"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/462946</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/462946</guid><dc:creator><![CDATA[[[global:former_user]]]]></dc:creator><pubDate>Thu, 19 Feb 2004 10:58:39 GMT</pubDate></item><item><title><![CDATA[Reply to neustart???? on Thu, 19 Feb 2004 11:21:57 GMT]]></title><description><![CDATA[<p>... die aber derzeit leider nicht funktioniert / deaktiviert ist <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/462972</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/462972</guid><dc:creator><![CDATA[flenders]]></dc:creator><pubDate>Thu, 19 Feb 2004 11:21:57 GMT</pubDate></item><item><title><![CDATA[Reply to neustart???? on Thu, 19 Feb 2004 11:40:22 GMT]]></title><description><![CDATA[<p>nee die rechte hab ich geholt hab des exemple aus der msdn</p>
<pre><code class="language-cpp">HANDLE hToken; 
   TOKEN_PRIVILEGES tkp; 

   // Get a token for this process. 

   if (!OpenProcessToken(GetCurrentProcess(), 
        TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &amp;hToken)) 
      return( FALSE ); 

   // Get the LUID for the shutdown privilege. 

   LookupPrivilegeValue(NULL, SE_SHUTDOWN_NAME, 
        &amp;tkp.Privileges[0].Luid); 

   tkp.PrivilegeCount = 1;  // one privilege to set    
   tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED; 

   // Get the shutdown privilege for this process. 

   AdjustTokenPrivileges(hToken, FALSE, &amp;tkp, 0, 
        (PTOKEN_PRIVILEGES)NULL, 0); 

   if (GetLastError() != ERROR_SUCCESS) 
      return FALSE; 

   // Shut down the system and force all applications to close. 

   if (!ExitWindowsEx(EWX_REBOOT, 0)) 
      return FALSE; 

   return TRUE;
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/462999</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/462999</guid><dc:creator><![CDATA[funkyman]]></dc:creator><pubDate>Thu, 19 Feb 2004 11:40:22 GMT</pubDate></item><item><title><![CDATA[Reply to neustart???? on Sun, 22 Feb 2004 15:45:11 GMT]]></title><description><![CDATA[<p>hat jemand ne idee warums nicht klappt</p>
]]></description><link>https://www.c-plusplus.net/forum/post/465319</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/465319</guid><dc:creator><![CDATA[funkyman]]></dc:creator><pubDate>Sun, 22 Feb 2004 15:45:11 GMT</pubDate></item><item><title><![CDATA[Reply to neustart???? on Mon, 23 Feb 2004 15:01:40 GMT]]></title><description><![CDATA[<p>ich habs hinbekommen</p>
<pre><code class="language-cpp">BOOL REBOOT()
{

   HANDLE hToken; 
   TOKEN_PRIVILEGES tkp; 
   char buf[100];

   if (!OpenProcessToken(GetCurrentProcess(), 
        TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &amp;hToken)) 
      return( FALSE ); 

   LookupPrivilegeValue(NULL, SE_SHUTDOWN_NAME, 
        &amp;tkp.Privileges[0].Luid); 

   tkp.PrivilegeCount = 1;  // one privilege to set    
   tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED; 

   AdjustTokenPrivileges(hToken, FALSE, &amp;tkp, 0, 
        (PTOKEN_PRIVILEGES)NULL, 0); 

   if (GetLastError() != ERROR_SUCCESS) 
      return FALSE; 

   SetProcessShutdownParameters(400,0);

   if (!ExitWindowsEx(EWX_REBOOT,EWX_FORCE)) 
   {
      return FALSE; 
      MessageBox(NULL,&quot;hat nicht gefunzt&quot;,0,0);
   }   

    return TRUE;
}
</code></pre>
<p>des isn neustart von xp</p>
]]></description><link>https://www.c-plusplus.net/forum/post/465993</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/465993</guid><dc:creator><![CDATA[funkyman]]></dc:creator><pubDate>Mon, 23 Feb 2004 15:01:40 GMT</pubDate></item><item><title><![CDATA[Reply to neustart???? on Mon, 23 Feb 2004 15:18:47 GMT]]></title><description><![CDATA[<p>Also hat das SetProcessShutdownParameters und / oder EWX_FORCE gefehlt.</p>
<p>btw: Zu dem MessageBox-Aufruf nach der return Anweisung dürfte er doch eigentlich gar nie kommen <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f644.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_rolling_eyes"
      title=":rolling_eyes:"
      alt="🙄"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/466016</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/466016</guid><dc:creator><![CDATA[flenders]]></dc:creator><pubDate>Mon, 23 Feb 2004 15:18:47 GMT</pubDate></item><item><title><![CDATA[Reply to neustart???? on Mon, 23 Feb 2004 15:28:39 GMT]]></title><description><![CDATA[<p>lol stimmt</p>
]]></description><link>https://www.c-plusplus.net/forum/post/466035</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/466035</guid><dc:creator><![CDATA[funkyman]]></dc:creator><pubDate>Mon, 23 Feb 2004 15:28:39 GMT</pubDate></item><item><title><![CDATA[Reply to neustart???? on Mon, 23 Feb 2004 17:25:31 GMT]]></title><description><![CDATA[<p>Super dass es klappt aber es geht eigentlich sehr viel einfacher. Auf meiner Webseite gibt's mal wieder 'nen Tipp.</p>
<p>Gruß,<br />
Chris</p>
]]></description><link>https://www.c-plusplus.net/forum/post/466154</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/466154</guid><dc:creator><![CDATA[ChrisK]]></dc:creator><pubDate>Mon, 23 Feb 2004 17:25:31 GMT</pubDate></item></channel></rss>