<?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[GetLocalDrive oder so?]]></title><description><![CDATA[<p>Hi,</p>
<p>Wie bekomme den Laufwerksbuchstabe von dem angemeldetem Betriebssystem?<br />
Gibt es da ne funktion wie GetLocalDrive? Oder muss man GetWindowsDirectory splitten?<br />
Wenn ja könnte evtl. jemand ein Beispiel dazu machen,da ich mit split() noch nicht soviel erfahrung habe. DANKE!</p>
<p>mfg,<br />
hj</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/130432/getlocaldrive-oder-so</link><generator>RSS for Node</generator><lastBuildDate>Fri, 10 Jul 2026 17:12:06 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/130432.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 22 Dec 2005 20:55:26 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to GetLocalDrive oder so? on Thu, 22 Dec 2005 20:55:26 GMT]]></title><description><![CDATA[<p>Hi,</p>
<p>Wie bekomme den Laufwerksbuchstabe von dem angemeldetem Betriebssystem?<br />
Gibt es da ne funktion wie GetLocalDrive? Oder muss man GetWindowsDirectory splitten?<br />
Wenn ja könnte evtl. jemand ein Beispiel dazu machen,da ich mit split() noch nicht soviel erfahrung habe. DANKE!</p>
<p>mfg,<br />
hj</p>
]]></description><link>https://www.c-plusplus.net/forum/post/948134</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/948134</guid><dc:creator><![CDATA[hj]]></dc:creator><pubDate>Thu, 22 Dec 2005 20:55:26 GMT</pubDate></item><item><title><![CDATA[Reply to GetLocalDrive oder so? on Thu, 22 Dec 2005 21:06:36 GMT]]></title><description><![CDATA[<pre><code>#include &lt;windows.h&gt;

