Added TASK_GetPtr/TASK_GetCurrent functions to get the TDB for a task
handle.

diff --git a/scheduler/thread.c b/scheduler/thread.c
index 512d6e8..b0410f5 100644
--- a/scheduler/thread.c
+++ b/scheduler/thread.c
@@ -68,7 +68,7 @@
         /* Allow task handles to be used; convert to main thread */
         if ( IsTask16( id ) )
         {
-            TDB *pTask = (TDB *)GlobalLock16( id );
+            TDB *pTask = TASK_GetPtr( id );
             if (pTask) return pTask->teb;
         }
         SetLastError( ERROR_INVALID_PARAMETER );