The TaskFirst function fills a TASKENTRY structure with information about the first task in the Windows task queue. This information includes the task handle, SS register value, SP register value, stack dimensions, number of pending events, PSP offset, and so on.
You use TaskFirst to begin a walk through the Windows task queue. The TaskNext function continues the walk by filling a TASKENTRY structure with information about the next task in the task queue.
The TaskFindHandle function fills a TASKENTRY structure with information about a task whose handle is known. You use TaskFindHandle, rather than TaskFirst, to begin a walk through the Windows task queue at a specific task, rather than at the first task in the queue.