NOTE: This patch is *intended* to be REVERSED when applied to the wine 
source, as we need to *remove* this from the code, or else IE might
have problems.  --rworkman (SBo)
####### End my comments ########

Module: wine
Branch: master
Commit: 628a515b83c317388ddb4fa9a7b29a42135acee0
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=628a515b83c317388ddb4fa9a7b29a42135acee0

Author: Rob Shearman <rob at codeweavers.com>
Date:   Fri Jan  4 17:43:56 2008 +0000

kernel32: Implement RegisterWaitForSingleObjectEx.

---

 dlls/kernel32/sync.c |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/dlls/kernel32/sync.c b/dlls/kernel32/sync.c
index 168a00f..b8b8f0c 100644
--- a/dlls/kernel32/sync.c
+++ b/dlls/kernel32/sync.c
@@ -270,9 +270,19 @@ HANDLE WINAPI RegisterWaitForSingleObjectEx( HANDLE hObject,
                 WAITORTIMERCALLBACK Callback, PVOID Context,
                 ULONG dwMilliseconds, ULONG dwFlags ) 
 {
-    FIXME("%p %p %p %d %d\n",
+    NTSTATUS status;
+    HANDLE hNewWaitObject;
+
+    TRACE("%p %p %p %d %d\n",
           hObject,Callback,Context,dwMilliseconds,dwFlags);
-    return 0;
+
+    status = RtlRegisterWait( &hNewWaitObject, hObject, Callback, Context, dwMilliseconds, dwFlags );
+    if (status != STATUS_SUCCESS)
+    {
+        SetLastError( RtlNtStatusToDosError(status) );
+        return NULL;
+    }
+    return hNewWaitObject;
 }
 
 /***********************************************************************