GetProcessIDHandle
Handle GetProcessIDHandle(int processID)Description
Opens a process by its process ID and returns a system handle to the process.
The handle is opened with PROCESS_QUERY_INFORMATION and PROCESS_VM_READ access rights.
If the process ID is invalid or the process cannot be opened, an error is logged and the script is aborted.
Parameter
- processID - The process ID (PID) of the target process, typically obtained via GetProcessID().
Return
- Handle - A system handle to the opened process.
Example
void main()
{
int pid = GetProcessID("notepad.exe");
if (pid != 0)
{
Handle h = GetProcessIDHandle(pid);
Print(h);
}
}