JCL Help:RunningProcessesList

From Project JEDI Wiki
Jump to navigationJump to search


Summary

Returns a list of all running processes.


Pascal

 function RunningProcessesList(const List: TStrings; FullPath: Boolean = True): Boolean;


Parameters

Parameters Description
const List: TStrings The list which is filled with the names of all running processes. Note that if this function is executed NT 3 or NT 4 the Objects property of the list contains INVALID_HANDLE_VALUE, on all other systems the Objects property is filled with the ToolHelp Process ID which you can use to further investigate the process.
FullPath: Boolean = True If True the names of processes in the list are expanded to include the full path of the executable file. If False only the process name (filename of the executable) is put in the list.


Return Value

If the function succeeds it returns True, otherwise it returns False. In the latter case the contents of the list is undefined.


Description

RunningProcessesList fills the List parameter with a list of all running processes.


About

Unit

JclSysInfo


Donator

Petr Vones (Windows) Robert Rossmair (Unix)


Notes

On Windows NT/2000 there exists two processes with PIDs 0 and 2 (8 on Windows 2000) which do not map to an executable image file. The names of these processes are fabricated by the routine as "System Idle Process" and "System Process" respectively.


Contribute to this help topic

This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page