Commit in reactos/lib/kernel32 on MAIN
misc/stubs.c+1-151.99 -> 1.100
thread/thread.c+32-11.57 -> 1.58
+33-16
2 modified files
implemented GetThreadIOPendingFlag() (only kernel32 part)

reactos/lib/kernel32/misc
stubs.c 1.99 -> 1.100
diff -u -r1.99 -r1.100
--- stubs.c	9 Dec 2004 17:28:10 -0000	1.99
+++ stubs.c	9 Dec 2004 19:11:07 -0000	1.100
@@ -1,4 +1,4 @@
-/* $Id: stubs.c,v 1.99 2004/12/09 17:28:10 weiden Exp $
+/* $Id: stubs.c,v 1.100 2004/12/09 19:11:07 weiden Exp $
  *
  * KERNEL32.DLL stubs (STUB functions)
  * Remove from this file, if you implement them.
@@ -649,20 +649,6 @@
 /*
  * @unimplemented
  */
-BOOL
-STDCALL
-GetThreadIOPendingFlag(
-    HANDLE hThread,
-    PBOOL lpIOIsPending
-    )
-{
-    STUB;
-    return 0;
-}
-
-/*
- * @unimplemented
- */
 UINT
 STDCALL
 GetWriteWatch(

reactos/lib/kernel32/thread
thread.c 1.57 -> 1.58
diff -u -r1.57 -r1.58
--- thread.c	4 Dec 2004 19:30:09 -0000	1.57
+++ thread.c	9 Dec 2004 19:11:07 -0000	1.58
@@ -1,4 +1,4 @@
-/* $Id: thread.c,v 1.57 2004/12/04 19:30:09 navaraf Exp $
+/* $Id: thread.c,v 1.58 2004/12/09 19:11:07 weiden Exp $
  *
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS system libraries
@@ -794,4 +794,35 @@
   return NT_SUCCESS(Status);
 }
 
+/*
+ * @implemented
+ */
+BOOL STDCALL
+GetThreadIOPendingFlag(HANDLE hThread,
+                       PBOOL lpIOIsPending)
+{
+  ULONG IoPending;
+  NTSTATUS Status;
+  
+  if(lpIOIsPending == NULL)
+  {
+    SetLastError(ERROR_INVALID_PARAMETER);
+    return FALSE;
+  }
+  
+  Status = NtQueryInformationThread(hThread,
+                                    ThreadIsIoPending,
+                                    (PVOID)&IoPending,
+                                    sizeof(IoPending),
+                                    NULL);
+  if(NT_SUCCESS(Status))
+  {
+    *lpIOIsPending = ((IoPending != 0) ? TRUE : FALSE);
+    return TRUE;
+  }
+  
+  SetLastErrorByStatus(Status);
+  return FALSE;
+}
+
 /* EOF */
CVSspam 0.2.8