<?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 GetModuleFileName(NULL,(char*) &amp;amp;fullpath,200) suchen, ob DAtei in Unterverzeichnis exsitiert]]></title><description><![CDATA[<p>Hallo!</p>
<p>Ich möchte eine Datei laden, wenn sie in einem Unterverzeichnis der Apllikation vorhanden ist.<br />
MFC VC++ 6:<br />
Mit</p>
<pre><code>GetModuleFileName(NULL,(char*) &amp;fullpath,200);
</code></pre>
<p>bekomme ich den Anwendungspath in einem char array fullpath</p>
<p>Jetzt möchte ich noch gezielt darunter im Unterverzeichnis &quot;xy&quot; die Datei &quot;standard.txt&quot; suchen und öffnen.</p>
<p>mit</p>
<pre><code>if(((stream = fopen( FileName, &quot;rb&quot; ))!= NULL) )
</code></pre>
<p>sehe ich, ob eine Datei da ist. wobei FileName ein *char ist.</p>
<p>Aber ich bekomme es partout nicht hin, den Vollständigen Namen der Datei in einem char zu bekommen.Path + Namen</p>
<p>Mit strcat oder strcpy müsste man so etwas schaffen, kann mir jemand ein konkretes Beiuspiel geben, wo aus fullpath und &quot;\xy\standard.txt&quot; ein kompletter Dateiname gebildet wird?<br />
Danke im Voraus für die Hilfe<br />
frenchcancan</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/205111/mit-getmodulefilename-null-char-amp-fullpath-200-suchen-ob-datei-in-unterverzeichnis-exsitiert</link><generator>RSS for Node</generator><lastBuildDate>Sat, 04 Apr 2026 04:47:53 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/205111.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 10 Feb 2008 16:50:51 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to mit GetModuleFileName(NULL,(char*) &amp;amp;fullpath,200) suchen, ob DAtei in Unterverzeichnis exsitiert on Sun, 10 Feb 2008 16:50:51 GMT]]></title><description><![CDATA[<p>Hallo!</p>
<p>Ich möchte eine Datei laden, wenn sie in einem Unterverzeichnis der Apllikation vorhanden ist.<br />
MFC VC++ 6:<br />
Mit</p>
<pre><code>GetModuleFileName(NULL,(char*) &amp;fullpath,200);
</code></pre>
<p>bekomme ich den Anwendungspath in einem char array fullpath</p>
<p>Jetzt möchte ich noch gezielt darunter im Unterverzeichnis &quot;xy&quot; die Datei &quot;standard.txt&quot; suchen und öffnen.</p>
<p>mit</p>
<pre><code>if(((stream = fopen( FileName, &quot;rb&quot; ))!= NULL) )
</code></pre>
<p>sehe ich, ob eine Datei da ist. wobei FileName ein *char ist.</p>
<p>Aber ich bekomme es partout nicht hin, den Vollständigen Namen der Datei in einem char zu bekommen.Path + Namen</p>
<p>Mit strcat oder strcpy müsste man so etwas schaffen, kann mir jemand ein konkretes Beiuspiel geben, wo aus fullpath und &quot;\xy\standard.txt&quot; ein kompletter Dateiname gebildet wird?<br />
Danke im Voraus für die Hilfe<br />
frenchcancan</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1453163</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1453163</guid><dc:creator><![CDATA[[[global:former_user]]]]></dc:creator><pubDate>Sun, 10 Feb 2008 16:50:51 GMT</pubDate></item><item><title><![CDATA[Reply to mit GetModuleFileName(NULL,(char*) &amp;amp;fullpath,200) suchen, ob DAtei in Unterverzeichnis exsitiert on Mon, 11 Feb 2008 09:09:19 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">TCHAR szPath[_MAX_PATH];
GetModuleFileName(NULL,szPath,_MAX_PATH);
_tcscpy(PathFindFileName(szPath),_T(&quot;standard.txt&quot;));
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1453455</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1453455</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Mon, 11 Feb 2008 09:09:19 GMT</pubDate></item><item><title><![CDATA[Reply to mit GetModuleFileName(NULL,(char*) &amp;amp;fullpath,200) suchen, ob DAtei in Unterverzeichnis exsitiert on Mon, 11 Feb 2008 09:54:58 GMT]]></title><description><![CDATA[<p>Alternativ:</p>
<pre><code class="language-cpp">TCHAR szPath[_MAX_PATH]; 
GetModuleFileName(NULL, szPath, _MAX_PATH); 
PathRemoveFileSpec(szPath); PathAppend(szPath, _T(&quot;xy\standard.txt&quot;));
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1453472</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1453472</guid><dc:creator><![CDATA[sri]]></dc:creator><pubDate>Mon, 11 Feb 2008 09:54:58 GMT</pubDate></item><item><title><![CDATA[Reply to mit GetModuleFileName(NULL,(char*) &amp;amp;fullpath,200) suchen, ob DAtei in Unterverzeichnis exsitiert on Mon, 11 Feb 2008 10:08:03 GMT]]></title><description><![CDATA[<p>Hallo!<br />
Vielen Dank an beide!<br />
ich bekomme aber dann die Linkermeldung:<br />
Nichtaufgeloestes externes Symbol __imp__PathRemoveFileSpecA@4<br />
und LNK2001: Nichtaufgeloestes externes Symbol __imp__PathAppendA@8</p>
<p>Muss ich etwas miteinbinden?<br />
frenchcancan</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1453479</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1453479</guid><dc:creator><![CDATA[[[global:former_user]]]]></dc:creator><pubDate>Mon, 11 Feb 2008 10:08:03 GMT</pubDate></item><item><title><![CDATA[Reply to mit GetModuleFileName(NULL,(char*) &amp;amp;fullpath,200) suchen, ob DAtei in Unterverzeichnis exsitiert on Mon, 11 Feb 2008 10:09:21 GMT]]></title><description><![CDATA[<p>in den Code entweder:</p>
<pre><code class="language-cpp">#pragma comment(lib,&quot;shlwapi.lib&quot;)
</code></pre>
<p>Oder die shlwapi.lib in den Linker Optionen als weitere Library hinzufügen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1453480</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1453480</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Mon, 11 Feb 2008 10:09:21 GMT</pubDate></item><item><title><![CDATA[Reply to mit GetModuleFileName(NULL,(char*) &amp;amp;fullpath,200) suchen, ob DAtei in Unterverzeichnis exsitiert on Mon, 11 Feb 2008 14:16:44 GMT]]></title><description><![CDATA[<p><img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /> hat mir sehr geholfen<br />
Vielen Dank und Gruß<br />
frenchcancan</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1453670</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1453670</guid><dc:creator><![CDATA[[[global:former_user]]]]></dc:creator><pubDate>Mon, 11 Feb 2008 14:16:44 GMT</pubDate></item></channel></rss>