The IsTask function determines whether the given task handle is valid.
htask
Identifies a task.
The return value is nonzero if the task handle is valid. Otherwise, it is zero.