<?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 Dienste(z.B. Netzwerk Dienst)]]></title><description><![CDATA[<p>Tach!</p>
<p>Wie kann man einen Dienst unter Windows XP Starten bzw. Beenden??</p>
<p>Danke im Voraus!</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/151917/windows-dienste-z-b-netzwerk-dienst</link><generator>RSS for Node</generator><lastBuildDate>Wed, 22 Jul 2026 12:56:40 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/151917.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 30 Jun 2006 17:38:19 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Windows Dienste(z.B. Netzwerk Dienst) on Fri, 30 Jun 2006 17:38:19 GMT]]></title><description><![CDATA[<p>Tach!</p>
<p>Wie kann man einen Dienst unter Windows XP Starten bzw. Beenden??</p>
<p>Danke im Voraus!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1089220</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1089220</guid><dc:creator><![CDATA[Der Neue]]></dc:creator><pubDate>Fri, 30 Jun 2006 17:38:19 GMT</pubDate></item><item><title><![CDATA[Reply to Windows Dienste(z.B. Netzwerk Dienst) on Fri, 30 Jun 2006 18:54:43 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=437" rel="nofollow">Jansen</a> aus dem Forum <a href="http://www.c-plusplus.net/forum/viewforum.php?f=2" rel="nofollow">VCL/CLX (Borland C++ Builder)</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/1089258</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1089258</guid><dc:creator><![CDATA[C++ Forumbot]]></dc:creator><pubDate>Fri, 30 Jun 2006 18:54:43 GMT</pubDate></item><item><title><![CDATA[Reply to Windows Dienste(z.B. Netzwerk Dienst) on Fri, 30 Jun 2006 21:50:06 GMT]]></title><description><![CDATA[<p>Google ist dein Freund:</p>
<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://windowssdk.msdn.microsoft.com/en-us/library/ms686315.aspx" rel="nofollow">Starting a Service</a></p>
<p>Greetz, Swordfish</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1089328</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1089328</guid><dc:creator><![CDATA[Swordfish]]></dc:creator><pubDate>Fri, 30 Jun 2006 21:50:06 GMT</pubDate></item><item><title><![CDATA[Reply to Windows Dienste(z.B. Netzwerk Dienst) on Sun, 02 Jul 2006 10:36:17 GMT]]></title><description><![CDATA[<p>Also folgendes!</p>
<p>Ich habe mir mal folgenden Code zusammen geschnitten, um den Nachrichtendienst zu starten:</p>
<pre><code>SC_HANDLE schSCManager;

// Open a handle to the SC Manager database.

schSCManager = OpenSCManager(
    NULL,                    // local machine
    NULL,                    // ServicesActive database
    SC_MANAGER_ALL_ACCESS);  // full access rights

if (NULL == schSCManager) 
    Label1-&gt;Caption = &quot;Fehler!&quot; ;

    SC_HANDLE schService;
    SERVICE_STATUS_PROCESS ssStatus;
    DWORD dwOldCheckPoint; 
    DWORD dwStartTickCount;
    DWORD dwWaitTime;
    DWORD dwBytesNeeded;

    schService = OpenService(
        schSCManager,          // SCM database
        &quot;Nachrichtendienst&quot;,          // service name
        SERVICE_ALL_ACCESS);

     StartService(
            schService,  // handle to service
            0,           // number of arguments
            NULL);
</code></pre>
<p>Nur leider startet er nicht!</p>
<p>Könnt ihr mir helfen????</p>
<p>THx</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1090002</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1090002</guid><dc:creator><![CDATA[Der Neue]]></dc:creator><pubDate>Sun, 02 Jul 2006 10:36:17 GMT</pubDate></item><item><title><![CDATA[Reply to Windows Dienste(z.B. Netzwerk Dienst) on Sun, 02 Jul 2006 12:24:15 GMT]]></title><description><![CDATA[<p>*lol* das Ding heißt nicht &quot;Nachrichtendienst&quot; sondern &quot;Messanger&quot;:</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;string&gt;

#include &lt;windows.h&gt;

using namespace std;

string get_errmsg( unsigned long error );

int main( )
{
    SC_HANDLE sc;

    if( !( sc = OpenSCManager( 0, SERVICES_ACTIVE_DATABASE, SC_MANAGER_ENUMERATE_SERVICE | GENERIC_READ ) ) ) {

        cout &lt;&lt; &quot;OpenSCManager() failed:&quot; &lt;&lt; endl;
        cout &lt;&lt; get_errmsg( GetLastError( ) ) &lt;&lt; endl;
        return EXIT_FAILURE;
    }

    SC_HANDLE messenger;

    if( !( messenger = OpenService( sc, &quot;Messenger&quot;, SERVICE_START ) ) ) {

        CloseServiceHandle( sc );
        cout &lt;&lt; &quot;OpenService() failed:&quot; &lt;&lt; endl;
        cout &lt;&lt; get_errmsg( GetLastError( ) ) &lt;&lt; endl;
        return EXIT_FAILURE;
    }

    if( !StartService( messenger, 0, 0 ) ) {

        CloseServiceHandle( messenger );
        CloseServiceHandle( sc );
        cout &lt;&lt; &quot;OpenService() failed:&quot; &lt;&lt; endl;
        cout &lt;&lt; get_errmsg( GetLastError( ) ) &lt;&lt; endl;
        return EXIT_FAILURE;
    }

    cout &lt;&lt; &quot;Service \&quot;Messenger\&quot; has been started!&quot; &lt;&lt; endl;

    CloseServiceHandle( sc );
    return EXIT_SUCCESS;
}

string get_errmsg( unsigned long error )
{
    void *buffer;
    FormatMessage(	FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
        0,
        error,
        MAKELANGID( LANG_NEUTRAL, SUBLANG_DEFAULT ),
        reinterpret_cast&lt; char* &gt;( &amp;buffer ),
        0,
        0
    );

    string errmsg = string( reinterpret_cast&lt; char* &gt;( buffer ) );
    LocalFree( buffer );
    return errmsg;
}
</code></pre>
<p>Greetz, Swordfish</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1090066</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1090066</guid><dc:creator><![CDATA[Swordfish]]></dc:creator><pubDate>Sun, 02 Jul 2006 12:24:15 GMT</pubDate></item><item><title><![CDATA[Reply to Windows Dienste(z.B. Netzwerk Dienst) on Sun, 02 Jul 2006 16:01:59 GMT]]></title><description><![CDATA[<p>THx!!!!!!!!!!!</p>
<p>Jetzt is da noch ein kleines problem, das starten und beenden geht einwandfrei!!!!<br />
Aber wenn ich jetzt die Einstellungen des Dienstes auf 'Deaktiviert' und nicht wie üblich auf 'Manuell' habe, dann wird der Dienst nicht Aktiviert, wie stelle ich es nun an, ihn zu Aktivieren (Wenn er auf 'Manuell' Eingestellt ist, dann lässt er sich starten und beenden)?????</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1090218</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1090218</guid><dc:creator><![CDATA[Der Neue]]></dc:creator><pubDate>Sun, 02 Jul 2006 16:01:59 GMT</pubDate></item><item><title><![CDATA[Reply to Windows Dienste(z.B. Netzwerk Dienst) on Sun, 02 Jul 2006 16:26:59 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://windowssdk.msdn.microsoft.com/en-us/library/ms681987.aspx" rel="nofollow">ChangeServiceConfig()</a></p>
<p>Greetz, Swordfish</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1090235</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1090235</guid><dc:creator><![CDATA[Swordfish]]></dc:creator><pubDate>Sun, 02 Jul 2006 16:26:59 GMT</pubDate></item><item><title><![CDATA[Reply to Windows Dienste(z.B. Netzwerk Dienst) on Sun, 02 Jul 2006 17:01:06 GMT]]></title><description><![CDATA[<p>Hmmm:</p>
<pre><code>SC_HANDLE sc;
SC_HANDLE messenger;

sc = OpenSCManager(0, SERVICES_ACTIVE_DATABASE, SC_MANAGER_ENUMERATE_SERVICE | GENERIC_READ);
messenger = OpenService(sc, &quot;Messenger&quot;, SERVICE_START);

ChangeServiceConfig(
  messenger,
  SERVICE_FILE_SYSTEM_DRIVER,
  SERVICE_AUTO_START,
  SERVICE_ERROR_NORMAL,
  NULL,
  NULL,
  NULL,
  NULL,
  NULL,
  NULL,
  NULL
);
</code></pre>
<p>Ich möchte jetzt, dass der 'Nachrichtendiesnt' Automatisch geöffnet wird!</p>
<p>Was mach ich falsch?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1090255</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1090255</guid><dc:creator><![CDATA[Der Neue]]></dc:creator><pubDate>Sun, 02 Jul 2006 17:01:06 GMT</pubDate></item><item><title><![CDATA[Reply to Windows Dienste(z.B. Netzwerk Dienst) on Sun, 02 Jul 2006 17:24:20 GMT]]></title><description><![CDATA[<p>Hab ich schon hinbekommen!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1090268</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1090268</guid><dc:creator><![CDATA[Der Neue]]></dc:creator><pubDate>Sun, 02 Jul 2006 17:24:20 GMT</pubDate></item></channel></rss>