Process Status API (PSAPI)

Overview of the Process Status API (PSAPI) technology.

To develop Process Status API (PSAPI), you need these headers:

For programming guidance for this technology, see:

Functions

Title Description
EmptyWorkingSet Removes as many pages as possible from the working set of the specified process.
EnumDeviceDrivers Retrieves the load address for each device driver in the system.
EnumPageFilesA Calls the callback routine for each installed pagefile in the system.
EnumPageFilesW Calls the callback routine for each installed pagefile in the system.
EnumProcesses Retrieves the process identifier for each process object in the system.
EnumProcessModules Retrieves a handle for each module in the specified process.
EnumProcessModulesEx Retrieves a handle for each module in the specified process that meets the specified filter criteria.
GetDeviceDriverBaseNameA Retrieves the base name of the specified device driver.
GetDeviceDriverBaseNameW Retrieves the base name of the specified device driver.
GetDeviceDriverFileNameA Retrieves the path available for the specified device driver.
GetDeviceDriverFileNameW Retrieves the path available for the specified device driver.
GetMappedFileNameA Checks whether the specified address is within a memory-mapped file in the address space of the specified process. If so, the function returns the name of the memory-mapped file.
GetMappedFileNameW Checks whether the specified address is within a memory-mapped file in the address space of the specified process. If so, the function returns the name of the memory-mapped file.
GetModuleBaseNameA Retrieves the base name of the specified module.
GetModuleBaseNameW Retrieves the base name of the specified module.
GetModuleFileNameExA Retrieves the fully qualified path for the file containing the specified module.
GetModuleFileNameExW Retrieves the fully qualified path for the file containing the specified module.
GetModuleInformation Retrieves information about the specified module in the MODULEINFO structure.
GetPerformanceInfo Retrieves the performance values contained in the PERFORMANCE_INFORMATION structure.
GetProcessImageFileNameA Retrieves the name of the executable file for the specified process.
GetProcessImageFileNameW Retrieves the name of the executable file for the specified process.
GetProcessMemoryInfo Retrieves information about the memory usage of the specified process.
GetWsChanges Retrieves information about the pages that have been added to the working set of the specified process since the last time this function or the InitializeProcessForWsWatch function was called.
GetWsChangesEx Retrieves extended information about the pages that have been added to the working set of the specified process since the last time this function or the InitializeProcessForWsWatch function was called.
InitializeProcessForWsWatch Initiates monitoring of the working set of the specified process.
PENUM_PAGE_FILE_CALLBACKA An application-defined callback function used with the EnumPageFiles function.
PENUM_PAGE_FILE_CALLBACKW An application-defined callback function used with the EnumPageFiles function.
QueryWorkingSet Retrieves information about the pages currently added to the working set of the specified process.
QueryWorkingSetEx Retrieves extended information about the pages at specific virtual addresses in the address space of the specified process.

Structures

Title Description
ENUM_PAGE_FILE_INFORMATION Contains information about a pagefile.
MODULEINFO Contains the module load address, size, and entry point.
PERFORMANCE_INFORMATION Contains performance information.
PROCESS_MEMORY_COUNTERS Contains the memory statistics for a process.
PROCESS_MEMORY_COUNTERS_EX Contains extended memory statistics for a process.
PSAPI_WORKING_SET_BLOCK Contains working set information for a page.
PSAPI_WORKING_SET_EX_BLOCK Contains extended working set information for a page.
PSAPI_WORKING_SET_EX_INFORMATION Contains extended working set information for a process.
PSAPI_WORKING_SET_INFORMATION Contains working set information for a process.
PSAPI_WS_WATCH_INFORMATION Contains information about a page added to a process working set.
PSAPI_WS_WATCH_INFORMATION_EX Contains extended information about a page added to a process working set.