<?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[ShellExecute]]></title><description><![CDATA[<p>Hallo zusammen,</p>
<p>ich möchte gerne ein Ping mit Hilfe von ShellExecute ausführen. Dazu habe ich den unten stehenden Code geschrieben. Mein Problem ist die Verwendung von SW_SHOWNORMAL. Wenn ich es nicht mit einem Typen spezifiere, dann meckert der Compiler. Ich kann den Code compilieren, wenn ich SW_SHOWNORMAL als int deklariere, allerdings bekomme ich dann eine lange Fehlerliste.</p>
<p>Ich würde mich sehr freuen, wenn mir jemand bei diesem Problem helfen könnte.</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &quot;Shellapi.h&quot;
#include &quot;string.h&quot;

#define ShellExecute
using namespace std;

void main()
{
	string strCurrentPara;

	cout &lt;&lt; &quot;Ausfuehrung des Shell-Commands: &quot; &lt;&lt; endl;

	ShellExecute(NULL, &quot;open&quot;, &quot;c:\\Windows\\System32\\ping.exe&quot;, strCurrentPara, NULL, SW_SHOWNORMAL);
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/307871/shellexecute</link><generator>RSS for Node</generator><lastBuildDate>Thu, 06 Aug 2026 16:00:25 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/307871.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 07 Sep 2012 12:41:53 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to ShellExecute on Fri, 07 Sep 2012 12:41:53 GMT]]></title><description><![CDATA[<p>Hallo zusammen,</p>
<p>ich möchte gerne ein Ping mit Hilfe von ShellExecute ausführen. Dazu habe ich den unten stehenden Code geschrieben. Mein Problem ist die Verwendung von SW_SHOWNORMAL. Wenn ich es nicht mit einem Typen spezifiere, dann meckert der Compiler. Ich kann den Code compilieren, wenn ich SW_SHOWNORMAL als int deklariere, allerdings bekomme ich dann eine lange Fehlerliste.</p>
<p>Ich würde mich sehr freuen, wenn mir jemand bei diesem Problem helfen könnte.</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &quot;Shellapi.h&quot;
#include &quot;string.h&quot;

#define ShellExecute
using namespace std;

void main()
{
	string strCurrentPara;

	cout &lt;&lt; &quot;Ausfuehrung des Shell-Commands: &quot; &lt;&lt; endl;

	ShellExecute(NULL, &quot;open&quot;, &quot;c:\\Windows\\System32\\ping.exe&quot;, strCurrentPara, NULL, SW_SHOWNORMAL);
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2249376</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2249376</guid><dc:creator><![CDATA[DetRRG]]></dc:creator><pubDate>Fri, 07 Sep 2012 12:41:53 GMT</pubDate></item><item><title><![CDATA[Reply to ShellExecute on Fri, 07 Sep 2012 12:48:40 GMT]]></title><description><![CDATA[<blockquote>
<p>Mein Problem ist die Verwendung von SW_SHOWNORMAL.</p>
</blockquote>
<p>Doku gelesen? <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/bb762153%28v=vs.85%29.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/windows/desktop/bb762153(v=vs.85).aspx</a></p>
<p>Übrigens find ich die Zeile</p>
<pre><code class="language-cpp">#define ShellExecute
</code></pre>
<p>sehr erheiternd.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2249379</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2249379</guid><dc:creator><![CDATA[Bashar]]></dc:creator><pubDate>Fri, 07 Sep 2012 12:48:40 GMT</pubDate></item></channel></rss>