<?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[Tasks (laufende Programme) auslesen]]></title><description><![CDATA[<p>Hi zusammen,</p>
<p>bin dabei, die Windowstasks auszulesen. Habe bereits alle laufenden Prozesse ausgelesen und in einer Listbox dargestellt!<br />
Funktioniert auch wunderbar!(Bis aufs Beenden:-)!)</p>
<p>Jetzt möchte ich aber die jenigen Programme auslesen, welche auf dem Desktop mit einer Form aktiv sind und diese mit Namen und Icon ausgeben!</p>
<p>Wie kann ich das realisieren?</p>
<p>Danke Bench</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/209042/tasks-laufende-programme-auslesen</link><generator>RSS for Node</generator><lastBuildDate>Tue, 21 Apr 2026 08:45:30 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/209042.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 26 Mar 2008 07:02:24 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Tasks (laufende Programme) auslesen on Wed, 26 Mar 2008 07:02:24 GMT]]></title><description><![CDATA[<p>Hi zusammen,</p>
<p>bin dabei, die Windowstasks auszulesen. Habe bereits alle laufenden Prozesse ausgelesen und in einer Listbox dargestellt!<br />
Funktioniert auch wunderbar!(Bis aufs Beenden:-)!)</p>
<p>Jetzt möchte ich aber die jenigen Programme auslesen, welche auf dem Desktop mit einer Form aktiv sind und diese mit Namen und Icon ausgeben!</p>
<p>Wie kann ich das realisieren?</p>
<p>Danke Bench</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1480415</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1480415</guid><dc:creator><![CDATA[Bench_XProjects]]></dc:creator><pubDate>Wed, 26 Mar 2008 07:02:24 GMT</pubDate></item><item><title><![CDATA[Reply to Tasks (laufende Programme) auslesen on Wed, 26 Mar 2008 08:07:13 GMT]]></title><description><![CDATA[<p>Dieser Thread wurde von Moderator/in <a href="http://www.c-plusplus.net/forum/profile-var-mode-is-viewprofile-and-u-is-14774.html" rel="nofollow">akari</a> aus dem Forum <a href="http://www.c-plusplus.net/forum/viewforum-var-f-is-2.html" rel="nofollow">VCL (C++ Builder)</a> in das Forum <a href="http://www.c-plusplus.net/forum/viewforum-var-f-is-4.html" rel="nofollow">WinAPI</a> verschoben.</p>
<p>Im Zweifelsfall bitte auch folgende Hinweise beachten:<br />
<a href="http://www.c-plusplus.net/forum/viewtopic-var-t-is-39405.html" rel="nofollow">C/C++ Forum :: FAQ - Sonstiges :: Wohin mit meiner Frage?</a></p>
<p><em>Dieses Posting wurde automatisch erzeugt.</em></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1480432</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1480432</guid><dc:creator><![CDATA[C++ Forumbot]]></dc:creator><pubDate>Wed, 26 Mar 2008 08:07:13 GMT</pubDate></item><item><title><![CDATA[Reply to Tasks (laufende Programme) auslesen on Wed, 26 Mar 2008 08:20:48 GMT]]></title><description><![CDATA[<p>EnumWindows</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1480437</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1480437</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Wed, 26 Mar 2008 08:20:48 GMT</pubDate></item><item><title><![CDATA[Reply to Tasks (laufende Programme) auslesen on Sat, 29 Mar 2008 12:30:06 GMT]]></title><description><![CDATA[<p>hallo,<br />
könntest du den Code posten mit dem du die aktven Prozesse ausliest ?<br />
Find da leider nichts aktuelles drüber.<br />
Danke<br />
Chris</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1482629</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1482629</guid><dc:creator><![CDATA[chri5]]></dc:creator><pubDate>Sat, 29 Mar 2008 12:30:06 GMT</pubDate></item><item><title><![CDATA[Reply to Tasks (laufende Programme) auslesen on Sat, 29 Mar 2008 12:32:45 GMT]]></title><description><![CDATA[<p><a href="http://msdn2.microsoft.com/en-us/library/ms686701(VS.85).aspx" rel="nofollow">http://msdn2.microsoft.com/en-us/library/ms686701(VS.85).aspx</a></p>
<pre><code class="language-cpp">#include &lt;windows.h&gt;
#include &lt;tlhelp32.h&gt;
#include &lt;tchar.h&gt;
#include &lt;stdio.h&gt;

//  Forward declarations:
BOOL GetProcessList( );
BOOL ListProcessModules( DWORD dwPID );
BOOL ListProcessThreads( DWORD dwOwnerPID );
void printError( TCHAR* msg );

void main( )
{
  GetProcessList( );
}

BOOL GetProcessList( )
{
  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 )
  {
    printError( TEXT(&quot;CreateToolhelp32Snapshot (of processes)&quot;) );
    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 ) )
  {
    printError( TEXT(&quot;Process32First&quot;) ); // show cause of failure
    CloseHandle( hProcessSnap );          // clean the snapshot object
    return( FALSE );
  }

  // Now walk the snapshot of processes, and
  // display information about each process in turn
  do
  {
    printf( &quot;\n\n=====================================================&quot; );
    _tprintf( TEXT(&quot;\nPROCESS NAME:  %s&quot;), pe32.szExeFile );
    printf( &quot;\n-----------------------------------------------------&quot; );

    // Retrieve the priority class.
    dwPriorityClass = 0;
    hProcess = OpenProcess( PROCESS_ALL_ACCESS, FALSE, pe32.th32ProcessID );
    if( hProcess == NULL )
      printError( TEXT(&quot;OpenProcess&quot;) );
    else
    {
      dwPriorityClass = GetPriorityClass( hProcess );
      if( !dwPriorityClass )
        printError( TEXT(&quot;GetPriorityClass&quot;) );
      CloseHandle( hProcess );
    }

    printf( &quot;\n  Process ID        = 0x%08X&quot;, pe32.th32ProcessID );
    printf( &quot;\n  Thread count      = %d&quot;,   pe32.cntThreads );
    printf( &quot;\n  Parent process ID = 0x%08X&quot;, pe32.th32ParentProcessID );
    printf( &quot;\n  Priority base     = %d&quot;, pe32.pcPriClassBase );
    if( dwPriorityClass )
      printf( &quot;\n  Priority class    = %d&quot;, dwPriorityClass );

    // List the modules and threads associated with this process
    ListProcessModules( pe32.th32ProcessID );
    ListProcessThreads( pe32.th32ProcessID );

  } while( Process32Next( hProcessSnap, &amp;pe32 ) );

  CloseHandle( hProcessSnap );
  return( TRUE );
}

BOOL ListProcessModules( DWORD dwPID )
{
  HANDLE hModuleSnap = INVALID_HANDLE_VALUE;
  MODULEENTRY32 me32;

  // Take a snapshot of all modules in the specified process.
  hModuleSnap = CreateToolhelp32Snapshot( TH32CS_SNAPMODULE, dwPID );
  if( hModuleSnap == INVALID_HANDLE_VALUE )
  {
    printError( TEXT(&quot;CreateToolhelp32Snapshot (of modules)&quot;) );
    return( FALSE );
  }

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

  // Retrieve information about the first module,
  // and exit if unsuccessful
  if( !Module32First( hModuleSnap, &amp;me32 ) )
  {
    printError( TEXT(&quot;Module32First&quot;) );  // show cause of failure
    CloseHandle( hModuleSnap );           // clean the snapshot object
    return( FALSE );
  }

  // Now walk the module list of the process,
  // and display information about each module
  do
  {
    _tprintf( TEXT(&quot;\n\n     MODULE NAME:     %s&quot;),   me32.szModule );
    _tprintf( TEXT(&quot;\n     Executable     = %s&quot;),     me32.szExePath );
    printf( &quot;\n     Process ID     = 0x%08X&quot;,         me32.th32ProcessID );
    printf( &quot;\n     Ref count (g)  = 0x%04X&quot;,     me32.GlblcntUsage );
    printf( &quot;\n     Ref count (p)  = 0x%04X&quot;,     me32.ProccntUsage );
    printf( &quot;\n     Base address   = 0x%08X&quot;, (DWORD) me32.modBaseAddr );
    printf( &quot;\n     Base size      = %d&quot;,             me32.modBaseSize );

  } while( Module32Next( hModuleSnap, &amp;me32 ) );

  CloseHandle( hModuleSnap );
  return( TRUE );
}

BOOL ListProcessThreads( DWORD dwOwnerPID ) 
{ 
  HANDLE hThreadSnap = INVALID_HANDLE_VALUE; 
  THREADENTRY32 te32; 

  // Take a snapshot of all running threads  
  hThreadSnap = CreateToolhelp32Snapshot( TH32CS_SNAPTHREAD, 0 ); 
  if( hThreadSnap == INVALID_HANDLE_VALUE ) 
    return( FALSE ); 

  // Fill in the size of the structure before using it. 
  te32.dwSize = sizeof(THREADENTRY32 ); 

  // Retrieve information about the first thread,
  // and exit if unsuccessful
  if( !Thread32First( hThreadSnap, &amp;te32 ) ) 
  {
    printError( TEXT(&quot;Thread32First&quot;) ); // show cause of failure
    CloseHandle( hThreadSnap );          // clean the snapshot object
    return( FALSE );
  }

  // Now walk the thread list of the system,
  // and display information about each thread
  // associated with the specified process
  do 
  { 
    if( te32.th32OwnerProcessID == dwOwnerPID )
    {
      printf( &quot;\n\n     THREAD ID      = 0x%08X&quot;, te32.th32ThreadID ); 
      printf( &quot;\n     Base priority  = %d&quot;, te32.tpBasePri ); 
      printf( &quot;\n     Delta priority = %d&quot;, te32.tpDeltaPri ); 
    }
  } while( Thread32Next(hThreadSnap, &amp;te32 ) ); 

  CloseHandle( hThreadSnap );
  return( TRUE );
}

void printError( TCHAR* msg )
{
  DWORD eNum;
  TCHAR sysMsg[256];
  TCHAR* p;

  eNum = GetLastError( );
  FormatMessage( FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
         NULL, eNum,
         MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
         sysMsg, 256, NULL );

  // Trim the end of the line and terminate it with a null
  p = sysMsg;
  while( ( *p &gt; 31 ) || ( *p == 9 ) )
    ++p;
  do { *p-- = 0; } while( ( p &gt;= sysMsg ) &amp;&amp;
                          ( ( *p == '.' ) || ( *p &lt; 33 ) ) );

  // Display the message
  _tprintf( TEXT(&quot;\n  WARNING: %s failed with error %d (%s)&quot;), msg, eNum, sysMsg );
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1482631</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1482631</guid><dc:creator><![CDATA[grobi4real]]></dc:creator><pubDate>Sat, 29 Mar 2008 12:32:45 GMT</pubDate></item><item><title><![CDATA[Reply to Tasks (laufende Programme) auslesen on Sun, 30 Mar 2008 06:59:11 GMT]]></title><description><![CDATA[<p>Danke,<br />
werde ich gleich mal ausporbieren.<br />
Chris</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1482993</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1482993</guid><dc:creator><![CDATA[chris22]]></dc:creator><pubDate>Sun, 30 Mar 2008 06:59:11 GMT</pubDate></item><item><title><![CDATA[Reply to Tasks (laufende Programme) auslesen on Sun, 29 Jun 2008 23:05:51 GMT]]></title><description><![CDATA[<p>Hallo,<br />
passt hier wohl ganz gut rein meine Frage.</p>
<p>Wenn ich jetzt einen Prozess z.B. mit dem Code da oben ausgelesen habe(hab ich jetzt nicht probiert), kann ich da noch tiefer reingucken?</p>
<p>Ich würde gerne einen Prozess wie ein Antivirus Programm nach bestimmten Signaturen durchsuchen. Falls Jemand von euch ein paar Sichwörter zum googeln oder sogar einen Link oder Beispiel hat wäre ich sehr dankbar.</p>
<p>Ist es auch möglich zu prüffen welche anderen Prozesse auf einen bestimmten Prozess zugreiffen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1538274</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1538274</guid><dc:creator><![CDATA[SchtinkeSocke]]></dc:creator><pubDate>Sun, 29 Jun 2008 23:05:51 GMT</pubDate></item><item><title><![CDATA[Reply to Tasks (laufende Programme) auslesen on Mon, 30 Jun 2008 07:28:11 GMT]]></title><description><![CDATA[<p>Öffne die Programmdatei und suche nach der Bytefolge, die der Signatur entspricht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1538325</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1538325</guid><dc:creator><![CDATA[[[global:former_user]]]]></dc:creator><pubDate>Mon, 30 Jun 2008 07:28:11 GMT</pubDate></item></channel></rss>