JCL Help:GetPidFromProcessName

From Project JEDI Wiki
Jump to navigationJump to search


Summary

Returns the process identifier (PID) for the process identified by processname.


Pascal

 function GetPidFromProcessName(const ProcessName: string): THandle;


Parameters

Parameters Description
const ProcessName: string Name of the process, including extension, of the process for which to retrieve the process identifier.


Return Value

If the function succeeds it returns the process identifier of the specified process. If the function fails it returns INVALID_HANDLE_VALUE. Most common reason of failure is that the specified process doesn't exist (isn't running) or you didn't specify the full name of the process.


Description

GetPidFromProcessName returns the process identifier (PID) of the process identifier by ProcessName. The specified ProcessName must be the full name of the process, that is including the extension, as it appears in task manager for example.


See Also

GetProcessNameFromWnd GetProcessNameFromPid


About

Unit

JclSysInfo


Donator

Marcel van Brakel


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