<?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[DLL-Export]]></title><description><![CDATA[<p>Hallo zusammen,</p>
<p>ich habe ein Problem mit der Übergabe eines Vektors bei der Verwendung einer DLL.</p>
<p>Ich habe folgenden (DLL-)Code:</p>
<pre><code>//Inhalt von main
vector&lt;pair&lt;string,int&gt;&gt; myvec;
//Vektor füllen und probehalber ausgeben
extdll(myvec);
</code></pre>
<p>Dann habe ich folgende Funktion<br />
(header)</p>
<pre><code>extern &quot;C&quot; __declspec(dllexport)
void extdll(vector&lt;pair&lt;string,int&gt;&gt; &amp;);
</code></pre>
<p>(cpp)</p>
<pre><code>__declspec(dllexport)void extdll(vector&lt;pair&lt;string,int&gt;&gt; &amp;dllvec)
{
	//Ausgabe von bzw. Zugriff auf dllvec
}
</code></pre>
<p>Dabei habe ich nun das Problem, dass der Vektor dllvec immer &quot;leer&quot; ist. Warum ist das so?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/322436/dll-export</link><generator>RSS for Node</generator><lastBuildDate>Sat, 18 Jul 2026 03:52:37 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/322436.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 20 Dec 2013 08:47:54 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to DLL-Export on Fri, 20 Dec 2013 08:47:54 GMT]]></title><description><![CDATA[<p>Hallo zusammen,</p>
<p>ich habe ein Problem mit der Übergabe eines Vektors bei der Verwendung einer DLL.</p>
<p>Ich habe folgenden (DLL-)Code:</p>
<pre><code>//Inhalt von main
vector&lt;pair&lt;string,int&gt;&gt; myvec;
//Vektor füllen und probehalber ausgeben
extdll(myvec);
</code></pre>
<p>Dann habe ich folgende Funktion<br />
(header)</p>
<pre><code>extern &quot;C&quot; __declspec(dllexport)
void extdll(vector&lt;pair&lt;string,int&gt;&gt; &amp;);
</code></pre>
<p>(cpp)</p>
<pre><code>__declspec(dllexport)void extdll(vector&lt;pair&lt;string,int&gt;&gt; &amp;dllvec)
{
	//Ausgabe von bzw. Zugriff auf dllvec
}
</code></pre>
<p>Dabei habe ich nun das Problem, dass der Vektor dllvec immer &quot;leer&quot; ist. Warum ist das so?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2372935</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2372935</guid><dc:creator><![CDATA[6H05T]]></dc:creator><pubDate>Fri, 20 Dec 2013 08:47:54 GMT</pubDate></item><item><title><![CDATA[Reply to DLL-Export on Fri, 20 Dec 2013 08:54:53 GMT]]></title><description><![CDATA[<p>STL Container über DLL Grenzen herumreichen ist eine ganz schlechte Idee. Ein DLL Interface beschränkt sich besser auf C Sprachmittel...</p>
<p>Werden DLL und Anwendung mit dem selben Compiler kompiliert? Verwenden beide die selbe Runtime Library, wird die Runtime dynamisch oder statisch gelinked?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2372937</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2372937</guid><dc:creator><![CDATA[dot]]></dc:creator><pubDate>Fri, 20 Dec 2013 08:54:53 GMT</pubDate></item><item><title><![CDATA[Reply to DLL-Export on Fri, 20 Dec 2013 09:05:57 GMT]]></title><description><![CDATA[<p>dot schrieb:</p>
<blockquote>
<p>STL Container über DLL Grenzen herumreichen ist eine ganz schlechte Idee. Ein DLL Interface beschränkt sich besser auf C Sprachmittel...</p>
</blockquote>
<p>OK, danke für die Info. Die Erfahrung mache ich gerade. Int- oder double-arrays sind z.B. kein Problem.</p>
<p>dot schrieb:</p>
<blockquote>
<p>Werden DLL und Anwendung mit dem selben Compiler kompiliert?</p>
</blockquote>
<p>Ja.</p>
<p>dot schrieb:</p>
<blockquote>
<p>Verwenden beide die selbe Runtime Library, wird die Runtime dynamisch oder statisch gelinked?</p>
</blockquote>
<p>Beide verwenden die gleiche Runtime Library dynamisch.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2372940</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2372940</guid><dc:creator><![CDATA[6H05T]]></dc:creator><pubDate>Fri, 20 Dec 2013 09:05:57 GMT</pubDate></item><item><title><![CDATA[Reply to DLL-Export on Fri, 20 Dec 2013 09:37:43 GMT]]></title><description><![CDATA[<p>dot schrieb:</p>
<blockquote>
<p>STL Container über DLL Grenzen herumreichen ist eine ganz schlechte</p>
</blockquote>
<p>Wenn die DLL nur als Binary vorliget, ja. Wenn man aber den Sourcecode hat ist das kein Problem und auch besser als C-Sprachmittel.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2372951</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2372951</guid><dc:creator><![CDATA[manni66]]></dc:creator><pubDate>Fri, 20 Dec 2013 09:37:43 GMT</pubDate></item><item><title><![CDATA[Reply to DLL-Export on Fri, 20 Dec 2013 12:16:13 GMT]]></title><description><![CDATA[<p>manni66 schrieb:</p>
<blockquote>
<p>dot schrieb:</p>
<blockquote>
<p>STL Container über DLL Grenzen herumreichen ist eine ganz schlechte</p>
</blockquote>
<p>Wenn die DLL nur als Binary vorliget, ja. Wenn man aber den Sourcecode hat ist das kein Problem und auch besser als C-Sprachmittel.</p>
</blockquote>
<p>Der Sourcecode liegt vor, dennoch funktionieren die STL-Übergaben nicht.<br />
Ich habe jetzt den Inhalt des Vektors in arrays &quot;verpackt&quot; und es klappt.<br />
Vielen Dank für die Hilfen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2372983</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2372983</guid><dc:creator><![CDATA[6H05T]]></dc:creator><pubDate>Fri, 20 Dec 2013 12:16:13 GMT</pubDate></item><item><title><![CDATA[Reply to DLL-Export on Fri, 20 Dec 2013 12:35:03 GMT]]></title><description><![CDATA[<p><a href="http://www.abstraction.net/content/articles/stl%20and%20dlls.htm" rel="nofollow">http://www.abstraction.net/content/articles/stl and dlls.htm</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/2372991</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2372991</guid><dc:creator><![CDATA[6H05T]]></dc:creator><pubDate>Fri, 20 Dec 2013 12:35:03 GMT</pubDate></item></channel></rss>