[Question] Process Status API(psapi.dll): EnumProcesses menu

User Tag List

Results 1 to 3 of 3
  1. #1
    nilum's Avatar Member
    Reputation
    9
    Join Date
    Jun 2009
    Posts
    47
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Question] Process Status API(psapi.dll): EnumProcesses

    Alright, it seems BlackMagic uses EnumWindowsProc, but I've decided to go a different route and enumerate through the process list. It's not really a matter of efficiency and is more about wanting to do things different for the sake of experimenting and educating myself about using different Windows API calls.

    EnumProcesses returns an array of process IDs and I really have no problem getting it to do that. The problem is being forced to specify array size. I was expecting this function call to be more intuitive and simply point to some OS managed array, but instead it takes an initialized array and only updates it up to a specified number of processes. Obviously, I could simply specify some very high number, but that just doesn't feel right to me.

    Is there simply some array that the OS manages that I could read from? To clarify, I would expect the OS to have a list of process IDs for all opened processes. Seems like it might be easier just to point to that, if it exists.
    Last edited by nilum; 05-04-2012 at 07:02 PM.

    [Question] Process Status API(psapi.dll): EnumProcesses
  2. #2
    sitnspinlock's Avatar Elite User CoreCoins Purchaser
    Reputation
    398
    Join Date
    Sep 2010
    Posts
    439
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hello,

    active process list is always changing, so these api's build buffers containing information during the time of the call. for all you know, right after the call, another process could begin execution.

    psapi functions and the toolhelp api's (see msdn) all share the same common native api NtQuerySystemInformation with systemProcessInformation class to tell the api's user about existing processes.

    if you wanted access to this list you would need to write a driver.

  3. #3
    nilum's Avatar Member
    Reputation
    9
    Join Date
    Jun 2009
    Posts
    47
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wow. Thank you. Very helpful information.

Similar Threads

  1. HadesMem: Creating a Process and Injecting a DLL
    By GliderPro in forum WoW Memory Editing
    Replies: 3
    Last Post: 12-20-2010, 02:31 AM
  2. Question about process hash & Warden.
    By Sel3n in forum WoW Memory Editing
    Replies: 15
    Last Post: 07-29-2009, 12:41 AM
  3. [Source] Process Speed Hack ASM DLL
    By Zeroi9 in forum WoW Memory Editing
    Replies: 2
    Last Post: 03-29-2009, 10:37 AM
  4. Question regarding DLL-export and problems with the stack
    By schlumpf in forum WoW Memory Editing
    Replies: 8
    Last Post: 03-12-2009, 06:28 PM
  5. another CE question, about process guard
    By mwo in forum World of Warcraft General
    Replies: 0
    Last Post: 01-07-2007, 11:18 PM
All times are GMT -5. The time now is 11:00 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search