<?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[Timer in einer Konsolenanwedung]]></title><description><![CDATA[<p>Guten Tag <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="🙂"
    /><br />
Ich habe hier ein problem und zwar habe ich ein problem mit dem code hier</p>
<pre><code>if (packet[2] == 0x32)
{	DWORD id;
	memcpy((void*)&amp;id,(void*)((DWORD)packet+3),4);
	if (test == 1)
    {	int i;
        for (i=0;i&lt;6;i++)
	{	Send(0x01,&quot;bd&quot;,1,id); } } }
</code></pre>
<p>Es funktioniert alles einwandfrei nur habe ich das problem das mein programm sich aufhängt weil es andauernd den packet 0x32 reinbekommt...<br />
Deswegen wollte ich das alles mit einem timer lösen.<br />
Ich bitte euch im hilfe weil ich kriege es nicht hin hier einen timer reinzubekommen.<br />
Wie schon im threadnamen gesagt es handelt sich hierbei auch um eine konsolenanwedung<br />
Danke euch schonmal <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/topic/225200/timer-in-einer-konsolenanwedung</link><generator>RSS for Node</generator><lastBuildDate>Thu, 01 Oct 2026 12:14:39 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/225200.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 20 Oct 2008 18:14:48 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Timer in einer Konsolenanwedung on Mon, 20 Oct 2008 18:43:53 GMT]]></title><description><![CDATA[<p>Guten Tag <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="🙂"
    /><br />
Ich habe hier ein problem und zwar habe ich ein problem mit dem code hier</p>
<pre><code>if (packet[2] == 0x32)
{	DWORD id;
	memcpy((void*)&amp;id,(void*)((DWORD)packet+3),4);
	if (test == 1)
    {	int i;
        for (i=0;i&lt;6;i++)
	{	Send(0x01,&quot;bd&quot;,1,id); } } }
</code></pre>
<p>Es funktioniert alles einwandfrei nur habe ich das problem das mein programm sich aufhängt weil es andauernd den packet 0x32 reinbekommt...<br />
Deswegen wollte ich das alles mit einem timer lösen.<br />
Ich bitte euch im hilfe weil ich kriege es nicht hin hier einen timer reinzubekommen.<br />
Wie schon im threadnamen gesagt es handelt sich hierbei auch um eine konsolenanwedung<br />
Danke euch schonmal <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/1601892</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1601892</guid><dc:creator><![CDATA[memstr]]></dc:creator><pubDate>Mon, 20 Oct 2008 18:43:53 GMT</pubDate></item><item><title><![CDATA[Reply to Timer in einer Konsolenanwedung on Tue, 21 Oct 2008 06:35:48 GMT]]></title><description><![CDATA[<p>Unter Windows kannst du einen Timer mit SetTimer/KillTimer machen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1602005</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1602005</guid><dc:creator><![CDATA[_matze]]></dc:creator><pubDate>Tue, 21 Oct 2008 06:35:48 GMT</pubDate></item><item><title><![CDATA[Reply to Timer in einer Konsolenanwedung on Thu, 23 Oct 2008 09:58:54 GMT]]></title><description><![CDATA[<p>ja aber das funktioniert doch nur für fensteranwendungen wegen dem hWnd...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1603286</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1603286</guid><dc:creator><![CDATA[memstr]]></dc:creator><pubDate>Thu, 23 Oct 2008 09:58:54 GMT</pubDate></item><item><title><![CDATA[Reply to Timer in einer Konsolenanwedung on Thu, 23 Oct 2008 10:11:31 GMT]]></title><description><![CDATA[<p>Nein, du brauchst kein Fenster-Handle. Lies dir die Doku zu SetTimer durch:</p>
<p>hWnd<br />
[in] Handle to the window to be associated with the timer. This window must be owned by the calling thread. If this parameter is NULL, no window is associated with the timer and the nIDEvent parameter is ignored.</p>
<p>Du musst aber, glaube ich, trotzdem in deiner Anwendung Win-Nachrichten verarbeiten, bin mir da nicht ganz sicher...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1603288</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1603288</guid><dc:creator><![CDATA[_matze]]></dc:creator><pubDate>Thu, 23 Oct 2008 10:11:31 GMT</pubDate></item><item><title><![CDATA[Reply to Timer in einer Konsolenanwedung on Thu, 23 Oct 2008 11:08:52 GMT]]></title><description><![CDATA[<p>_matze schrieb:</p>
<blockquote>
<p>Du musst aber, glaube ich, trotzdem in deiner Anwendung Win-Nachrichten verarbeiten, bin mir da nicht ganz sicher...</p>
</blockquote>
<p>Jo, muss er.<br />
Ansonsten gibt's noch Timer die in einem eigenen Thread feuern, und APCs kann man glaub' ich auch irgendwie misbrauchen. Aber für APCs muss man dann den Thread wieder in einen &quot;alertable state&quot; bringen - kann man gleich nen Message-Loop machen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1603323</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1603323</guid><dc:creator><![CDATA[hustbaer]]></dc:creator><pubDate>Thu, 23 Oct 2008 11:08:52 GMT</pubDate></item></channel></rss>