Thread: enumerating processes

  1. #1
    mustang benny bennyandthejets's Avatar
    Join Date
    Jul 2002
    Posts
    1,401

    enumerating processes

    Is there an elegant way to enumerate all currently running processes, similar to EnumWindows?
    [email protected]
    Microsoft Visual Studio .NET 2003 Enterprise Architect
    Windows XP Pro

    Code Tags
    Programming FAQ
    Tutorials

  2. #2
    Registered User
    Join Date
    Apr 2002
    Posts
    1,571

    Post

    EnumProcesses( DWORD *, DWORD, DWORD * );

    First param is an array that will receive the list of process identifiers.

    Second param is the size in bytes of the first param.

    Third param is the number of bytes returned in the first param array.

    http://msdn.microsoft.com/library/en...mprocesses.asp

  3. #3
    mustang benny bennyandthejets's Avatar
    Join Date
    Jul 2002
    Posts
    1,401
    Thanks, that wasn't in my reference, I guess I should get an updated version, or just use MSDN.

    Is it possible to enumerate all top level windows related to a particular process? Unless there's some function I haven't found, the only way would be to EnumWindows, then check the HINSTANCE of each window.
    [email protected]
    Microsoft Visual Studio .NET 2003 Enterprise Architect
    Windows XP Pro

    Code Tags
    Programming FAQ
    Tutorials

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 34
    Last Post: 05-27-2009, 12:26 PM
  2. Processes not dying
    By Elkvis in forum Linux Programming
    Replies: 12
    Last Post: 04-23-2008, 08:59 AM
  3. Stopping Processes Question
    By brett in forum Linux Programming
    Replies: 3
    Last Post: 06-24-2007, 10:15 PM
  4. binary tree of processes
    By gregulator in forum C Programming
    Replies: 1
    Last Post: 02-28-2005, 12:59 AM
  5. Unix processes
    By J-Dogg in forum Linux Programming
    Replies: 1
    Last Post: 03-24-2003, 05:42 PM