<?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[GetSystemDirectory gibt immer einen Fehler]]></title><description><![CDATA[<p>Hey.<br />
Warscheinlich gibt es eine ganz einfach Lösung für mein Problem, aber ich komme nicht darauf. Diese Funktion rufe ich einfach auf in einer Console. Doch dann kommt immer eine Fehlermeldung:</p>
<blockquote>
<p>console.exe hat ein Problem festgestellt und muss beendet werden.</p>
</blockquote>
<pre><code class="language-cpp">void GetSystemDirectoryExample()
{
    LPTSTR lpBuffer;
    UINT uSize;

    GetSystemDirectory(lpBuffer, uSize);

    cout&lt;&lt;lpBuffer&lt;&lt;endl;
    }
</code></pre>
<p>Ich weiß nicht weiter... Habe schon probiert an den Datentypen herumzubasteln^^<br />
Z.B. einfach &quot;LPTSTR&quot; durch ein &quot;char&quot; ersetzt und dann einfach ein Referenzzeichen bei dem Parameter mit angegeben, aber das hat es nicht gebracht <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /></p>
<p>Hoffe ihr könnt mir helfen.<br />
Gruß Speedy_92</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/203653/getsystemdirectory-gibt-immer-einen-fehler</link><generator>RSS for Node</generator><lastBuildDate>Mon, 27 Apr 2026 02:18:29 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/203653.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 24 Jan 2008 20:48:08 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to GetSystemDirectory gibt immer einen Fehler on Thu, 24 Jan 2008 20:48:08 GMT]]></title><description><![CDATA[<p>Hey.<br />
Warscheinlich gibt es eine ganz einfach Lösung für mein Problem, aber ich komme nicht darauf. Diese Funktion rufe ich einfach auf in einer Console. Doch dann kommt immer eine Fehlermeldung:</p>
<blockquote>
<p>console.exe hat ein Problem festgestellt und muss beendet werden.</p>
</blockquote>
<pre><code class="language-cpp">void GetSystemDirectoryExample()
{
    LPTSTR lpBuffer;
    UINT uSize;

    GetSystemDirectory(lpBuffer, uSize);

    cout&lt;&lt;lpBuffer&lt;&lt;endl;
    }
</code></pre>
<p>Ich weiß nicht weiter... Habe schon probiert an den Datentypen herumzubasteln^^<br />
Z.B. einfach &quot;LPTSTR&quot; durch ein &quot;char&quot; ersetzt und dann einfach ein Referenzzeichen bei dem Parameter mit angegeben, aber das hat es nicht gebracht <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /></p>
<p>Hoffe ihr könnt mir helfen.<br />
Gruß Speedy_92</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1443135</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1443135</guid><dc:creator><![CDATA[Speedy_92]]></dc:creator><pubDate>Thu, 24 Jan 2008 20:48:08 GMT</pubDate></item><item><title><![CDATA[Reply to GetSystemDirectory gibt immer einen Fehler on Thu, 24 Jan 2008 20:53:30 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>Du must für dem Pointer lpBuffer erstmal speicher reservieren. Und dir Größe dieses Speichers übergibst du dann als uSize.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1443139</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1443139</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Thu, 24 Jan 2008 20:53:30 GMT</pubDate></item><item><title><![CDATA[Reply to GetSystemDirectory gibt immer einen Fehler on Thu, 24 Jan 2008 21:07:16 GMT]]></title><description><![CDATA[<p>Entschuldigung, wenn ich das jetzt frage, aber wie mache ich das???</p>
<p>Könnte mir vielleicht jemand ein Beispiel geben?</p>
<p>Also ich habe es mit Pointergefrickel versucht, bin aber nicht darauf gekommen <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /></p>
<p>Ich habe es jetzt so probiert:</p>
<pre><code class="language-cpp">char *lpBuffer = new char;
    *lpBuffer = sizeof(char);
    unsigned int uSize = *lpBuffer;
</code></pre>
<p>Aber wenn ich lpBuffer ausgeben lasse auf der Console kommt irgendwie ein Zeichen, das aussieht wie ein Smilie <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1443146</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1443146</guid><dc:creator><![CDATA[Speedy_92]]></dc:creator><pubDate>Thu, 24 Jan 2008 21:07:16 GMT</pubDate></item><item><title><![CDATA[Reply to GetSystemDirectory gibt immer einen Fehler on Thu, 24 Jan 2008 21:10:57 GMT]]></title><description><![CDATA[<p>Hallo</p>
<pre><code class="language-cpp">void GetSystemDirectoryExample()
{
    UINT uSize = 100;
    LPTSTR lpBuffer = new char[uSize]; // Ich glaube TCHAR ist der entsprechende WinAPI-Typdef

    GetSystemDirectory(lpBuffer, uSize);

    cout&lt;&lt;lpBuffer&lt;&lt;endl;
    delete[] lpBuffer;
    }
</code></pre>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1443149</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1443149</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Thu, 24 Jan 2008 21:10:57 GMT</pubDate></item><item><title><![CDATA[Reply to GetSystemDirectory gibt immer einen Fehler on Sat, 26 Jan 2008 09:51:17 GMT]]></title><description><![CDATA[<p>Dieser Thread wurde von Moderator/in <a href="http://www.c-plusplus.net/forum/profile-var-mode-is-viewprofile-and-u-is-403.html" rel="nofollow">HumeSikkins</a> aus dem Forum <a href="http://www.c-plusplus.net/forum/viewforum-var-f-is-15.html" rel="nofollow">C++</a> in das Forum <a href="http://www.c-plusplus.net/forum/viewforum-var-f-is-4.html" rel="nofollow">WinAPI</a> verschoben.</p>
<p>Im Zweifelsfall bitte auch folgende Hinweise beachten:<br />
<a href="http://www.c-plusplus.net/forum/viewtopic-var-t-is-39405.html" 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/1443888</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1443888</guid><dc:creator><![CDATA[C++ Forumbot]]></dc:creator><pubDate>Sat, 26 Jan 2008 09:51:17 GMT</pubDate></item><item><title><![CDATA[Reply to GetSystemDirectory gibt immer einen Fehler on Sat, 26 Jan 2008 16:33:57 GMT]]></title><description><![CDATA[<p>Dankeschön erst einmal.<br />
Hätte allerdings eine klitzekleine Frage noch.<br />
In dieser Zeile:</p>
<pre><code class="language-cpp">UINT uSize = 100;
    LPTSTR lpBuffer = new char[uSize];
</code></pre>
<p>Wird dort ein Speicherbereich von 100 Byte reserviert??? Oder eine andere Größe???</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1444074</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1444074</guid><dc:creator><![CDATA[Speedy_92]]></dc:creator><pubDate>Sat, 26 Jan 2008 16:33:57 GMT</pubDate></item><item><title><![CDATA[Reply to GetSystemDirectory gibt immer einen Fehler on Sat, 26 Jan 2008 16:55:40 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>Es wird ein Speicherbereich für 100 chars reserviert. Ein char muß nicht 1 Byte entsprechen (ist aber meistens der Fall).</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1444087</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1444087</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Sat, 26 Jan 2008 16:55:40 GMT</pubDate></item></channel></rss>