Argument | Description |
al_handle | Long. The handle you would like to get the process for |
A handle is a numeric reference that identifies an object in the operating system. A window has a handle. A menu has a handle. Individual components on a window may also have a handle. The ph_handle( ) function returns the handle that is assigned to the PowerHome program. You can use the Window Spy screen under the PowerHome Maintenance menu to inspect the handles of various operating system objects. You can also use the ph_locatehandle( ) and ph_locatehandle1( ) functions to programmatically determine the handles of objects.
A process is a numeric reference that is assigned to an executing program. If you launch a notepad.exe window, the window will have a handle, the menu will have a different handle, the area where you type characters will have a handle. All of these handles are ultimately associated with the process that spawned their creation. By supplying any of the handles associated with a particular running instance of notepad.exe, this function will return the process. When you have a process, you can then use functions such as ph_killprocess( ) to terminate the execution of a process.