<?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[Pfad herausfinden]]></title><description><![CDATA[<p>Hi,</p>
<p>wie kann man herausfinden, wo die .exe-Datei liegt, die ausgeführt wurde?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/122758/pfad-herausfinden</link><generator>RSS for Node</generator><lastBuildDate>Sun, 26 Jul 2026 17:25:11 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/122758.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 09 Oct 2005 16:33:48 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Pfad herausfinden on Sun, 09 Oct 2005 16:33:48 GMT]]></title><description><![CDATA[<p>Hi,</p>
<p>wie kann man herausfinden, wo die .exe-Datei liegt, die ausgeführt wurde?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/888293</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/888293</guid><dc:creator><![CDATA[milo51]]></dc:creator><pubDate>Sun, 09 Oct 2005 16:33:48 GMT</pubDate></item><item><title><![CDATA[Reply to Pfad herausfinden on Sun, 09 Oct 2005 16:58:31 GMT]]></title><description><![CDATA[<p>So</p>
<pre><code class="language-cpp">char buf[256];
GetModuleFileName(NULL, buf, 255);
CString strPfad;
strPfad.Format(&quot;%s&quot;, buf);
int nTmp = strPfad.ReverseFind('\\');
strPfad.Delete(nTmp,strPfad.GetLength()-nTmp);
</code></pre>
<p>oder so</p>
<pre><code class="language-cpp">CString strPath = GetCommandLine();/* Pfad + Name der Exe holen*/
int pos = strPath.ReverseFind( '\\'); /* letztes '\' finden*/
strPath = strPath.Mid(1, pos-1); /* Name der Exe abtrennen, so dass nur noch der Pfad übrig bleibt*/
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/888304</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/888304</guid><dc:creator><![CDATA[Gap]]></dc:creator><pubDate>Sun, 09 Oct 2005 16:58:31 GMT</pubDate></item><item><title><![CDATA[Reply to Pfad herausfinden on Sun, 09 Oct 2005 17:02:53 GMT]]></title><description><![CDATA[<p>Oder kürzer</p>
<pre><code class="language-cpp">char htext[MAXPATH];
memset(htext,0,MAXPATH);
GetModuleFileName(NULL,htext,MAXPATH);
String AktVerz=ExtractFilePath(htext);
</code></pre>
<p>CString gehört meines Wissens zus MFC und nicht zur VCL</p>
]]></description><link>https://www.c-plusplus.net/forum/post/888306</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/888306</guid><dc:creator><![CDATA[Christian211]]></dc:creator><pubDate>Sun, 09 Oct 2005 17:02:53 GMT</pubDate></item><item><title><![CDATA[Reply to Pfad herausfinden on Sun, 09 Oct 2005 17:10:09 GMT]]></title><description><![CDATA[<p>Wozu WinAPI.</p>
<pre><code class="language-cpp">AnsiString path = ExtractFilePath(Application-&gt;ExeName);
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/888312</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/888312</guid><dc:creator><![CDATA[Braunstein]]></dc:creator><pubDate>Sun, 09 Oct 2005 17:10:09 GMT</pubDate></item><item><title><![CDATA[Reply to Pfad herausfinden on Sun, 09 Oct 2005 17:15:45 GMT]]></title><description><![CDATA[<p>Hey super, das klappt! Danke</p>
]]></description><link>https://www.c-plusplus.net/forum/post/888315</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/888315</guid><dc:creator><![CDATA[milo51]]></dc:creator><pubDate>Sun, 09 Oct 2005 17:15:45 GMT</pubDate></item></channel></rss>