<?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[macros ändern funktionsnamen]]></title><description><![CDATA[<p>hallo leute</p>
<p>gibt es irgendeine moeglichkeit um zu verhindern das macros funktionsnamen aendern ?<br />
man kennt das ja z.b. von der winapi.<br />
da gibts die funktion FUNKNTIONSNAME und je nach dem ob UNICODE definiert ist oder nicht, wird FUNKTIONSNAMEW oder FUNKTIONSNAMEA daraus. wenn man nun selber FUNKTIONSNAME verwendet wird der name unter umstaenden auch geaendert.<br />
ich denk mal nicht das es da ne moeglichkeit gibt, aber die hoffnung stirbt bekanntlich zuletzt.</p>
<p>Meep Meep</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/322099/macros-ändern-funktionsnamen</link><generator>RSS for Node</generator><lastBuildDate>Sat, 18 Jul 2026 10:09:35 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/322099.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 06 Dec 2013 15:14:52 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to macros ändern funktionsnamen on Fri, 06 Dec 2013 15:14:52 GMT]]></title><description><![CDATA[<p>hallo leute</p>
<p>gibt es irgendeine moeglichkeit um zu verhindern das macros funktionsnamen aendern ?<br />
man kennt das ja z.b. von der winapi.<br />
da gibts die funktion FUNKNTIONSNAME und je nach dem ob UNICODE definiert ist oder nicht, wird FUNKTIONSNAMEW oder FUNKTIONSNAMEA daraus. wenn man nun selber FUNKTIONSNAME verwendet wird der name unter umstaenden auch geaendert.<br />
ich denk mal nicht das es da ne moeglichkeit gibt, aber die hoffnung stirbt bekanntlich zuletzt.</p>
<p>Meep Meep</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2370232</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2370232</guid><dc:creator><![CDATA[Meep Meep]]></dc:creator><pubDate>Fri, 06 Dec 2013 15:14:52 GMT</pubDate></item><item><title><![CDATA[Reply to macros ändern funktionsnamen on Fri, 06 Dec 2013 15:17:06 GMT]]></title><description><![CDATA[<p>#undef</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2370233</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2370233</guid><dc:creator><![CDATA[asdfsdaf]]></dc:creator><pubDate>Fri, 06 Dec 2013 15:17:06 GMT</pubDate></item><item><title><![CDATA[Reply to macros ändern funktionsnamen on Fri, 06 Dec 2013 15:27:25 GMT]]></title><description><![CDATA[<p>Fang jetzt aber nicht an, vor alle deine Quelltexte</p>
<pre><code>#ifdef schlüsselwort
 #undef schlüsselwort
#endif

// ...

#ifdef von_dir_benutzter_bezeichner
 #undef von_dir_benutzter_bezeichner
#endif

// ...
</code></pre>
<p>zu schreiben. Wenn dir irgendeine Bibliothek Namenskonflikte mit Makros verursacht, dann:<br />
-Wenn es ein dokumentiertes und sinnvolles Schema der Makronamen gibt, dann vermeide diese.<br />
-Ansonsten überleg einen Wechsel auf eine andere Bibliothek, diese scheint nicht so gut zu sein.</p>
<p>Verteidige deinen Code nicht gegen irgendwelche eingebildeten Gefahren.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2370236</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2370236</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Fri, 06 Dec 2013 15:27:25 GMT</pubDate></item><item><title><![CDATA[Reply to macros ändern funktionsnamen on Fri, 06 Dec 2013 20:39:07 GMT]]></title><description><![CDATA[<p>Nur wenn's unbedingt nötig ist ...</p>
<pre><code>#include &lt;windows.h&gt;

//
// winapicpp.h
//

#ifdef WINAPI
#   ifdef _UNICODE
#       define WINAPI_NAME_(n) n##W
#   else
#       define WINAPI_NAME_(n) n##A
#   endif

    namespace { // local namespace

#   undef MessageBox

    inline int MessageBox(HWND h,LPCTSTR m,LPCTSTR c,UINT t)
    {
        return WINAPI_NAME_(MessageBox)(h,m,c,t);
    }

    } // local namespace
#endif // WINAPI

//
// demo.cpp
//

void MessageBox()
{
    MessageBox(0,&quot;Hello World!&quot;,&quot;demo.cpp&quot;,MB_OK);
}

int WINAPI WinMain( HINSTANCE hThisInstance,
                    HINSTANCE hPrevInstance,
                    LPSTR lpszArgument,
                    int nCmdShow)
{
    MessageBox();

    return 0;
}
</code></pre>
<p><strong>- osdt</strong></p>
]]></description><link>https://www.c-plusplus.net/forum/post/2370293</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2370293</guid><dc:creator><![CDATA[osdt]]></dc:creator><pubDate>Fri, 06 Dec 2013 20:39:07 GMT</pubDate></item></channel></rss>