GetWindowTask

Syntax

HANDLE GetWindowTask(hWnd)

This function searches for the handle of a task associated with the hWnd parameter. A task is any program that executes as an independent unit. All applications are executed as tasks. Each instance of an application is a task.

Parameter Type/Description  

hWnd HWND Identifies the window for which a task handle is retrieved.  

Return Value

The return value identifies the task associated with a particular window.