void laufwerke()
{
    DWORD dwDrives = GetLogicalDrives();
    char szDrive[8]=&quot;A:\\&quot;;

    bool bQueryVol;

    cout &lt;&lt; &quot;[Laufwerke]&quot; &lt;&lt; endl;

    for(int i=0, j=1; i&lt;26; i++, j*=2)
    {
        if(dwDrives &amp; j)
        {
            szDrive[0] = i + 'A';
            cout &lt;&lt; szDrive &lt;&lt; &quot;                  &quot;;
            bQueryVol = false;

            switch(GetDriveType(szDrive))
            {
                case DRIVE_UNKNOWN:     cout &lt;&lt; &quot;Unbekannt\n&quot;; break;
                case DRIVE_NO_ROOT_DIR: cout &lt;&lt; &quot;? Kein Root-Verzeichnis ?\n&quot;; break;
                case DRIVE_REMOVABLE:   cout &lt;&lt; &quot;Wechseldatentraeger\n&quot;; bQueryVol = true; break;
                case DRIVE_FIXED:       cout &lt;&lt; &quot;Festplatte\n&quot;; bQueryVol = true; break;
                case DRIVE_REMOTE:      cout &lt;&lt; &quot;Netzwerkverknuepfung\n&quot;; break;
                case DRIVE_CDROM:       cout &lt;&lt; &quot;CDROM\n&quot;; break;
                case DRIVE_RAMDISK:     cout &lt;&lt; &quot;RAM-Disk\n&quot;; bQueryVol = true; break;
            }
		}
	}
}
</code></pre>
<p>ist aber kein standard <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/948140</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/948140</guid><dc:creator><![CDATA[elise]]></dc:creator><pubDate>Thu, 22 Dec 2005 21:06:36 GMT</pubDate></item><item><title><![CDATA[Reply to GetLocalDrive oder so? on Thu, 22 Dec 2005 21:29:52 GMT]]></title><description><![CDATA[<p>hi</p>
<p>danke aber besser wäre den windir path zu splitten jemand ne idee?</p>
<p>mfg</p>
]]></description><link>https://www.c-plusplus.net/forum/post/948155</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/948155</guid><dc:creator><![CDATA[hj]]></dc:creator><pubDate>Thu, 22 Dec 2005 21:29:52 GMT</pubDate></item><item><title><![CDATA[Reply to GetLocalDrive oder so? on Thu, 22 Dec 2005 21:55:07 GMT]]></title><description><![CDATA[<p><a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/getwindowsdirectory.asp" rel="nofollow">http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/getwindowsdirectory.asp</a><br />
beispiel findest du dort auch.</p>
<p>gehört nicht hierher sondern ins winapi forum</p>
]]></description><link>https://www.c-plusplus.net/forum/post/948176</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/948176</guid><dc:creator><![CDATA[miller_m]]></dc:creator><pubDate>Thu, 22 Dec 2005 21:55:07 GMT</pubDate></item><item><title><![CDATA[Reply to GetLocalDrive oder so? on Thu, 22 Dec 2005 22:05:03 GMT]]></title><description><![CDATA[<p>und wenn es nur um den buchstaben geht</p>
<pre><code>char windir[250];
    GetWindowsDirectory(windir,MAX_PATH);
	cout&lt;&lt;windir[0];
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/948179</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/948179</guid><dc:creator><![CDATA[elise]]></dc:creator><pubDate>Thu, 22 Dec 2005 22:05:03 GMT</pubDate></item><item><title><![CDATA[Reply to GetLocalDrive oder so? on Fri, 23 Dec 2005 09:31:44 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=403" rel="nofollow">HumeSikkins</a> aus dem Forum <a href="http://www.c-plusplus.net/forum/viewforum.php?f=15" rel="nofollow">C++</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/948369</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/948369</guid><dc:creator><![CDATA[C++ Forumbot]]></dc:creator><pubDate>Fri, 23 Dec 2005 09:31:44 GMT</pubDate></item><item><title><![CDATA[Reply to GetLocalDrive oder so? on Fri, 23 Dec 2005 11:13:15 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">GetEnvironmentVariable(_T(&quot;SystemDrive&quot;), ...)
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/948444</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/948444</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Fri, 23 Dec 2005 11:13:15 GMT</pubDate></item><item><title><![CDATA[Reply to GetLocalDrive oder so? on Fri, 23 Dec 2005 16:40:00 GMT]]></title><description><![CDATA[<p>Jochen Kalmbach schrieb:</p>
<blockquote>
<pre><code class="language-cpp">GetEnvironmentVariable(_T(&quot;SystemDrive&quot;), ...)
</code></pre>
</blockquote>
<p>afaik funktioniert das nicht auf allen plattformen</p>
]]></description><link>https://www.c-plusplus.net/forum/post/948747</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/948747</guid><dc:creator><![CDATA[miller_m]]></dc:creator><pubDate>Fri, 23 Dec 2005 16:40:00 GMT</pubDate></item><item><title><![CDATA[Reply to GetLocalDrive oder so? on Fri, 23 Dec 2005 17:26:51 GMT]]></title><description><![CDATA[<p>#include &lt;windows.h&gt;<br />
#include &lt;stdio.h&gt;</p>
<p>int main() {<br />
char var1, var2[256];<br />
GetWindowsDirectory(var, sizeof(var1));<br />
if (strchr(strchr(var1,92),92) != NULL) *strrchr(var1,92) = '\0';<br />
sprintf(var2, &quot;%s\&quot;, var1);<br />
printf(&quot;Windows ista auf %s installiert&quot;, var2);</p>
<p>return 0;<br />
}</p>
<p>doof labern aber selber keine lösung posten</p>
]]></description><link>https://www.c-plusplus.net/forum/post/948778</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/948778</guid><dc:creator><![CDATA[Swami-Ji]]></dc:creator><pubDate>Fri, 23 Dec 2005 17:26:51 GMT</pubDate></item><item><title><![CDATA[Reply to GetLocalDrive oder so? on Fri, 23 Dec 2005 17:32:59 GMT]]></title><description><![CDATA[<p>Swami-Ji schrieb:</p>
<blockquote>
<p>doof labern aber selber keine lösung posten</p>
</blockquote>
<p>das nicht der sinn des forums</p>
]]></description><link>https://www.c-plusplus.net/forum/post/948782</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/948782</guid><dc:creator><![CDATA[miller_m]]></dc:creator><pubDate>Fri, 23 Dec 2005 17:32:59 GMT</pubDate></item></channel></rss>