<?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[An- bzw Abmeldung des Users erkennen]]></title><description><![CDATA[<p>Ich muß beim Anmelden des Users verschiedene Einstellungen durchführen. Wie kann ich erkennen, wann ein User sich an- bzw. abmeldet.<br />
Ich habe aus der FAQ das Beispiel &quot;Erkennen, wann Windows heruntergefahren wird&quot; mit der Nachricht WM_USERCHANGED ausprobiert, da tut sich aber nix. Bin ich auf dem Holzweg ? BCB5 , WINNT, 2K<br />
in der Header Datei des Dienstes:</p>
<pre><code class="language-cpp">public:         // Anwender-Deklarationen

        BEGIN_MESSAGE_MAP
           VCL_MESSAGE_HANDLER(WM_USERCHANGED, TMessage, OnUserChanged)
        END_MESSAGE_MAP(TAutoMount)

        void __fastcall OnUserChanged(TMessage &amp; Msg);
</code></pre>
<p>in der CPP Datei:</p>
<pre><code class="language-cpp">void __fastcall TAutoMount::OnUserChanged(TMessage &amp;Msg)
{
TObject::Dispatch(&amp;Msg);
SaveTextToFile(&quot;c:\\dienst.log&quot;,NULL,&quot;COMMAND erhalten&quot;,true);
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/63074/an-bzw-abmeldung-des-users-erkennen</link><generator>RSS for Node</generator><lastBuildDate>Tue, 07 Apr 2026 06:43:39 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/63074.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 29 Jan 2004 09:55:12 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to An- bzw Abmeldung des Users erkennen on Thu, 29 Jan 2004 09:55:12 GMT]]></title><description><![CDATA[<p>Ich muß beim Anmelden des Users verschiedene Einstellungen durchführen. Wie kann ich erkennen, wann ein User sich an- bzw. abmeldet.<br />
Ich habe aus der FAQ das Beispiel &quot;Erkennen, wann Windows heruntergefahren wird&quot; mit der Nachricht WM_USERCHANGED ausprobiert, da tut sich aber nix. Bin ich auf dem Holzweg ? BCB5 , WINNT, 2K<br />
in der Header Datei des Dienstes:</p>
<pre><code class="language-cpp">public:         // Anwender-Deklarationen

        BEGIN_MESSAGE_MAP
           VCL_MESSAGE_HANDLER(WM_USERCHANGED, TMessage, OnUserChanged)
        END_MESSAGE_MAP(TAutoMount)

        void __fastcall OnUserChanged(TMessage &amp; Msg);
</code></pre>
<p>in der CPP Datei:</p>
<pre><code class="language-cpp">void __fastcall TAutoMount::OnUserChanged(TMessage &amp;Msg)
{
TObject::Dispatch(&amp;Msg);
SaveTextToFile(&quot;c:\\dienst.log&quot;,NULL,&quot;COMMAND erhalten&quot;,true);
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/446888</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/446888</guid><dc:creator><![CDATA[spool]]></dc:creator><pubDate>Thu, 29 Jan 2004 09:55:12 GMT</pubDate></item><item><title><![CDATA[Reply to An- bzw Abmeldung des Users erkennen on Thu, 29 Jan 2004 12:26:15 GMT]]></title><description><![CDATA[<p>WM_...-Nachrichten werden IMO nur an Fenster verschickt. Hat dein Dienst ein Fenster, das die Nachricht entgegennehmen könnte?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/446973</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/446973</guid><dc:creator><![CDATA[Jansen]]></dc:creator><pubDate>Thu, 29 Jan 2004 12:26:15 GMT</pubDate></item><item><title><![CDATA[Reply to An- bzw Abmeldung des Users erkennen on Thu, 29 Jan 2004 13:46:55 GMT]]></title><description><![CDATA[<p>Neeh, hat er nicht.<br />
Ich habs aber auch mit einer &quot;normalen&quot; Anwendung probiert, bei der die Routinen in die Form1 eingebaut wurden. Da ist auch nix passiert.</p>
<p>Hab jetzt noch ein bischen recherchiert. Es ist möglich, das WM_USERCHANGED nur in WIN9x gesendet wird. Kennt jemand ne andere Möglichkeit/Nachricht ??</p>
]]></description><link>https://www.c-plusplus.net/forum/post/447036</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/447036</guid><dc:creator><![CDATA[spool]]></dc:creator><pubDate>Thu, 29 Jan 2004 13:46:55 GMT</pubDate></item><item><title><![CDATA[Reply to An- bzw Abmeldung des Users erkennen on Fri, 30 Jan 2004 12:13:57 GMT]]></title><description><![CDATA[<p>Keiner ne Idee ??<br />
Hat noch nie einer das Problem gehabt ??</p>
]]></description><link>https://www.c-plusplus.net/forum/post/447672</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/447672</guid><dc:creator><![CDATA[spool]]></dc:creator><pubDate>Fri, 30 Jan 2004 12:13:57 GMT</pubDate></item><item><title><![CDATA[Reply to An- bzw Abmeldung des Users erkennen on Fri, 30 Jan 2004 14:37:12 GMT]]></title><description><![CDATA[<p>Hmm, was mir jetzt spontan einfällt, wäre den Benutzernamen in einer Textdatei zu speichern und ihn immerzu zu kontrollieren, ob es noch der selbe ist.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/447814</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/447814</guid><dc:creator><![CDATA[Windoof]]></dc:creator><pubDate>Fri, 30 Jan 2004 14:37:12 GMT</pubDate></item><item><title><![CDATA[Reply to An- bzw Abmeldung des Users erkennen on Fri, 30 Jan 2004 19:35:49 GMT]]></title><description><![CDATA[<p>Wie wärs mit einer Userdatenbank (einer kleinen), drin steht der Username, Passwort, ob angemeldet oder nicht (bool-Feld) und seine persönlichen Einstellungen. Wenn sich ein User anmeldet, wird das Feld Online auf true gesetzt und seine Einstellungen werden geladen. Wenn er sich abmeldet, wird Online auf false gesetzt!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/447993</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/447993</guid><dc:creator><![CDATA[AlTheKingBundy]]></dc:creator><pubDate>Fri, 30 Jan 2004 19:35:49 GMT</pubDate></item><item><title><![CDATA[Reply to An- bzw Abmeldung des Users erkennen on Fri, 30 Jan 2004 23:03:21 GMT]]></title><description><![CDATA[<p>Verschiedene Beiträge in den <a href="http://groups.google.com/groups?hl=en&amp;lr=&amp;ie=UTF-8&amp;oe=UTF-8&amp;group=borland.public" rel="nofollow">Borland Newsgroups</a> behaupten, WM_USERCHANGED würde unter WindowsNT und aufwärts nicht unterstützt. In der MSDN findet sich dafür allerdings kein Beleg, und es scheint auch nicht wirklich sinnvoll.</p>
<p>Ich verschieb das mal nach WinAPI.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/448085</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/448085</guid><dc:creator><![CDATA[Jansen]]></dc:creator><pubDate>Fri, 30 Jan 2004 23:03:21 GMT</pubDate></item><item><title><![CDATA[Reply to An- bzw Abmeldung des Users erkennen on Fri, 30 Jan 2004 23:43:22 GMT]]></title><description><![CDATA[<p>windows schickt an alle toplevel Fenster ein WM_QUERYENDSESSION vor dem Runterfahren.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/448093</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/448093</guid><dc:creator><![CDATA[[[global:former_user]]]]></dc:creator><pubDate>Fri, 30 Jan 2004 23:43:22 GMT</pubDate></item><item><title><![CDATA[Reply to An- bzw Abmeldung des Users erkennen on Tue, 03 Feb 2004 11:39:36 GMT]]></title><description><![CDATA[<p>WM_QUERYENDSESSION ist bekannt. Nur möchte ich den Userwechsel erkennen und nicht das runterfahren. Trotzdem thx.<br />
@ AlTheKingBundy:<br />
wie soll ich denn feststellen, das der User sich angemeldet hat ? <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /><br />
Das ist doch das Problem.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/450409</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/450409</guid><dc:creator><![CDATA[spool]]></dc:creator><pubDate>Tue, 03 Feb 2004 11:39:36 GMT</pubDate></item><item><title><![CDATA[Reply to An- bzw Abmeldung des Users erkennen on Tue, 03 Feb 2004 11:59:30 GMT]]></title><description><![CDATA[<p>lParam<br />
If this parameter includes ENDSESSION_LOGOFF, the user is logging off. (Note that this parameter is a bit mask. To test for this value, use a bit-wise operation; do not test for equality.)<br />
If this parameter is zero, the system is shutting down.</p>
<p>RegisterServiceProcess wär noch n blick wert</p>
]]></description><link>https://www.c-plusplus.net/forum/post/450420</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/450420</guid><dc:creator><![CDATA[Sovok]]></dc:creator><pubDate>Tue, 03 Feb 2004 11:59:30 GMT</pubDate></item><item><title><![CDATA[Reply to An- bzw Abmeldung des Users erkennen on Wed, 04 Feb 2004 09:03:22 GMT]]></title><description><![CDATA[<p>Hast du dazu irgendwo ein kleines Beispiel, mit der Auswertung von ENDSESSION_LOGOFF komm ich auch nicht ganz klar (BCB5).</p>
<p>Gibts denn auch irgendeine Nachricht die verschickt wird, wenn sich der User anmeldet ?? Das wäre mir eigentlich viel wichtiger.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/451181</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/451181</guid><dc:creator><![CDATA[spool]]></dc:creator><pubDate>Wed, 04 Feb 2004 09:03:22 GMT</pubDate></item><item><title><![CDATA[Reply to An- bzw Abmeldung des Users erkennen on Wed, 04 Feb 2004 09:57:04 GMT]]></title><description><![CDATA[<p>ich nehm an<br />
if(lParam &amp; ENDSESSION_LOGOFF)<br />
//handle logoff</p>
<p>über login steht direkt nix drin<br />
nur das hier halt</p>
<p>Applications started by the system using the RunServices and RunServicesOnce keys will close when the user selects Close all programs and log on as a different user from the Shutdown dialog box. By calling the RegisterServiceProcess function, an application can prevent itself or any other application from being closed when the user logs off. Applications registered in this manner close only when the system is shut down.</p>
<p>The application should provide for different users logging on at different times during its execution. The application can distinguish between a user logging off and the system shutting down by examining the lParam parameter of the WM_QUERYENDSESSION and WM_ENDSESSION messages. If the user shuts down the system, lParam is NULL. If the user logs off, lParam is set to ENDSESSION_LOGOFF.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/451304</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/451304</guid><dc:creator><![CDATA[Sovok]]></dc:creator><pubDate>Wed, 04 Feb 2004 09:57:04 GMT</pubDate></item><item><title><![CDATA[Reply to An- bzw Abmeldung des Users erkennen on Wed, 04 Feb 2004 10:16:29 GMT]]></title><description><![CDATA[<p>- Hier stand Schwachfug -</p>
]]></description><link>https://www.c-plusplus.net/forum/post/451315</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/451315</guid><dc:creator><![CDATA[geeky]]></dc:creator><pubDate>Wed, 04 Feb 2004 10:16:29 GMT</pubDate></item></channel></rss>