<?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[Bekomme warning nicht weg...]]></title><description><![CDATA[<p>Hi,</p>
<p>ich möchte eine Warning wegbekommen, doch die will nicht weg <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>
<pre><code class="language-cpp">bool CApplication::isRunning (void)
{
	HANDLE hMapping = CreateFileMapping( (HANDLE) 0xffffffff, // hier dieses (HANDLE)0xFFFFFFFF macht eine Warning
									NULL,
									PAGE_READONLY,
									0,
									32,
									this-&gt;m_name);

	return (hMapping &amp;&amp; GetLastError () == ERROR_ALREADY_EXISTS);
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/70466/bekomme-warning-nicht-weg</link><generator>RSS for Node</generator><lastBuildDate>Thu, 09 Apr 2026 08:28:32 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/70466.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 07 Apr 2004 21:57:30 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Bekomme warning nicht weg... on Wed, 07 Apr 2004 21:57:30 GMT]]></title><description><![CDATA[<p>Hi,</p>
<p>ich möchte eine Warning wegbekommen, doch die will nicht weg <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>
<pre><code class="language-cpp">bool CApplication::isRunning (void)
{
	HANDLE hMapping = CreateFileMapping( (HANDLE) 0xffffffff, // hier dieses (HANDLE)0xFFFFFFFF macht eine Warning
									NULL,
									PAGE_READONLY,
									0,
									32,
									this-&gt;m_name);

	return (hMapping &amp;&amp; GetLastError () == ERROR_ALREADY_EXISTS);
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/497248</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/497248</guid><dc:creator><![CDATA[nix da]]></dc:creator><pubDate>Wed, 07 Apr 2004 21:57:30 GMT</pubDate></item><item><title><![CDATA[Reply to Bekomme warning nicht weg... on Wed, 07 Apr 2004 22:40:44 GMT]]></title><description><![CDATA[<p>Was genau sagt denn der Compiler?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/497266</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/497266</guid><dc:creator><![CDATA[Aziz]]></dc:creator><pubDate>Wed, 07 Apr 2004 22:40:44 GMT</pubDate></item><item><title><![CDATA[Reply to Bekomme warning nicht weg... on Wed, 07 Apr 2004 23:05:37 GMT]]></title><description><![CDATA[<p>Es heisst nicht 0xFFFFFFFF, es heisst INVALID_HANDLE_VALUE:</p>
<pre><code class="language-cpp">bool CApplication::isRunning (void)
{
    HANDLE hMapping = CreateFileMapping(INVALID_HANDLE_VALUE, // hier dieses (HANDLE)0xFFFFFFFF macht eine Warning
                                    NULL,
                                    PAGE_READONLY,
                                    0,
                                    32,
                                    this-&gt;m_name);

    return (hMapping &amp;&amp; GetLastError () == ERROR_ALREADY_EXISTS);
}
</code></pre>
<p>Und wenn Du Dir das in &lt;winbase.h&gt; anschaust, siehst Du, daß nicht gleich nach HANDLE gecastet wird, sondern erstmal nach LONG_PTR. Aber wie gesagt: Man nehme INVALID_HANDLE_VALUE, um auf der sicheren Seite zu sein.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/497273</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/497273</guid><dc:creator><![CDATA[Huh]]></dc:creator><pubDate>Wed, 07 Apr 2004 23:05:37 GMT</pubDate></item></channel></rss>