diff --git a/reactos/lib/kernel32/misc/stubs.c b/reactos/lib/kernel32/misc/stubs.c index 86b869c0efb..b5ecba33f29 100644 --- a/reactos/lib/kernel32/misc/stubs.c +++ b/reactos/lib/kernel32/misc/stubs.c @@ -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. @@ -646,20 +646,6 @@ GetNumaProcessorNode( return 0; } -/* - * @unimplemented - */ -BOOL -STDCALL -GetThreadIOPendingFlag( - HANDLE hThread, - PBOOL lpIOIsPending - ) -{ - STUB; - return 0; -} - /* * @unimplemented */ diff --git a/reactos/lib/kernel32/thread/thread.c b/reactos/lib/kernel32/thread/thread.c index 1f4506dc1af..b55278a0b49 100644 --- a/reactos/lib/kernel32/thread/thread.c +++ b/reactos/lib/kernel32/thread/thread.c @@ -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 @@ QueueUserAPC(PAPCFUNC pfnAPC, HANDLE hThread, ULONG_PTR dwData) 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 */