<?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[CreateDirectory - Rückgabe unbedingt prüfen? (war: CreateDirectory)]]></title><description><![CDATA[<p>Braucht es für die API CreateDirectory eigentlich eine if/else anweisung? Also muss man abfragen ob das verzeichnis bereits erstellt wurde wenn man es erstellen möchte? Grundsätzlich liefert die bool funktion einfach zero oder nonzero zurück, jedoch spielt es glaub keine rolle wenn man ein verzeichniss erstellt das bereits vorhanden ist, wird dann einfach nicht neu erstellt. Oder? Also kann man das ruhig ohne if/else anweisung machen?</p>
<p><strong>Edit:</strong><br />
Bitte aussagekrätige Überschriften wahlen. Danke!</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/124723/createdirectory-rückgabe-unbedingt-prüfen-war-createdirectory</link><generator>RSS for Node</generator><lastBuildDate>Tue, 07 Jul 2026 08:38:35 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/124723.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 30 Oct 2005 21:01:10 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to CreateDirectory - Rückgabe unbedingt prüfen? (war: CreateDirectory) on Mon, 31 Oct 2005 09:43:01 GMT]]></title><description><![CDATA[<p>Braucht es für die API CreateDirectory eigentlich eine if/else anweisung? Also muss man abfragen ob das verzeichnis bereits erstellt wurde wenn man es erstellen möchte? Grundsätzlich liefert die bool funktion einfach zero oder nonzero zurück, jedoch spielt es glaub keine rolle wenn man ein verzeichniss erstellt das bereits vorhanden ist, wird dann einfach nicht neu erstellt. Oder? Also kann man das ruhig ohne if/else anweisung machen?</p>
<p><strong>Edit:</strong><br />
Bitte aussagekrätige Überschriften wahlen. Danke!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/904132</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/904132</guid><dc:creator><![CDATA[HUUH]]></dc:creator><pubDate>Mon, 31 Oct 2005 09:43:01 GMT</pubDate></item><item><title><![CDATA[Reply to CreateDirectory - Rückgabe unbedingt prüfen? (war: CreateDirectory) on Sun, 30 Oct 2005 21:50:40 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>MSDN schrieb:</p>
<blockquote>
<p>If the function fails, the return value is zero. To get extended error information, call GetLastError.</p>
</blockquote>
<p>Probier doch einfach aus, was als Ergebnis bei einem vorhanden Verzeichnis als Rückgabe kommt.</p>
<p>Außerdem gehört das ins WinAPI-Forum.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/904181</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/904181</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Sun, 30 Oct 2005 21:50:40 GMT</pubDate></item><item><title><![CDATA[Reply to CreateDirectory - Rückgabe unbedingt prüfen? (war: CreateDirectory) on Mon, 31 Oct 2005 09:37:00 GMT]]></title><description><![CDATA[<p>Stimmt, habe mich im forum vertan, sorry <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="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/904328</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/904328</guid><dc:creator><![CDATA[HUUH]]></dc:creator><pubDate>Mon, 31 Oct 2005 09:37:00 GMT</pubDate></item><item><title><![CDATA[Reply to CreateDirectory - Rückgabe unbedingt prüfen? (war: CreateDirectory) on Mon, 31 Oct 2005 09:43:19 GMT]]></title><description><![CDATA[<p>Dieser Thread wurde von Moderator/in <a href="http://www.c-plusplus.net/forum/profile.php?mode=viewprofile&amp;u=437" rel="nofollow">Jansen</a> aus dem Forum <a href="http://www.c-plusplus.net/forum/viewforum.php?f=2" rel="nofollow">VCL/CLX (Borland C++ Builder)</a> in das Forum <a href="http://www.c-plusplus.net/forum/viewforum.php?f=4" rel="nofollow">WinAPI</a> verschoben.</p>
<p>Im Zweifelsfall bitte auch folgende Hinweise beachten:<br />
<a href="http://www.c-plusplus.net/forum/viewtopic.php?t=39405" rel="nofollow">C/C++ Forum :: FAQ - Sonstiges :: Wohin mit meiner Frage?</a></p>
<p><em>Dieses Posting wurde automatisch erzeugt.</em></p>
]]></description><link>https://www.c-plusplus.net/forum/post/904333</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/904333</guid><dc:creator><![CDATA[C++ Forumbot]]></dc:creator><pubDate>Mon, 31 Oct 2005 09:43:19 GMT</pubDate></item><item><title><![CDATA[Reply to CreateDirectory - Rückgabe unbedingt prüfen? (war: CreateDirectory) on Mon, 31 Oct 2005 17:22:38 GMT]]></title><description><![CDATA[<p>akari schrieb:</p>
<blockquote>
<p>MSDN schrieb:</p>
<blockquote>
<p>If the function fails, the return value is zero. To get extended error information, call GetLastError.</p>
</blockquote>
<p>Probier doch einfach aus, was als Ergebnis bei einem vorhanden Verzeichnis als Rückgabe kommt.</p>
</blockquote>
<p>Man braucht nur weiter zu lesen:</p>
<p>MSDN schrieb:</p>
<blockquote>
<p>Possible errors include the following: ERROR_ALREADY_EXISTS</p>
</blockquote>
<p><a href="http://msdn.microsoft.com/library/en-us/fileio/fs/createdirectory.asp" rel="nofollow">http://msdn.microsoft.com/library/en-us/fileio/fs/createdirectory.asp</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/904817</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/904817</guid><dc:creator><![CDATA[flenders]]></dc:creator><pubDate>Mon, 31 Oct 2005 17:22:38 GMT</pubDate></item><item><title><![CDATA[Reply to CreateDirectory - Rückgabe unbedingt prüfen? (war: CreateDirectory) on Mon, 31 Oct 2005 19:25:05 GMT]]></title><description><![CDATA[<p>also spielt es keine rolle oder? kann nichts passieren wird einfach nicht erstellt?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/904959</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/904959</guid><dc:creator><![CDATA[HUUH]]></dc:creator><pubDate>Mon, 31 Oct 2005 19:25:05 GMT</pubDate></item><item><title><![CDATA[Reply to CreateDirectory - Rückgabe unbedingt prüfen? (war: CreateDirectory) on Mon, 31 Oct 2005 19:57:53 GMT]]></title><description><![CDATA[<p>Wäre komisch, wenn was passieren würde (Löschen des Verzeichnis-Inhalts o.ä.)... <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f644.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_rolling_eyes"
      title=":rolling_eyes:"
      alt="🙄"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/905004</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/905004</guid><dc:creator><![CDATA[flenders]]></dc:creator><pubDate>Mon, 31 Oct 2005 19:57:53 GMT</pubDate></item><item><title><![CDATA[Reply to CreateDirectory - Rückgabe unbedingt prüfen? (war: CreateDirectory) on Mon, 31 Oct 2005 20:45:33 GMT]]></title><description><![CDATA[<p>Aber ausschliessen würdest du es nicht oder? <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/905096</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/905096</guid><dc:creator><![CDATA[HUUH]]></dc:creator><pubDate>Mon, 31 Oct 2005 20:45:33 GMT</pubDate></item><item><title><![CDATA[Reply to CreateDirectory - Rückgabe unbedingt prüfen? (war: CreateDirectory) on Mon, 31 Oct 2005 21:05:33 GMT]]></title><description><![CDATA[<p>Du kannst mir FindFirstFile testen ob ein Verzeichnis existiert.</p>
<p>Du sollest immer prüfen ob ein Verzeichnis erstellet werden konnte.</p>
<p>Evtl. hat der Benutzer nicht die Rechte ein Verzeichnis zu erstellen ...</p>
<p>Oder es existiert, der Benutzer hat aber keine Rechte darin rumzukritzeln ...</p>
<p>Beste Grüße<br />
RB</p>
]]></description><link>https://www.c-plusplus.net/forum/post/905158</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/905158</guid><dc:creator><![CDATA[RED-BARON]]></dc:creator><pubDate>Mon, 31 Oct 2005 21:05:33 GMT</pubDate></item><item><title><![CDATA[Reply to CreateDirectory - Rückgabe unbedingt prüfen? (war: CreateDirectory) on Mon, 31 Oct 2005 22:18:42 GMT]]></title><description><![CDATA[<p>Grundsätzlich geht es mir nur um datenverlust. Aber sollte eigentlich nichts passieren. Zumal ja wie in der MSDN beschrieben einfach das verzeichniss nicht erstellt werden kann und der rückgabe wert ERROR_ALREADY_EXISTS ist. Aber kann man dann auch 100% sicher sein? <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/905323</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/905323</guid><dc:creator><![CDATA[HUUH]]></dc:creator><pubDate>Mon, 31 Oct 2005 22:18:42 GMT</pubDate></item><item><title><![CDATA[Reply to CreateDirectory - Rückgabe unbedingt prüfen? (war: CreateDirectory) on Mon, 31 Oct 2005 23:19:14 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">BOOL result = CreateDirectory(...);

if(result == 0 &amp;&amp; GetLastError() != ERROR_ALREADY_EXISTS)
{
    // schwerer fehler
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/905351</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/905351</guid><dc:creator><![CDATA[cd]]></dc:creator><pubDate>Mon, 31 Oct 2005 23:19:14 GMT</pubDate></item></channel></rss>