<?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[CreateProcess und Anführunsstriche]]></title><description><![CDATA[<p>Ich habe hier ein sehr kurioses Problem:<br />
In der msdn wird erwähnt, das man, sollte man Prozesse starten die sich in einem Verzeichnis befinden das leerzeichen enthält, den Pfad in Anführungsstriche setzen sollte. Beispiel: &quot;\&quot;c:\\dokumente und einstellungen\\calc.exe\&quot;&quot;</p>
<p>Folgender Code will jedoch nicht den Prozess starten, wenn der String in dieser Form ist, sonder geht nur, wenn wenn der Pfad nicht von Anführungszeichen umschlossen wird und der String wie folgt aussieht: &quot;c:\\dokumente und einstellungen\\calc.exe&quot; . Das steht jedoch im Widerspruch zur msdn, wo in solchen Fällen Anführungszeichen dringend empfohlen werden. Nun meine Frage: Was mach ich falsch?</p>
<pre><code>CreateProcess( &quot;\&quot;c:\\dokumente und einstellungen\\calc.exe\&quot;&quot;, 
		NULL,				// Command line. 
        NULL,             // Process handle not inheritable. 
        NULL,             // Thread handle not inheritable. 
        FALSE,            // Set handle inheritance to FALSE. 
        0,                // No creation flags. 
        NULL,             // Use parent's environment block. 
        NULL,             // Use parent's starting directory. 
        &amp;si,              // Pointer to STARTUPINFO structure.
        &amp;pi )             // Pointer to PROCESS_INFORMATION structure.
    )
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/88264/createprocess-und-anführunsstriche</link><generator>RSS for Node</generator><lastBuildDate>Sun, 19 Apr 2026 13:07:18 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/88264.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 07 Oct 2004 22:08:28 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to CreateProcess und Anführunsstriche on Thu, 07 Oct 2004 22:08:28 GMT]]></title><description><![CDATA[<p>Ich habe hier ein sehr kurioses Problem:<br />
In der msdn wird erwähnt, das man, sollte man Prozesse starten die sich in einem Verzeichnis befinden das leerzeichen enthält, den Pfad in Anführungsstriche setzen sollte. Beispiel: &quot;\&quot;c:\\dokumente und einstellungen\\calc.exe\&quot;&quot;</p>
<p>Folgender Code will jedoch nicht den Prozess starten, wenn der String in dieser Form ist, sonder geht nur, wenn wenn der Pfad nicht von Anführungszeichen umschlossen wird und der String wie folgt aussieht: &quot;c:\\dokumente und einstellungen\\calc.exe&quot; . Das steht jedoch im Widerspruch zur msdn, wo in solchen Fällen Anführungszeichen dringend empfohlen werden. Nun meine Frage: Was mach ich falsch?</p>
<pre><code>CreateProcess( &quot;\&quot;c:\\dokumente und einstellungen\\calc.exe\&quot;&quot;, 
		NULL,				// Command line. 
        NULL,             // Process handle not inheritable. 
        NULL,             // Thread handle not inheritable. 
        FALSE,            // Set handle inheritance to FALSE. 
        0,                // No creation flags. 
        NULL,             // Use parent's environment block. 
        NULL,             // Use parent's starting directory. 
        &amp;si,              // Pointer to STARTUPINFO structure.
        &amp;pi )             // Pointer to PROCESS_INFORMATION structure.
    )
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/623689</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/623689</guid><dc:creator><![CDATA[Belial]]></dc:creator><pubDate>Thu, 07 Oct 2004 22:08:28 GMT</pubDate></item><item><title><![CDATA[Reply to CreateProcess und Anführunsstriche on Fri, 08 Oct 2004 09:36:37 GMT]]></title><description><![CDATA[<p>Mich würde ja mal wirklich interessieren wo das in der msdn steht. Geht es da nicht vielleicht doch um Kommandozeile&amp;Co?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/623881</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/623881</guid><dc:creator><![CDATA[nirsaja]]></dc:creator><pubDate>Fri, 08 Oct 2004 09:36:37 GMT</pubDate></item><item><title><![CDATA[Reply to CreateProcess und Anführunsstriche on Fri, 08 Oct 2004 09:38:01 GMT]]></title><description><![CDATA[<p>Ich glaub die meinen, man soll quoted strings verwenden, wenn man lpApplicationName auf NULL setzt und den exe-Pfad in der lpCommandLine mit angibt...<br />
Zumindest funktionieren quoted strings bei lpCommandLine...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/623884</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/623884</guid><dc:creator><![CDATA[geeky]]></dc:creator><pubDate>Fri, 08 Oct 2004 09:38:01 GMT</pubDate></item><item><title><![CDATA[Reply to CreateProcess und Anführunsstriche on Fri, 08 Oct 2004 10:32:07 GMT]]></title><description><![CDATA[<p>Genau dann funzt es, hab ich jetzt auch rausgefunden. Um aber nochmal die msdn zu zitieren, da es ja anscheinend einige Leute nicht glauben:</p>
<p>[msdn]<br />
lpApplicationName<br />
[in] Pointer to a null-terminated string that specifies the module to execute.<br />
....<br />
If you are using a long file name that contains a space, use quoted strings to indicate where the file name ends and the arguments begin; otherwise, the file name is ambiguous.<br />
....<br />
[/msdn]</p>
<p>Ich mag mich irren, aber da steht eindeutig das man bei Pfadangaben mit Leerzeichen Anführungszeichen verwenden soll.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/623930</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/623930</guid><dc:creator><![CDATA[Belial]]></dc:creator><pubDate>Fri, 08 Oct 2004 10:32:07 GMT</pubDate></item><item><title><![CDATA[Reply to CreateProcess und Anführunsstriche on Fri, 08 Oct 2004 12:57:05 GMT]]></title><description><![CDATA[<p>mußt mal den satz davor lesen, das gildet nur in lpCommandLine. Wenn du Appname auf NULL setzt und Pfad/Application in lpCommandLine setzt sollst du das quoten</p>
]]></description><link>https://www.c-plusplus.net/forum/post/624065</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/624065</guid><dc:creator><![CDATA[MiC++ha]]></dc:creator><pubDate>Fri, 08 Oct 2004 12:57:05 GMT</pubDate></item><item><title><![CDATA[Reply to CreateProcess und Anführunsstriche on Fri, 08 Oct 2004 16:38:47 GMT]]></title><description><![CDATA[<p>Wuha, man du solltest den Link posten, auf die Seite in der msdn. Mit 2 mal [...] und ohne Kontext ist das sonst ziemlich aussagelos. Und offensichtlich bezieht sich dieser Satz ja auch auf was anderes.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/624350</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/624350</guid><dc:creator><![CDATA[nirsaja]]></dc:creator><pubDate>Fri, 08 Oct 2004 16:38:47 GMT</pubDate></item><item><title><![CDATA[Reply to CreateProcess und Anführunsstriche on Fri, 08 Oct 2004 17:26:26 GMT]]></title><description><![CDATA[<p><a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/createprocess.asp" rel="nofollow">MSDN: CreateProcess</a></p>
<p>Probleme, die MSDN/Google (Suchwort: CreateProcess MSDN) selbst zu bedienen, oder warum brauchste da nen Link hin?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/624387</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/624387</guid><dc:creator><![CDATA[Hepi]]></dc:creator><pubDate>Fri, 08 Oct 2004 17:26:26 GMT</pubDate></item><item><title><![CDATA[Reply to CreateProcess und Anführunsstriche on Fri, 08 Oct 2004 18:04:56 GMT]]></title><description><![CDATA[<p>Google??? ist das nicht nen Kuchen von MSDN (Münchener Sahne Dorten Nacher)<br />
Was hat das mit WinAPI zu tun? Die WinAPI Doku giebt es doch als helpFile auf meinem Rechner!</p>
<p><img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/624432</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/624432</guid><dc:creator><![CDATA[MiC++ha]]></dc:creator><pubDate>Fri, 08 Oct 2004 18:04:56 GMT</pubDate></item></channel></rss>