<?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[GetLogicalDriveStrings liefert falschen Partion&#x27;s Buchstaben?]]></title><description><![CDATA[<pre><code class="language-cpp">#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;windows.h&gt;

int main(int argc, char *argv[])
{
 TCHAR buf[256];
 ULARGE_INTEGER freespace;
 ULARGE_INTEGER space;

 GetLogicalDriveStrings(256,buf);

   printf (&quot;%c\n&quot;,buf);

         GetDiskFreeSpaceEx(buf,&amp;space,NULL,&amp;freespace);

    printf (&quot;%d\n&quot;,freespace.QuadPart/1024/1024/1024);

  system(&quot;PAUSE&quot;);	
  return 0;
}
</code></pre>
<p>Aber nach der Ausgabe von printf erhalte ich immer eine Windows Meldung:</p>
<blockquote>
<p>Projekt1.exe - Kein Datenträger<br />
Es befindet sich kein Datenträger im Laufwerk. Legen Sie einen Datenträger in Laufwerk A: ein.</p>
</blockquote>
<p>Laufwerk A: ist aber mein Disketten Laufwerk.<br />
-.-</p>
<p>Hoffe auf ne gescheite Lösung.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/213419/getlogicaldrivestrings-liefert-falschen-partion-s-buchstaben</link><generator>RSS for Node</generator><lastBuildDate>Sat, 18 Apr 2026 15:14:03 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/213419.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 17 May 2008 19:34:18 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to GetLogicalDriveStrings liefert falschen Partion&#x27;s Buchstaben? on Sat, 17 May 2008 19:34:18 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;windows.h&gt;

int main(int argc, char *argv[])
{
 TCHAR buf[256];
 ULARGE_INTEGER freespace;
 ULARGE_INTEGER space;

 GetLogicalDriveStrings(256,buf);

   printf (&quot;%c\n&quot;,buf);

         GetDiskFreeSpaceEx(buf,&amp;space,NULL,&amp;freespace);

    printf (&quot;%d\n&quot;,freespace.QuadPart/1024/1024/1024);

  system(&quot;PAUSE&quot;);	
  return 0;
}
</code></pre>
<p>Aber nach der Ausgabe von printf erhalte ich immer eine Windows Meldung:</p>
<blockquote>
<p>Projekt1.exe - Kein Datenträger<br />
Es befindet sich kein Datenträger im Laufwerk. Legen Sie einen Datenträger in Laufwerk A: ein.</p>
</blockquote>
<p>Laufwerk A: ist aber mein Disketten Laufwerk.<br />
-.-</p>
<p>Hoffe auf ne gescheite Lösung.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1511187</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1511187</guid><dc:creator><![CDATA[Dreamserver]]></dc:creator><pubDate>Sat, 17 May 2008 19:34:18 GMT</pubDate></item><item><title><![CDATA[Reply to GetLogicalDriveStrings liefert falschen Partion&#x27;s Buchstaben? on Sat, 17 May 2008 19:40:31 GMT]]></title><description><![CDATA[<p>Ich möchte mal die MSDN zitieren:</p>
<p>MSDN schrieb:</p>
<blockquote>
<p>lpBuffer<br />
A pointer to a buffer that receives a series of null-terminated strings, one<br />
for each valid drive in the system, plus with an additional null character.<br />
Each string is a device name.</p>
</blockquote>
<p>Und was sagt uns das?<br />
Es sagt uns, dass buf folgendermaßen aussieht: &quot;A:\0C:\0&quot;</p>
<p>Und nun willst du den freien speicherplatz auf A: lesen, da die funktion bei buf anfängt und bis zum ersten \0 liest.</p>
<p>Und da in A keine diskette eingelegt ist, kann man logischerweise nicht nach dem freien platz fragen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1511190</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1511190</guid><dc:creator><![CDATA[wurst --help]]></dc:creator><pubDate>Sat, 17 May 2008 19:40:31 GMT</pubDate></item><item><title><![CDATA[Reply to GetLogicalDriveStrings liefert falschen Partion&#x27;s Buchstaben? on Sat, 17 May 2008 19:51:53 GMT]]></title><description><![CDATA[<p>Wenn ich aber den Wert von buf ausgebe erhalte ich &quot;C&quot;.</p>
<blockquote>
<p>Und nun willst du den freien speicherplatz auf A: lesen, da die funktion bei buf anfängt und bis zum ersten \0 liest.</p>
</blockquote>
<p>Und wie muss ich das machen das die Funktion den Speiucherplatz von C: liest?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1511200</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1511200</guid><dc:creator><![CDATA[Dreamserver]]></dc:creator><pubDate>Sat, 17 May 2008 19:51:53 GMT</pubDate></item><item><title><![CDATA[Reply to GetLogicalDriveStrings liefert falschen Partion&#x27;s Buchstaben? on Sat, 17 May 2008 20:07:45 GMT]]></title><description><![CDATA[<p>kannst du deine frage auch verständlich formulieren?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1511205</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1511205</guid><dc:creator><![CDATA[wurst]]></dc:creator><pubDate>Sat, 17 May 2008 20:07:45 GMT</pubDate></item><item><title><![CDATA[Reply to GetLogicalDriveStrings liefert falschen Partion&#x27;s Buchstaben? on Sat, 17 May 2008 20:11:52 GMT]]></title><description><![CDATA[<p>Das da oben war ich nicht. Scheiß identitätsdiebstahl.</p>
<p>Und wenn du ein diskettenlaufwerk hast und mein gegenüber der OP ist, dann stimmt etwas garnicht, da immer erst A:\, C:\ usw. kommt.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1511206</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1511206</guid><dc:creator><![CDATA[wurst -Dreal_wurst]]></dc:creator><pubDate>Sat, 17 May 2008 20:11:52 GMT</pubDate></item><item><title><![CDATA[Reply to GetLogicalDriveStrings liefert falschen Partion&#x27;s Buchstaben? on Sat, 17 May 2008 20:24:14 GMT]]></title><description><![CDATA[<p>Das da oben war ich nicht. Scheiß identitätsdiebstahl.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1511214</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1511214</guid><dc:creator><![CDATA[wurst]]></dc:creator><pubDate>Sat, 17 May 2008 20:24:14 GMT</pubDate></item><item><title><![CDATA[Reply to GetLogicalDriveStrings liefert falschen Partion&#x27;s Buchstaben? on Sat, 17 May 2008 20:59:59 GMT]]></title><description><![CDATA[<p>Ich muss sagen ihr habt mich verwirrt.<br />
Wie muss ich den den Code richtig stellen das alles richtig funktioniert?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1511235</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1511235</guid><dc:creator><![CDATA[Dreamserver]]></dc:creator><pubDate>Sat, 17 May 2008 20:59:59 GMT</pubDate></item><item><title><![CDATA[Reply to GetLogicalDriveStrings liefert falschen Partion&#x27;s Buchstaben? on Sat, 17 May 2008 21:17:31 GMT]]></title><description><![CDATA[<p>Das da oben war ich nicht. Scheiß identitätsdiebstahl.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1511239</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1511239</guid><dc:creator><![CDATA[Dreamserver]]></dc:creator><pubDate>Sat, 17 May 2008 21:17:31 GMT</pubDate></item><item><title><![CDATA[Reply to GetLogicalDriveStrings liefert falschen Partion&#x27;s Buchstaben? on Sun, 18 May 2008 16:04:59 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;windows.h&gt;

int main(int argc, char *argv[])
{
 char buf[1000];
 ULARGE_INTEGER freespace;
 ULARGE_INTEGER space;
 int x;

 x = GetLogicalDriveStrings(sizeof(buf),buf);

         GetDiskFreeSpaceEx(buf,&amp;space,NULL,&amp;freespace);

    printf (&quot;%d\n&quot;,freespace.QuadPart/1024/1024/1024);

  system(&quot;PAUSE&quot;);	
  return 0;
}
</code></pre>
<p>Wie muss ich diesen Code den ergänzen das alles einwand frei läuft?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1511648</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1511648</guid><dc:creator><![CDATA[Dreamserver]]></dc:creator><pubDate>Sun, 18 May 2008 16:04:59 GMT</pubDate></item><item><title><![CDATA[Reply to GetLogicalDriveStrings liefert falschen Partion&#x27;s Buchstaben? on Sun, 18 May 2008 16:05:46 GMT]]></title><description><![CDATA[<p>rofl</p>
<blockquote>
<p>Wie muss ich diesen Code den ergänzen das alles einwand frei läuft?</p>
</blockquote>
<p>rofl</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1511650</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1511650</guid><dc:creator><![CDATA[melkfett]]></dc:creator><pubDate>Sun, 18 May 2008 16:05:46 GMT</pubDate></item><item><title><![CDATA[Reply to GetLogicalDriveStrings liefert falschen Partion&#x27;s Buchstaben? on Sun, 18 May 2008 16:34:09 GMT]]></title><description><![CDATA[<p>Das da oben war ich nicht. Scheiß identitätsdiebstahl.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1511677</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1511677</guid><dc:creator><![CDATA[melkfett]]></dc:creator><pubDate>Sun, 18 May 2008 16:34:09 GMT</pubDate></item><item><title><![CDATA[Reply to GetLogicalDriveStrings liefert falschen Partion&#x27;s Buchstaben? on Sun, 18 May 2008 16:37:13 GMT]]></title><description><![CDATA[<p>Willst du unsere Aufmerksamkeit?<br />
Ich will eigentlich nur wissen was noch getan werden müsste das ich alles richtig ausgegeben bekomme.<br />
Will keinen Source will nur ne Erklärung</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1511680</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1511680</guid><dc:creator><![CDATA[Dreamserver]]></dc:creator><pubDate>Sun, 18 May 2008 16:37:13 GMT</pubDate></item><item><title><![CDATA[Reply to GetLogicalDriveStrings liefert falschen Partion&#x27;s Buchstaben? on Sun, 18 May 2008 16:43:05 GMT]]></title><description><![CDATA[<p>dann sagst du am besten was momentan noch falsch ausgegeben wird</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1511684</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1511684</guid><dc:creator><![CDATA[fettmelker]]></dc:creator><pubDate>Sun, 18 May 2008 16:43:05 GMT</pubDate></item><item><title><![CDATA[Reply to GetLogicalDriveStrings liefert falschen Partion&#x27;s Buchstaben? on Sun, 18 May 2008 16:50:47 GMT]]></title><description><![CDATA[<p>Ich erhalte als Ausgabe von printf:</p>
<blockquote>
<p>A:\</p>
</blockquote>
<p>Unbd dann kommt:</p>
<blockquote>
<p>Projekt1.exe - Kein Datenträger<br />
Es befindet sich kein Datenträger im Laufwerk. Legen Sie einen Datenträger in Laufwerk A: ein.</p>
</blockquote>
<p>Ich will aber das alle Laufwerke ausgegeben werden.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1511688</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1511688</guid><dc:creator><![CDATA[Dreamserver]]></dc:creator><pubDate>Sun, 18 May 2008 16:50:47 GMT</pubDate></item><item><title><![CDATA[Reply to GetLogicalDriveStrings liefert falschen Partion&#x27;s Buchstaben? on Sun, 18 May 2008 16:51:55 GMT]]></title><description><![CDATA[<p>Schleife</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1511689</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1511689</guid><dc:creator><![CDATA[tipp]]></dc:creator><pubDate>Sun, 18 May 2008 16:51:55 GMT</pubDate></item><item><title><![CDATA[Reply to GetLogicalDriveStrings liefert falschen Partion&#x27;s Buchstaben? on Sun, 18 May 2008 16:52:51 GMT]]></title><description><![CDATA[<p>Die Fehlermeldung kannst du mit SetErrorMode deaktivieren</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1511690</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1511690</guid><dc:creator><![CDATA[fettmelker]]></dc:creator><pubDate>Sun, 18 May 2008 16:52:51 GMT</pubDate></item><item><title><![CDATA[Reply to GetLogicalDriveStrings liefert falschen Partion&#x27;s Buchstaben? on Sun, 18 May 2008 17:02:25 GMT]]></title><description><![CDATA[<p>tipp schrieb:</p>
<blockquote>
<p>Schleife</p>
</blockquote>
<pre><code class="language-cpp">for (x=0; x&lt;=100; x++)
 {
 x = GetLogicalDriveStrings(sizeof(buf),buf);
 printf (&quot;%s\n&quot;,buf);
 }
</code></pre>
<p>Geht nicht!!!</p>
<p>fettmelker schrieb:</p>
<blockquote>
<p>Die Fehlermeldung kannst du mit SetErrorMode deaktivieren</p>
</blockquote>
<p>Ich will aber nicht die Fehlermeldung deaktivieren sondern will alle Laufwerke ermitteln nicht nur A:\</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1511698</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1511698</guid><dc:creator><![CDATA[Dreamserver]]></dc:creator><pubDate>Sun, 18 May 2008 17:02:25 GMT</pubDate></item><item><title><![CDATA[Reply to GetLogicalDriveStrings liefert falschen Partion&#x27;s Buchstaben? on Sun, 18 May 2008 17:04:39 GMT]]></title><description><![CDATA[<p>so bringt das nichts, du bist zu dumm</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1511702</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1511702</guid><dc:creator><![CDATA[real_hs]]></dc:creator><pubDate>Sun, 18 May 2008 17:04:39 GMT</pubDate></item><item><title><![CDATA[Reply to GetLogicalDriveStrings liefert falschen Partion&#x27;s Buchstaben? on Sun, 18 May 2008 17:08:24 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">#include &lt;windows.h&gt;
#include &lt;tchar.h&gt;
#include &lt;shlwapi.h&gt;
#include &lt;stdio.h&gt;

#ifndef BITSPERBYTE
#define BITSPERBYTE 8
#endif

#define IS_BIT(val, bit) ((val) &amp; (1 &lt;&lt; (bit)))

int _tmain(void)
{
   DWORD dwLogicalDrives, x;
   TCHAR szRoot[32];

   dwLogicalDrives = GetLogicalDrives();

   for(x = 0; x &lt; (sizeof(dwLogicalDrives) * BITSPERBYTE); x++)
   {
      if(IS_BIT(dwLogicalDrives, x))
      {
         PathBuildRoot(szRoot, x);
         _tprintf(TEXT(&quot;%s - DriveType: 0x%08X\n&quot;), szRoot, GetDriveType(szRoot));
      }
   }
   return(0);
}
</code></pre>
<p>Quelle: <a href="http://www.winapi.net" rel="nofollow">http://www.winapi.net</a> (nicht erreichbar)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1511706</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1511706</guid><dc:creator><![CDATA[real_helper]]></dc:creator><pubDate>Sun, 18 May 2008 17:08:24 GMT</pubDate></item></channel></rss>