<?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[Funktion, die aktuelle Instanz liefert]]></title><description><![CDATA[<p>Hi ich suche nach einer Funktion, die mir die Aktuelle Instanz meines Programmes liefert<br />
Ich möchte das hier umgehen</p>
<pre><code class="language-cpp">void foo(HINSTNACE hInstance)
{...

int WINAPI WinMain(HINSTANCE hInstance...
{
    foo(hInstance);...
</code></pre>
<p>ich möchte das lieber so schreiben</p>
<pre><code class="language-cpp">void foo(void)
{
HINSTNACE hInstance=//Funktion, die aktuelle Instanz liefert..
</code></pre>
<p>Geht das oder müsste ich das über globale Variablen machen, denn ich kann aus bestimmten Gründen, die ich hier nicht sagen will (versteht eh keiner, viel zu komplex), hInstance nicht als Parameter für foo übergaben.</p>
<p>Gibt's da was?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/198105/funktion-die-aktuelle-instanz-liefert</link><generator>RSS for Node</generator><lastBuildDate>Fri, 01 May 2026 12:03:00 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/198105.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 18 Nov 2007 14:53:26 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Funktion, die aktuelle Instanz liefert on Sun, 18 Nov 2007 14:53:26 GMT]]></title><description><![CDATA[<p>Hi ich suche nach einer Funktion, die mir die Aktuelle Instanz meines Programmes liefert<br />
Ich möchte das hier umgehen</p>
<pre><code class="language-cpp">void foo(HINSTNACE hInstance)
{...

int WINAPI WinMain(HINSTANCE hInstance...
{
    foo(hInstance);...
</code></pre>
<p>ich möchte das lieber so schreiben</p>
<pre><code class="language-cpp">void foo(void)
{
HINSTNACE hInstance=//Funktion, die aktuelle Instanz liefert..
</code></pre>
<p>Geht das oder müsste ich das über globale Variablen machen, denn ich kann aus bestimmten Gründen, die ich hier nicht sagen will (versteht eh keiner, viel zu komplex), hInstance nicht als Parameter für foo übergaben.</p>
<p>Gibt's da was?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1405339</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1405339</guid><dc:creator><![CDATA[OTTO]]></dc:creator><pubDate>Sun, 18 Nov 2007 14:53:26 GMT</pubDate></item><item><title><![CDATA[Reply to Funktion, die aktuelle Instanz liefert on Sun, 18 Nov 2007 15:10:05 GMT]]></title><description><![CDATA[<p>Um die Kompatibilität, des Codes aufrecht zu erhakten wenn der Code in DLLs eingebaut wird, verwende ich grundsätzlich eine globale Variable.</p>
<p>Ansonsten steht es Dir frei GetModuleHandle zu verwenden.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1405357</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1405357</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Sun, 18 Nov 2007 15:10:05 GMT</pubDate></item></channel></rss>