I have created a function that will get a process name out of a PID. It is called _ProcessGetName(). This function is useful when you use WinGetProcess() since it only returns a PID. I am thinking about submitting this to the Standard UDF Library but I need someone to review it. Here is the function documentation:
;=============================================================================== ; ; Description - Returns a string containing the process name that belongs to a given PID. ; ; Syntax - _ProcessGetName( $iPID ) ; ; Parameters - $iPID - The PID of a currently running process ; ; Requirements - None. ; ; Return Values - Success - The name of the process ; Failure - Blank string and sets @error ; 1 - Process doesn't exist ; 2 - Error getting process list ; 3 - No processes found ; ; Author(s) - Erifash <erifash [at] gmail [dot] com>, Wouter van Kesteren. ; ; Notes - Supplementary to ProcessExists(). ; ;===============================================================================
The UDF is attached. If anyone is interested please tell me what you think of it. Thanks!
Edited by erifash, 03 December 2005 - 03:25 AM.