<?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[CFileStatus für Ordner?]]></title><description><![CDATA[<p>Hi</p>
<p>Gibt es so etwas wie CFileStatus auch für Ordner?</p>
<p>Ich habe zwar die Möglichkeit den Status mit CFile::GetStatus zu lesen, aber beim Schreiben mit SetStatus gibts eine Fehlermeldung.</p>
<p>Vielen Dank für die Aufmerksamkeit</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/5698/cfilestatus-für-ordner</link><generator>RSS for Node</generator><lastBuildDate>Sun, 12 Apr 2026 08:12:38 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/5698.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 04 May 2003 16:44:00 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to CFileStatus für Ordner? on Sun, 04 May 2003 16:44:00 GMT]]></title><description><![CDATA[<p>Hi</p>
<p>Gibt es so etwas wie CFileStatus auch für Ordner?</p>
<p>Ich habe zwar die Möglichkeit den Status mit CFile::GetStatus zu lesen, aber beim Schreiben mit SetStatus gibts eine Fehlermeldung.</p>
<p>Vielen Dank für die Aufmerksamkeit</p>
]]></description><link>https://www.c-plusplus.net/forum/post/27715</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/27715</guid><dc:creator><![CDATA[Fragender]]></dc:creator><pubDate>Sun, 04 May 2003 16:44:00 GMT</pubDate></item><item><title><![CDATA[Reply to CFileStatus für Ordner? on Tue, 06 May 2003 12:43:00 GMT]]></title><description><![CDATA[<p>Also gehe ich mal davon aus, dass es nicht geht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/27716</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/27716</guid><dc:creator><![CDATA[Fragender]]></dc:creator><pubDate>Tue, 06 May 2003 12:43:00 GMT</pubDate></item><item><title><![CDATA[Reply to CFileStatus für Ordner? on Tue, 06 May 2003 13:30:00 GMT]]></title><description><![CDATA[<p>Was für'ne Fehlermeldung kommt denn?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/27717</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/27717</guid><dc:creator><![CDATA[Shaggy]]></dc:creator><pubDate>Tue, 06 May 2003 13:30:00 GMT</pubDate></item><item><title><![CDATA[Reply to CFileStatus für Ordner? on Tue, 06 May 2003 16:28:00 GMT]]></title><description><![CDATA[<p>Es kommt die Fehlermeldung:</p>
<p>&quot;Zugriff auf eine unbenannte Datei wurde verwehrt.&quot;</p>
<p>wenn ich CFileException nicht benutze.</p>
<p>Wenn ich SetStatus in einen TRY-CATCH-Block packe:</p>
<p>m_cause = 5<br />
m_lOsError = 5</p>
<p>Die Fehlermeldung kommt auch, wenn ich den Status ohne Veränderung speicher.</p>
<pre><code class="language-cpp">CFileStatus Status;
CString Dateiname;

CFile::GetStatus(Dateiname, Status);    // Dateiname = Datei -&gt; geht
                    // Dateiname = Ordner -&gt; geht

CFile::SetStatus(Dateiname, Status);    // Dateiname = Datei -&gt; geht
                    // Dateiname = Ordner -&gt; FEHLER
</code></pre>
<p>Ich arbeite übrigens mit Windows XP, falls das wichtig ist.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/27718</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/27718</guid><dc:creator><![CDATA[Fragender]]></dc:creator><pubDate>Tue, 06 May 2003 16:28:00 GMT</pubDate></item><item><title><![CDATA[Reply to CFileStatus für Ordner? on Wed, 07 May 2003 06:37:00 GMT]]></title><description><![CDATA[<p>Ganz einfach, weil ein normales CFile-Objekt, wie der Name schon sagt, nur Dateien (Files) öffnen kann.<br />
Um Handles auf Verzeichnisse zu bekommen, muss man 'FILE_FLAG_BACKUP_SEMANTICS' benutzen. Probier doch einfach mal, statt der Funktion 'Open' die Funktion CreateFile aus der API zu benutzen und dann das Handle innerhalb CFile zu setzen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/27719</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/27719</guid><dc:creator><![CDATA[RenéG]]></dc:creator><pubDate>Wed, 07 May 2003 06:37:00 GMT</pubDate></item><item><title><![CDATA[Reply to CFileStatus für Ordner? on Wed, 07 May 2003 13:55:00 GMT]]></title><description><![CDATA[<p>Danke erstmal für den Tipp.</p>
<p>Ich habe mich nur gewundert, warum GetStatus auch den Status von Verzeichnissen zurückgibt, SetStatus aber nicht funktioniert.</p>
<p>Mit CFile bekomm ich es nicht hin, aber über 'FILE_FLAG_BACKUP_SEMANTICS' und 'CreateFile' bin ich auf 'SetFileAttributes' gestoßen.</p>
<p>Wieder File, aber hier kann man auch Verzeichnisse angeben.<br />
Nehm ich halt das.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/27720</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/27720</guid><dc:creator><![CDATA[Fragender]]></dc:creator><pubDate>Wed, 07 May 2003 13:55:00 GMT</pubDate></item></channel></rss>