<?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 und Programm abbruch]]></title><description><![CDATA[<p>Hallo.</p>
<p>Ich habe eine Komponente welche eine xyz.dll nutzt.<br />
Wenn die dll nicht vorhanden ist, dann stürzt das Prgramm ab,<br />
bzw es meldet einen &quot;Programmfehler&quot; und sagt das es ins Ereignisprotokoll schreibt.</p>
<p>Um das abzufangen habe ich</p>
<pre><code class="language-cpp">WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
{
	try
	{

HINSTANCE instance = LoadLibrary(&quot;xyz.dll&quot;);
if (instance==NULL)
{
    ShowMessage(&quot;xyz.dll missing&quot;);
    return 0;
}
</code></pre>
<p>Das funktioniert aber nicht. Der Abbruch kommt zuerst.<br />
Wenn ich die DLL in xyz.dll umbenenne funktioniert alles.<br />
Mach ich was falsch?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/119512/dll-und-programm-abbruch</link><generator>RSS for Node</generator><lastBuildDate>Sat, 25 Jul 2026 03:24:49 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/119512.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 01 Sep 2005 16:29:30 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to dll und Programm abbruch on Thu, 01 Sep 2005 16:29:30 GMT]]></title><description><![CDATA[<p>Hallo.</p>
<p>Ich habe eine Komponente welche eine xyz.dll nutzt.<br />
Wenn die dll nicht vorhanden ist, dann stürzt das Prgramm ab,<br />
bzw es meldet einen &quot;Programmfehler&quot; und sagt das es ins Ereignisprotokoll schreibt.</p>
<p>Um das abzufangen habe ich</p>
<pre><code class="language-cpp">WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
{
	try
	{

HINSTANCE instance = LoadLibrary(&quot;xyz.dll&quot;);
if (instance==NULL)
{
    ShowMessage(&quot;xyz.dll missing&quot;);
    return 0;
}
</code></pre>
<p>Das funktioniert aber nicht. Der Abbruch kommt zuerst.<br />
Wenn ich die DLL in xyz.dll umbenenne funktioniert alles.<br />
Mach ich was falsch?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/862991</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/862991</guid><dc:creator><![CDATA[dlls]]></dc:creator><pubDate>Thu, 01 Sep 2005 16:29:30 GMT</pubDate></item><item><title><![CDATA[Reply to dll und Programm abbruch on Thu, 01 Sep 2005 18:50:50 GMT]]></title><description><![CDATA[<p>Ich mach das so (ähnlich)</p>
<pre><code class="language-cpp">HINSTANCE hModule;
  hModule=LoadLibrary(&quot;DPSDLL.DLL&quot;);
  if (hModule!=NULL)
  { FP=(TDPSExecute*)GetProcAddress(hModule,&quot;DPSExecute&quot;);
    if FP!=NULL)
    {
      FP();
    }
    FreeLibrary(hModule);
  }
</code></pre>
<p>PS:DPSExecute ist die exportierte Funktion.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/863114</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/863114</guid><dc:creator><![CDATA[DerAltenburger]]></dc:creator><pubDate>Thu, 01 Sep 2005 18:50:50 GMT</pubDate></item></channel></rss>