<?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[Mit CDumpContext dumpen]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich habe eine MFC-APP aus der ich im Debug-Mode Fehlerausgaben in eine Textdatei dumpen möchte.</p>
<p>Dazu habe ich die Klasse CDumpContext entdeckt.<br />
Dumpen möchte ich in eine Datei.<br />
Hat jemand für mich ein Stück Beispielcode der das macht?</p>
<p>Danke</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/166160/mit-cdumpcontext-dumpen</link><generator>RSS for Node</generator><lastBuildDate>Sat, 02 May 2026 06:45:29 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/166160.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 26 Nov 2006 19:43:35 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Mit CDumpContext dumpen on Sun, 26 Nov 2006 19:43:35 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich habe eine MFC-APP aus der ich im Debug-Mode Fehlerausgaben in eine Textdatei dumpen möchte.</p>
<p>Dazu habe ich die Klasse CDumpContext entdeckt.<br />
Dumpen möchte ich in eine Datei.<br />
Hat jemand für mich ein Stück Beispielcode der das macht?</p>
<p>Danke</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1181884</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1181884</guid><dc:creator><![CDATA[Dumper]]></dc:creator><pubDate>Sun, 26 Nov 2006 19:43:35 GMT</pubDate></item><item><title><![CDATA[Reply to Mit CDumpContext dumpen on Sun, 26 Nov 2006 20:20:43 GMT]]></title><description><![CDATA[<p>Habe die Lösung glücklicherweise selbst gefunden:</p>
<pre><code class="language-cpp">#ifdef _DEBUG
CFile* pOutFile = new CFile();
pOutFile-&gt;Open(TEXT(&quot;DebugFile.log&quot;),  CFile::modeWrite | CFile::modeCreate );
afxDump.m_pFile = pOutFile; 
afxDump &lt;&lt; &quot;Hallo!&quot;;
pOutFile-&gt;Close();
delete pOutFile; 
#endif
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1181894</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1181894</guid><dc:creator><![CDATA[Dumper]]></dc:creator><pubDate>Sun, 26 Nov 2006 20:20:43 GMT</pubDate></item><item><title><![CDATA[Reply to Mit CDumpContext dumpen on Mon, 27 Nov 2006 21:11:05 GMT]]></title><description><![CDATA[<p>Hi,</p>
<p>das Du die Lösung selber herausgefunden hast, sehr gut <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f44d.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--thumbs_up"
      title=":+1:"
      alt="👍"
    /></p>
<p>Aber, warum erzeugst Du CFile mit new?</p>
<p>Das kannst Du doch prima auf den Stack anlegen.<br />
Wenn Dein open aus irgendwelchen Gründen nicht geht,<br />
oder sonst etwas nicht geht, bekommst Du eine Exception<br />
und hast ein Speicherleck, wenn Du die Exception irgendwo fängst (sonst ist eh schicht am start!).</p>
<p>Also einfach:</p>
<pre><code class="language-cpp">#ifdef _DEBUG
CFile outFile;
outFile.Open(TEXT(&quot;DebugFile.log&quot;),  CFile::modeWrite | CFile::modeCreate );
afxDump.m_pFile = &amp;outFile; 
afxDump &lt;&lt; &quot;Hallo!&quot;;
outFile.Close();
#endif
</code></pre>
<p>Gruß<br />
Frank</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1182727</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1182727</guid><dc:creator><![CDATA[EB]]></dc:creator><pubDate>Mon, 27 Nov 2006 21:11:05 GMT</pubDate></item><item><title><![CDATA[Reply to Mit CDumpContext dumpen on Mon, 27 Nov 2006 21:32:43 GMT]]></title><description><![CDATA[<blockquote>
<p>sonst ist eh schicht am start</p>
</blockquote>
<p>LoL<br />
Schicht im schacht heist das</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1182740</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1182740</guid><dc:creator><![CDATA[LowFly]]></dc:creator><pubDate>Mon, 27 Nov 2006 21:32:43 GMT</pubDate></item></channel></rss>