<?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[TASK MANAGER abfragen]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich möchte gern den Task Manager abfragen, ob eine Bestimmt Datei z.B. remover.exe noch offen ist.<br />
Will das in mein c++ Code abfragen und erst wenn die Datei geschlossen ist weiter machen, geht das?</p>
<p>Danke Gruss Trivial</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/132512/task-manager-abfragen</link><generator>RSS for Node</generator><lastBuildDate>Sat, 11 Jul 2026 07:28:34 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/132512.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 11 Jan 2006 13:39:47 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to TASK MANAGER abfragen on Wed, 11 Jan 2006 13:39:47 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich möchte gern den Task Manager abfragen, ob eine Bestimmt Datei z.B. remover.exe noch offen ist.<br />
Will das in mein c++ Code abfragen und erst wenn die Datei geschlossen ist weiter machen, geht das?</p>
<p>Danke Gruss Trivial</p>
]]></description><link>https://www.c-plusplus.net/forum/post/963573</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/963573</guid><dc:creator><![CDATA[trivial]]></dc:creator><pubDate>Wed, 11 Jan 2006 13:39:47 GMT</pubDate></item><item><title><![CDATA[Reply to TASK MANAGER abfragen on Wed, 11 Jan 2006 13:44:34 GMT]]></title><description><![CDATA[<p>Du meinst: &quot;Ob ein bestimmer Prozess noch läuft&quot;, oder?</p>
<p>Siehe dazu: Taking a Snapshot and Viewing Processes<br />
<a href="http://msdn.microsoft.com/library/en-us/perfmon/base/taking_a_snapshot_and_viewing_processes.asp" rel="nofollow">http://msdn.microsoft.com/library/en-us/perfmon/base/taking_a_snapshot_and_viewing_processes.asp</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/963576</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/963576</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Wed, 11 Jan 2006 13:44:34 GMT</pubDate></item><item><title><![CDATA[Reply to TASK MANAGER abfragen on Wed, 11 Jan 2006 13:46:00 GMT]]></title><description><![CDATA[<p>ja aber das mit dem Prozess abfrage hat nicht geklappt.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/963581</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/963581</guid><dc:creator><![CDATA[trivial]]></dc:creator><pubDate>Wed, 11 Jan 2006 13:46:00 GMT</pubDate></item><item><title><![CDATA[Reply to TASK MANAGER abfragen on Wed, 11 Jan 2006 13:46:59 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>Schau dir mal folgende Funktionen an:<br />
CreateToolhelp32Snapshot()<br />
Process32First()<br />
Process32Next()</p>
<p>Ist zwar nicht die beste Lösung aber ein Ansatz. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/963583</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/963583</guid><dc:creator><![CDATA[qasdfgh]]></dc:creator><pubDate>Wed, 11 Jan 2006 13:46:59 GMT</pubDate></item><item><title><![CDATA[Reply to TASK MANAGER abfragen on Wed, 11 Jan 2006 13:47:04 GMT]]></title><description><![CDATA[<p>Was hat nicht geklappt?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/963584</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/963584</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Wed, 11 Jan 2006 13:47:04 GMT</pubDate></item><item><title><![CDATA[Reply to TASK MANAGER abfragen on Wed, 11 Jan 2006 13:47:37 GMT]]></title><description><![CDATA[<p>char *pcPrg = &quot;c:\\Programme\\ISS\\Proventia Desktop\\AgentRemove.exe&quot;;</p>
<p>STARTUPINFO si;<br />
PROCESS_INFORMATION pi;</p>
<p>ZeroMemory( &amp;si, sizeof(si) );<br />
si.cb = sizeof(si);<br />
ZeroMemory( &amp;pi, sizeof(pi) );</p>
<p>CreateProcess( NULL, pcPrg, NULL, NULL, FALSE, 0, NULL, NULL,<br />
&amp;si, &amp;pi );</p>
<p>for (;;)<br />
{<br />
if ( WaitForSingleObject( pi.hProcess, 0 ) == WAIT_OBJECT_0)<br />
{<br />
break;<br />
}<br />
}</p>
<p>hiermit den Prozess abfragen</p>
]]></description><link>https://www.c-plusplus.net/forum/post/963585</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/963585</guid><dc:creator><![CDATA[trivial]]></dc:creator><pubDate>Wed, 11 Jan 2006 13:47:37 GMT</pubDate></item><item><title><![CDATA[Reply to TASK MANAGER abfragen on Wed, 11 Jan 2006 13:51:28 GMT]]></title><description><![CDATA[<p>Was willst Du denn damit abfragen?<br />
Damit startest Du nur einen neuen Prozess und wartest bis er sich beendet hat...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/963590</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/963590</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Wed, 11 Jan 2006 13:51:28 GMT</pubDate></item><item><title><![CDATA[Reply to TASK MANAGER abfragen on Wed, 11 Jan 2006 13:53:45 GMT]]></title><description><![CDATA[<p>trivial schrieb:</p>
<blockquote>
<pre><code class="language-cpp">for (;;) 
        { 
            if ( WaitForSingleObject( pi.hProcess, 0 ) == WAIT_OBJECT_0) 
            { 
            break; 
            } 
        }
</code></pre>
</blockquote>
<p>Woher hast Du denn diesen miserablen Code???? Busy-Wait ist hier aber wirklich das schlechteste was man machen kann!!!</p>
<p>Bitte ersetze es einfach durch:</p>
<pre><code class="language-cpp">WaitForSingleObject(pi.hProcess, INFINITE);
</code></pre>
<p>Oder schau Dir das Beispiel nochmals an:<br />
<a href="http://msdn.microsoft.com/library/en-us/dllproc/base/creating_processes.asp" rel="nofollow">http://msdn.microsoft.com/library/en-us/dllproc/base/creating_processes.asp</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/963593</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/963593</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Wed, 11 Jan 2006 13:53:45 GMT</pubDate></item><item><title><![CDATA[Reply to TASK MANAGER abfragen on Wed, 11 Jan 2006 14:11:43 GMT]]></title><description><![CDATA[<p>char *pcPrg = &quot;c:\\Programme\\ISS\\Proventia Desktop\\AgentRemove.exe&quot;;</p>
<p>STARTUPINFO si;<br />
PROCESS_INFORMATION pi;</p>
<p>ZeroMemory( &amp;si, sizeof(si) );<br />
si.cb = sizeof(si);<br />
ZeroMemory( &amp;pi, sizeof(pi) );</p>
<p>CreateProcess( NULL, pcPrg, NULL, NULL, FALSE, 0, NULL, NULL,<br />
&amp;si, &amp;pi );</p>
<p>for (;;)<br />
{<br />
if (WaitForSingleObject(pi.hProcess, INFINITE) == WAIT_OBJECT_0)<br />
{<br />
break;<br />
}<br />
}</p>
<p>bring so auch nichts!<br />
Ich glaube das tool macht ein child prozess auf. Wie kann man das abfragen`?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/963622</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/963622</guid><dc:creator><![CDATA[trivial]]></dc:creator><pubDate>Wed, 11 Jan 2006 14:11:43 GMT</pubDate></item><item><title><![CDATA[Reply to TASK MANAGER abfragen on Wed, 11 Jan 2006 14:15:38 GMT]]></title><description><![CDATA[<p>Ab W2k könntest Du mit &quot;Job Objects&quot; arbeiten...<br />
<a href="http://msdn.microsoft.com/library/en-us/dllproc/base/job_objects.asp" rel="nofollow">http://msdn.microsoft.com/library/en-us/dllproc/base/job_objects.asp</a><br />
Da kannst Du dann eine Liste der Prozesse innerhalb eines &quot;Jobs&quot; abfragen...</p>
<p>Ansonsten gibt es AFAIK keine dokumentierte Möglichkeit...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/963627</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/963627</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Wed, 11 Jan 2006 14:15:38 GMT</pubDate></item><item><title><![CDATA[Reply to TASK MANAGER abfragen on Wed, 11 Jan 2006 14:25:45 GMT]]></title><description><![CDATA[<p>kann man nicht einfach abfragen, ob etwas im task manager geöffnet ist?<br />
hast du eine idee`?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/963643</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/963643</guid><dc:creator><![CDATA[trivial]]></dc:creator><pubDate>Wed, 11 Jan 2006 14:25:45 GMT</pubDate></item><item><title><![CDATA[Reply to TASK MANAGER abfragen on Wed, 11 Jan 2006 14:34:06 GMT]]></title><description><![CDATA[<p>Ja, kann man... das hab ich Dir in meinem ersten Posting gezeigt... (zumindest ansatzweise)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/963656</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/963656</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Wed, 11 Jan 2006 14:34:06 GMT</pubDate></item><item><title><![CDATA[Reply to TASK MANAGER abfragen on Wed, 11 Jan 2006 14:36:49 GMT]]></title><description><![CDATA[<p>kannst du mir das ein bisschen genauer erklären?<br />
Ich bin in der sache etwas neu.<br />
Danke</p>
]]></description><link>https://www.c-plusplus.net/forum/post/963662</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/963662</guid><dc:creator><![CDATA[trivial]]></dc:creator><pubDate>Wed, 11 Jan 2006 14:36:49 GMT</pubDate></item><item><title><![CDATA[Reply to TASK MANAGER abfragen on Wed, 11 Jan 2006 14:46:58 GMT]]></title><description><![CDATA[<p>trivial: Das ist doch trivial. Stell dich nicht so dumm an.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/963671</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/963671</guid><dc:creator><![CDATA[ololol]]></dc:creator><pubDate>Wed, 11 Jan 2006 14:46:58 GMT</pubDate></item><item><title><![CDATA[Reply to TASK MANAGER abfragen on Wed, 11 Jan 2006 14:51:16 GMT]]></title><description><![CDATA[<p>tolle Antwort</p>
]]></description><link>https://www.c-plusplus.net/forum/post/963678</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/963678</guid><dc:creator><![CDATA[trivial]]></dc:creator><pubDate>Wed, 11 Jan 2006 14:51:16 GMT</pubDate></item><item><title><![CDATA[Reply to TASK MANAGER abfragen on Wed, 11 Jan 2006 15:10:28 GMT]]></title><description><![CDATA[<p>Ausnahmsweise:</p>
<pre><code class="language-cpp">#include &lt;windows.h&gt;
#include &lt;tchar.h&gt;
#include &lt;tlhelp32.h&gt;

bool GetProcessFromName(LPCTSTR szProcessName)
{
  HANDLE hProcessSnap;
  HANDLE hProcess;
  PROCESSENTRY32 pe32;
  DWORD dwPriorityClass;

  // Take a snapshot of all processes in the system.
  hProcessSnap = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0 );
  if( hProcessSnap == INVALID_HANDLE_VALUE )
    return false;

  // Set the size of the structure before using it.
  pe32.dwSize = sizeof(PROCESSENTRY32);

  // Retrieve information about the first process,
  // and exit if unsuccessful
  if( !Process32First(hProcessSnap, &amp;pe32 ) )
  {
    DWORD gle = GetLastError();
    CloseHandle( hProcessSnap );     // Must clean up the snapshot object!
    SetLastError(gle);
    return false;
  }

  // Now walk the snapshot of processes, and
  // display information about each process in turn
  do
  {
    if (_tcsicmp(pe32.szExeFile, szProcessName) == 0)
    {
      CloseHandle( hProcessSnap );
      SetLastError(0);
      return true;
    }

    //hProcess = OpenProcess( PROCESS_ALL_ACCESS, FALSE, pe32.th32ProcessID );
  } while( Process32Next( hProcessSnap, &amp;pe32 ) );

  CloseHandle( hProcessSnap );
  return true;
}

int _tmain()
{
  GetProcessFromName(_T(&quot;explorer.exe&quot;));
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/963709</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/963709</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Wed, 11 Jan 2006 15:10:28 GMT</pubDate></item></channel></rss>