<?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[Warten bis Programm beendet]]></title><description><![CDATA[<p>Hi, ich rufe ein Programm aus meinem Programm auf und möchte wissen wann es beendet wird.</p>
<pre><code class="language-cpp">ShellExecute( NULL, &quot;open&quot;, csProgramm, csParameter, NULL, SW_HIDE );
</code></pre>
<p>Wie kann ich darauf warten bis es beendet ist?<br />
Geht das mit <strong>WaitForSingleObject?</strong><br />
Und wenn ja wie? Könnt Ihr mir ein Beispiel geben und erklären?</p>
<p>Grüße<br />
Filou</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/165256/warten-bis-programm-beendet</link><generator>RSS for Node</generator><lastBuildDate>Fri, 31 Jul 2026 07:29:31 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/165256.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 17 Nov 2006 09:03:56 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Warten bis Programm beendet on Fri, 17 Nov 2006 09:03:56 GMT]]></title><description><![CDATA[<p>Hi, ich rufe ein Programm aus meinem Programm auf und möchte wissen wann es beendet wird.</p>
<pre><code class="language-cpp">ShellExecute( NULL, &quot;open&quot;, csProgramm, csParameter, NULL, SW_HIDE );
</code></pre>
<p>Wie kann ich darauf warten bis es beendet ist?<br />
Geht das mit <strong>WaitForSingleObject?</strong><br />
Und wenn ja wie? Könnt Ihr mir ein Beispiel geben und erklären?</p>
<p>Grüße<br />
Filou</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1176318</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1176318</guid><dc:creator><![CDATA[Filou204]]></dc:creator><pubDate>Fri, 17 Nov 2006 09:03:56 GMT</pubDate></item><item><title><![CDATA[Reply to Warten bis Programm beendet on Fri, 17 Nov 2006 09:44:45 GMT]]></title><description><![CDATA[<p>Meine Überlegungen: Nimm <a href="http://msdn2.microsoft.com/en-us/library/ms647733.aspx" rel="nofollow">ShellExecuteEx</a>, danach kannst du den als hProcess zurückgegebenen Prozess-Handle z.B. an WaitForSingleObject weitergeben.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1176326</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1176326</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Fri, 17 Nov 2006 09:44:45 GMT</pubDate></item><item><title><![CDATA[Reply to Warten bis Programm beendet on Fri, 17 Nov 2006 09:52:56 GMT]]></title><description><![CDATA[<p>Danke für Deine Antwort!</p>
<p>Kannst Du mir ein Beispiel geben? Wie geht das mit dieser Stuktur?<br />
So nicht jedenfalls nicht:</p>
<pre><code class="language-cpp">typedef struct _SHELLEXECUTEINFO
		{
    DWORD cbSize;
    ULONG fMask;
    HWND hwnd = *handle;
    LPCTSTR lpVerb;
    LPCTSTR lpFile = open;
    LPCTSTR lpParameters;
    LPCTSTR lpDirectory = &quot;C:\\Test.exe&quot;;
    int nShow = SW_HIDE;
    HINSTANCE hInstApp;
    LPVOID lpIDList;
    LPCTSTR lpClass;
    HKEY hkeyClass;
    DWORD dwHotKey;
    union {
        HANDLE hIcon;
        HANDLE hMonitor;
    } DUMMYUNIONNAME;
    HANDLE hProcess;
	} SHELLEXECUTEINFO, *LPSHELLEXECUTEINFO;

	ShellExecuteEx(_SHELLEXECUTEINFO);
	while (bCheck == TRUE)
		{
		dWait = WaitForSingleObject(*handle, 1000);
		if (dWait == WAIT_ABANDONED)
			{
			bCheck = FALSE;
			}
		Sleep(2000);
		}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1176332</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1176332</guid><dc:creator><![CDATA[Filou204]]></dc:creator><pubDate>Fri, 17 Nov 2006 09:52:56 GMT</pubDate></item><item><title><![CDATA[Reply to Warten bis Programm beendet on Fri, 17 Nov 2006 10:00:42 GMT]]></title><description><![CDATA[<p>OMG beschäftige dich erstmal mit den Grundlagen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1176346</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1176346</guid><dc:creator><![CDATA[(D)evill]]></dc:creator><pubDate>Fri, 17 Nov 2006 10:00:42 GMT</pubDate></item><item><title><![CDATA[Reply to Warten bis Programm beendet on Fri, 17 Nov 2006 10:05:48 GMT]]></title><description><![CDATA[<p>Du mußt diese Struktur nicht nochmal neu definieren, sondern nur verwenden:</p>
<pre><code class="language-cpp">SHELLEXECUTEINFO info;
//hier alle nötigen Parameter und Zusatzangaben einfügen
if(ShellExecuteEx(info)&amp;&amp;info.hProcess!=NULL)
{
  WaitForSingleObject(info.hProcess,...);
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1176351</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1176351</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Fri, 17 Nov 2006 10:05:48 GMT</pubDate></item><item><title><![CDATA[Reply to Warten bis Programm beendet on Fri, 17 Nov 2006 10:07:24 GMT]]></title><description><![CDATA[<p>dies ware auch eine möglichkeit</p>
<pre><code>//Processinformationen zum zerstöhren der Anwendung
PROCESS_INFORMATION pInfo; 
ZeroMemory(&amp;pInfo,sizeof(pInfo));

CreateProcess(0,&quot;C:\\Deine.exe&quot;,0,0,TRUE,
          NORMAL_PRIORITY_CLASS,0,0,NULL,&amp;pInfo);
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1176353</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1176353</guid><dc:creator><![CDATA[LowFly]]></dc:creator><pubDate>Fri, 17 Nov 2006 10:07:24 GMT</pubDate></item><item><title><![CDATA[Reply to Warten bis Programm beendet on Fri, 17 Nov 2006 10:20:20 GMT]]></title><description><![CDATA[<p>LowFly du hast vergessen STARTUPINFO anzugeben.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1176361</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1176361</guid><dc:creator><![CDATA[---------]]></dc:creator><pubDate>Fri, 17 Nov 2006 10:20:20 GMT</pubDate></item></channel></rss>