<?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[Systemverzeichnis ermitteln]]></title><description><![CDATA[<p>Ich weiß ja mit welcher Funktion man das SystemVerzeichnis ermittelt.<br />
Aber weiß net ganz wie man die nutz alos die GetSystemDirectory();</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/172582/systemverzeichnis-ermitteln</link><generator>RSS for Node</generator><lastBuildDate>Mon, 13 Jul 2026 05:39:37 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/172582.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 06 Feb 2007 14:25:10 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Systemverzeichnis ermitteln on Tue, 06 Feb 2007 14:25:10 GMT]]></title><description><![CDATA[<p>Ich weiß ja mit welcher Funktion man das SystemVerzeichnis ermittelt.<br />
Aber weiß net ganz wie man die nutz alos die GetSystemDirectory();</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1223878</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1223878</guid><dc:creator><![CDATA[Dry Gin]]></dc:creator><pubDate>Tue, 06 Feb 2007 14:25:10 GMT</pubDate></item><item><title><![CDATA[Reply to Systemverzeichnis ermitteln on Tue, 06 Feb 2007 15:15:19 GMT]]></title><description><![CDATA[<p>Wenn du das Windows-Verzeichnis meinst, kannst du das über folgenden Code ermitteln:</p>
<pre><code class="language-cpp">#include &lt;stdlib.h&gt;
...
char* ordner = getenv(&quot;windir&quot;);
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1223916</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1223916</guid><dc:creator><![CDATA[Dr. C++]]></dc:creator><pubDate>Tue, 06 Feb 2007 15:15:19 GMT</pubDate></item><item><title><![CDATA[Reply to Systemverzeichnis ermitteln on Tue, 06 Feb 2007 19:01:30 GMT]]></title><description><![CDATA[<p>ich meine das system verzeichnis da dies ja bei jedem Betriebssystem anders ist</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1224035</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1224035</guid><dc:creator><![CDATA[Dry Gin]]></dc:creator><pubDate>Tue, 06 Feb 2007 19:01:30 GMT</pubDate></item><item><title><![CDATA[Reply to Systemverzeichnis ermitteln on Tue, 06 Feb 2007 19:06:21 GMT]]></title><description><![CDATA[<p><a href="http://msdn2.microsoft.com/en-us/library/ms724373.aspx" rel="nofollow">http://msdn2.microsoft.com/en-us/library/ms724373.aspx</a><br />
...da gibts sogar nen Beispiel.</p>
<p>Remarks schrieb:</p>
<blockquote>
<p>Applications should not create files in the system directory. If the user is running a shared version of the operating system, the application does not have write access to the system directory.</p>
</blockquote>
]]></description><link>https://www.c-plusplus.net/forum/post/1224040</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1224040</guid><dc:creator><![CDATA[geeky]]></dc:creator><pubDate>Tue, 06 Feb 2007 19:06:21 GMT</pubDate></item><item><title><![CDATA[Reply to Systemverzeichnis ermitteln on Wed, 07 Feb 2007 18:47:25 GMT]]></title><description><![CDATA[<p>ich habe hier en Code damit sollte sich eigentlich die .exe ins System Verzeichnis kopieren weiß aber net warum des net geht wenn sich die exe öffnet kommt &quot;Projekt1 hat ein Problem festgestellt und muss beendet werden&quot;<br />
Hier ma der Code:</p>
<pre><code>short Copy();
int main(int argc, char **argv)
{
char ProgName[100];
char* ordner = getenv(&quot;windir&quot;);
strcpy(ProgName, argv[0]);
Copy(ProgName, &quot;%s\\Kui.exe&quot;,ordner); //Kopiere erstelle 

system (&quot;PAUSE&quot;);
}  
short Copy(char SRCFileName[], char DSTFileName[])
{
	FILE *SRC, *DST;
	char Buffer[1024];
		short Counter = 0;
	short Status = 0;
	SRC = fopen(SRCFileName, &quot;rb&quot;);
	if(SRC)
	{
		DST = fopen(DSTFileName, &quot;wb&quot;);
		if(DST)
		{
			while(! feof(SRC))
			{
				Counter = fread(Buffer, 1, 1024, SRC);
				if(Counter)
				fwrite(Buffer, 1, Counter, DST);
			}
		Status = 1;
		}
	}
	fclose(SRC);
	fclose(DST);
	return Status;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1224652</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1224652</guid><dc:creator><![CDATA[Dry Gin]]></dc:creator><pubDate>Wed, 07 Feb 2007 18:47:25 GMT</pubDate></item><item><title><![CDATA[Reply to Systemverzeichnis ermitteln on Wed, 07 Feb 2007 18:53:16 GMT]]></title><description><![CDATA[<blockquote>
<pre><code class="language-cpp">strcpy(ProgName, argv[0]);
</code></pre>
</blockquote>
<p>...Vielleicht ist 'ProgName' zu klein für 'argv[0]' ?<br />
<img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/27a1.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--right_arrow"
      title=":arrow_right:"
      alt="➡"
    /><br />
1. Debugger, wo trifft der Fehler auf ?<br />
2. Verwende:</p>
<pre><code class="language-cpp">// ...
TCHAR szProgName[MAX_PATH + 1];
StrCpyN(szProgName, argv[0], sizeof(szProgName) / sizeof(szProgName[0]));
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1224657</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1224657</guid><dc:creator><![CDATA[CodeFinder]]></dc:creator><pubDate>Wed, 07 Feb 2007 18:53:16 GMT</pubDate></item><item><title><![CDATA[Reply to Systemverzeichnis ermitteln on Wed, 07 Feb 2007 18:56:28 GMT]]></title><description><![CDATA[<p>dein typ geht net da kommt folgende fehlermeldung:<br />
&quot;undefined reference to `StrCpyN'&quot;</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1224659</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1224659</guid><dc:creator><![CDATA[Dry Gin]]></dc:creator><pubDate>Wed, 07 Feb 2007 18:56:28 GMT</pubDate></item><item><title><![CDATA[Reply to Systemverzeichnis ermitteln on Fri, 09 Feb 2007 20:11:12 GMT]]></title><description><![CDATA[<p>Weiß keina weida??</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1225895</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1225895</guid><dc:creator><![CDATA[Dry Gin]]></dc:creator><pubDate>Fri, 09 Feb 2007 20:11:12 GMT</pubDate></item><item><title><![CDATA[Reply to Systemverzeichnis ermitteln on Fri, 09 Feb 2007 20:17:44 GMT]]></title><description><![CDATA[<p>siehe msdn ganz unten:<br />
<a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/shlwapi/string/strcpyn.asp" rel="nofollow">http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/shlwapi/string/strcpyn.asp</a></p>
<p>...Eine Datei kannst du auch mit CopyFile() kopieren:<br />
<a href="http://msdn2.microsoft.com/en-us/library/aa363851.aspx" rel="nofollow">http://msdn2.microsoft.com/en-us/library/aa363851.aspx</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1225901</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1225901</guid><dc:creator><![CDATA[geeky]]></dc:creator><pubDate>Fri, 09 Feb 2007 20:17:44 GMT</pubDate></item><item><title><![CDATA[Reply to Systemverzeichnis ermitteln on Fri, 09 Feb 2007 20:22:23 GMT]]></title><description><![CDATA[<p>kommt aber immer noch die fehlermeldung projekt1.exe musste gesclossen werden</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1225904</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1225904</guid><dc:creator><![CDATA[Dry Gin]]></dc:creator><pubDate>Fri, 09 Feb 2007 20:22:23 GMT</pubDate></item><item><title><![CDATA[Reply to Systemverzeichnis ermitteln on Fri, 09 Feb 2007 20:25:40 GMT]]></title><description><![CDATA[<p>Geh mal mit dem Debugger dran, damit sollte ja die Zeile in der er wegschmiert festzustellen 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=";D"
      alt="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1225912</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1225912</guid><dc:creator><![CDATA[geeky]]></dc:creator><pubDate>Fri, 09 Feb 2007 20:25:40 GMT</pubDate></item><item><title><![CDATA[Reply to Systemverzeichnis ermitteln on Sat, 10 Feb 2007 12:53:57 GMT]]></title><description><![CDATA[<p>so system verzeichnis wird jetzt ermittelt aber is es keine kopie vorhanden</p>
<pre><code>short Copy();
int main(int argc, char **argv)
{
char pfad[500];
char ProgName[100];
char abc[600] = &quot;\\1.exe&quot;;
strcpy(ProgName, argv[0]);    
GetSystemDirectory(pfad, 500);
strcat (pfad,abc);
Copy(ProgName, &quot;%s&quot;,pfad);
printf (&quot;%s\n&quot;,pfad); 
system (&quot;PAUSE&quot;);
}  

short Copy(char SRCFileName[], char DSTFileName[])
{
	FILE *SRC, *DST;
	char Buffer[1024];
	short Counter = 0;
	short Status = 0;
	SRC = fopen(SRCFileName, &quot;rb&quot;);
	if(SRC)
	{
		DST = fopen(DSTFileName, &quot;wb&quot;);
		if(DST)
		{
			while(! feof(SRC))
			{
				Counter = fread(Buffer, 1, 1024, SRC);
				if(Counter)
				fwrite(Buffer, 1, Counter, DST);
			}
		Status = 1;
		}
	}
	fclose(SRC);
	fclose(DST);
	return Status;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1225924</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1225924</guid><dc:creator><![CDATA[Dry Gin]]></dc:creator><pubDate>Sat, 10 Feb 2007 12:53:57 GMT</pubDate></item><item><title><![CDATA[Reply to Systemverzeichnis ermitteln on Sun, 11 Feb 2007 03:37:30 GMT]]></title><description><![CDATA[<p>Überprüf mal was die Rückgabewerte sagen <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=";D"
      alt="😉"
    /></p>
<p>&quot;Applications should not create files in the system directory.&quot; &lt;- Warum hast du das eigentl. vor?</p>
<p>&quot;If the user is running a shared version of the operating system, the application does not have write access to the system directory.&quot; &lt;- Wenn ich jetzt wüsste was ich unter &quot;shared version&quot; zu verstehen habe <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=";D"
      alt="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1226617</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1226617</guid><dc:creator><![CDATA[geeky]]></dc:creator><pubDate>Sun, 11 Feb 2007 03:37:30 GMT</pubDate></item><item><title><![CDATA[Reply to Systemverzeichnis ermitteln on Sun, 11 Feb 2007 12:33:46 GMT]]></title><description><![CDATA[<p>habe es hingekriegt</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1226778</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1226778</guid><dc:creator><![CDATA[Dry Gin]]></dc:creator><pubDate>Sun, 11 Feb 2007 12:33:46 GMT</pubDate></item></channel></rss>