'判断线程是否被终止 , 如果终止返回FALSE,如果还活着返回TRUE 
' IsThreadAlive(线程句柄 ) as BOOL  
'GetCurrentThread  获取当前线程句柄
'--------------------------------------------------------------------------
Function IsThreadAlive(ByVal dwThread as HANDLE) as BOOL
   '判断线程句柄是否被终止 , 如果终止返回FALSE,如果还活着返回TRUE
   Dim bRet as BOOL, ExitCode as ULong
   If GetExitCodeThread(dwThread, @ExitCode) Then
      If ExitCode = STILL_ACTIVE Then bRet = True
   End If
   Return bRet
End Function