Group: Process and Thread - Library: kernel32
Enumerating Processes -- WinNT
Reading and setting the priority class values for the current process and thread
Terminating all running applications from a VFP program
How to find when the application started
Obtaining I/O counts for the current process
Obtaining names and positions for shortcuts located on the Windows Desktop
Moving shortcut to a specified position on the Windows Desktop
HANDLE OpenProcess(
DWORD dwDesiredAccess, // access flag
BOOL bInheritHandle, // handle inheritance option
DWORD dwProcessId // process identifier
);
DECLARE INTEGER OpenProcess IN kernel32;
INTEGER dwDesiredAccessas,;
INTEGER bInheritHandle,;
INTEGER dwProcId
dwDesiredAccess [in] Specifies the access to the process object.
bInheritHandle [in] Specifies whether the returned handle can be inherited by a new process created by the current process.
dwProcessId [in] Specifies the identifier of the process to open.
If the function succeeds, the return value is an open handle to the specified process. If the function fails, the return value is NULL.
MSDN: the handle returned by the OpenProcess function can be used in any function that requires a handle to a process, such as the wait functions, provided the appropriate access rights were requested. When you are finished with the handle, be sure to close it using the CloseHandle function.