<?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[Eine DLL für VBA schreiben.]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich möchte mit dem C++Builder 6 Prof. eine DLL für VBA (VisualBasic for Applications) schreiben.<br />
Mein Problem ist, daß VBA immer sagt, &quot;DLL-Einsprungspunkt ShowMe in ...List.DLL nicht gefunden&quot;.</p>
<p>in der DLL habe ich ShowMe so definiert:</p>
<p>&quot;Hpp&quot;</p>
<pre><code>void _stdcall ShowMe();
</code></pre>
<p>Wie mache ich diese Funktion für VBA sichtbar?</p>
<p>Gruß Mario</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/163709/eine-dll-für-vba-schreiben</link><generator>RSS for Node</generator><lastBuildDate>Wed, 12 Aug 2026 06:38:28 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/163709.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 01 Nov 2006 09:30:51 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Eine DLL für VBA schreiben. on Wed, 01 Nov 2006 09:30:51 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich möchte mit dem C++Builder 6 Prof. eine DLL für VBA (VisualBasic for Applications) schreiben.<br />
Mein Problem ist, daß VBA immer sagt, &quot;DLL-Einsprungspunkt ShowMe in ...List.DLL nicht gefunden&quot;.</p>
<p>in der DLL habe ich ShowMe so definiert:</p>
<p>&quot;Hpp&quot;</p>
<pre><code>void _stdcall ShowMe();
</code></pre>
<p>Wie mache ich diese Funktion für VBA sichtbar?</p>
<p>Gruß Mario</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1165991</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1165991</guid><dc:creator><![CDATA[Mario Rosenbohm]]></dc:creator><pubDate>Wed, 01 Nov 2006 09:30:51 GMT</pubDate></item><item><title><![CDATA[Reply to Eine DLL für VBA schreiben. on Thu, 02 Nov 2006 07:05:39 GMT]]></title><description><![CDATA[<p>in der Headerdatei:</p>
<pre><code class="language-cpp">#ifdef __DLL__
#define EXP_IMP __declspec(dllexport)
#endif // __DLL__

#ifndef __DLL__
#define EXP_IMP __declspec(dllimport)
#endif // NOT __DLL__

extern &quot;C&quot; EXP_IMP __stdcall int ShowMe(int i);
</code></pre>
<p>in der CppDatei:</p>
<pre><code class="language-cpp">// Testfunktion
int __stdcall ShowMe(int i) {
  MessageBox (Null,&quot;Test&quot;,&quot;TestCaption&quot;,MB_OK);

  return i + 2;
}
</code></pre>
<p>Deklaration in der VBA-Datei</p>
<pre><code>Public Declare Function ShowMe Lib &quot;Test.dll&quot; (ByVal i As Integer) As Integer
</code></pre>
<p>Aufruf im VBA-Code</p>
<pre><code>MsgBox Str$(ShowMe(2))
</code></pre>
<p>Gruß Mario</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1166667</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1166667</guid><dc:creator><![CDATA[Mario Rosenbohm]]></dc:creator><pubDate>Thu, 02 Nov 2006 07:05:39 GMT</pubDate></item><item><title><![CDATA[Reply to Eine DLL für VBA schreiben. on Thu, 02 Nov 2006 07:08:01 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>die Funktion ShowMe(2) gibt den richtigen Wert (4) zurück, jedoch die<br />
MessageBox wird nicht angezeigt.</p>
<p>Warum?</p>
<p>Gruß Mario</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1166668</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1166668</guid><dc:creator><![CDATA[Mario Rosenbohm]]></dc:creator><pubDate>Thu, 02 Nov 2006 07:08:01 GMT</pubDate></item><item><title><![CDATA[Reply to Eine DLL für VBA schreiben. on Fri, 03 Nov 2006 10:28:12 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>wiedermal ein Problem mit der DLL, naja eigendlich mit VBA &lt;-&gt; CPPB.</p>
<p>Ich muß auch etliches an Daten hin- und herschaufeln.<br />
Man kann doch nicht einfach eine Struct festlegen, oder etwa doch?</p>
<p>Gruß Mario</p>
<p>PS: Die MessageBox erscheint immer noch nicht, jedoch Dialoge und<br />
Formulare werden ordentlich angezeigt.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1167555</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1167555</guid><dc:creator><![CDATA[Mario Rosenbohm]]></dc:creator><pubDate>Fri, 03 Nov 2006 10:28:12 GMT</pubDate></item><item><title><![CDATA[Reply to Eine DLL für VBA schreiben. on Fri, 03 Nov 2006 18:50:01 GMT]]></title><description><![CDATA[<p>Bei mir sieht das eigentlich so aus:<br />
Die Header-Datei lasse ich in Ruhe.<br />
In der cpp steht:<br />
extern &quot;C&quot; __declspec(dllexport)int ShowMe(int i);<br />
In den Project Options steht bei Advanced Compiler unter Calling Convetions Standard Call.<br />
Das klappt gut mit VB und VBA, aus MessageBoxen werden angezeigt.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1167911</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1167911</guid><dc:creator><![CDATA[W. Posur]]></dc:creator><pubDate>Fri, 03 Nov 2006 18:50:01 GMT</pubDate></item></channel></rss>