Nikolay Sivov : kernel32: Added SetWaitableTimerEx().

Alexandre Julliard julliard at winehq.org
Mon Mar 24 15:59:45 CDT 2014


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

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Sat Mar 22 11:09:18 2014 +0400

kernel32: Added SetWaitableTimerEx().

---

 .../api-ms-win-core-synch-l1-2-0.spec                |    2 +-
 dlls/kernel32/kernel32.spec                          |    1 +
 dlls/kernel32/sync.c                                 |   10 ++++++++++
 include/winbase.h                                    |   18 ++++++++++++++++++
 4 files changed, 30 insertions(+), 1 deletion(-)

diff --git a/dlls/api-ms-win-core-synch-l1-2-0/api-ms-win-core-synch-l1-2-0.spec b/dlls/api-ms-win-core-synch-l1-2-0/api-ms-win-core-synch-l1-2-0.spec
index 43be0c8..d35fe78 100644
--- a/dlls/api-ms-win-core-synch-l1-2-0/api-ms-win-core-synch-l1-2-0.spec
+++ b/dlls/api-ms-win-core-synch-l1-2-0/api-ms-win-core-synch-l1-2-0.spec
@@ -39,7 +39,7 @@
 @ stdcall SetCriticalSectionSpinCount(ptr long) kernel32.SetCriticalSectionSpinCount
 @ stdcall SetEvent(long) kernel32.SetEvent
 @ stdcall SetWaitableTimer(long ptr long ptr ptr long) kernel32.SetWaitableTimer
-@ stub SetWaitableTimerEx
+@ stdcall SetWaitableTimerEx(long ptr long ptr ptr ptr long) kernel32.SetWaitableTimerEx
 @ stdcall SignalObjectAndWait(long long long long) kernel32.SignalObjectAndWait
 @ stdcall Sleep(long) kernel32.Sleep
 @ stdcall SleepConditionVariableCS(ptr ptr long) kernel32.SleepConditionVariableCS
diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec
index 3126628..b24a9ee 100644
--- a/dlls/kernel32/kernel32.spec
+++ b/dlls/kernel32/kernel32.spec
@@ -1191,6 +1191,7 @@
 @ stub SetVolumeMountPointA
 @ stub SetVolumeMountPointW
 @ stdcall SetWaitableTimer(long ptr long ptr ptr long)
+@ stdcall SetWaitableTimerEx(long ptr long ptr ptr ptr long)
 @ stdcall SetupComm(long long long)
 @ stub ShowConsoleCursor
 @ stdcall SignalObjectAndWait(long long long long)
diff --git a/dlls/kernel32/sync.c b/dlls/kernel32/sync.c
index 0f44240..6c452a4 100644
--- a/dlls/kernel32/sync.c
+++ b/dlls/kernel32/sync.c
@@ -1177,6 +1177,16 @@ BOOL WINAPI SetWaitableTimer( HANDLE handle, const LARGE_INTEGER *when, LONG per
     return TRUE;
 }
 
+/***********************************************************************
+ *           SetWaitableTimerEx    (KERNEL32.@)
+ */
+BOOL WINAPI SetWaitableTimerEx( HANDLE handle, const LARGE_INTEGER *when, LONG period,
+                              PTIMERAPCROUTINE callback, LPVOID arg, REASON_CONTEXT *context, ULONG tolerabledelay )
+{
+    FIXME("(%p, %p, %d, %p, %p, %p, %d) semi-stub\n",
+          handle, when, period, callback, arg, context, tolerabledelay);
+    return SetWaitableTimer(handle, when, period, callback, arg, FALSE);
+}
 
 /***********************************************************************
  *           CancelWaitableTimer    (KERNEL32.@)
diff --git a/include/winbase.h b/include/winbase.h
index 6cc0a24..29ff218 100644
--- a/include/winbase.h
+++ b/include/winbase.h
@@ -1512,6 +1512,23 @@ typedef PRTL_RUN_ONCE LPINIT_ONCE;
 /* initialization callback prototype */
 typedef BOOL (WINAPI *PINIT_ONCE_FN)(PINIT_ONCE,PVOID,PVOID*);
 
+typedef struct _REASON_CONTEXT
+{
+    ULONG Version;
+    DWORD Flags;
+    union
+    {
+        struct
+        {
+            HMODULE LocalizedReasonModule;
+            ULONG LocalizedReasonId;
+            ULONG ReasonStringCount;
+            LPWSTR *ReasonStrings;
+        } Detailed;
+        LPWSTR SimpleReasonString;
+    } Reason;
+} REASON_CONTEXT, *PREASON_CONTEXT;
+
 WINBASEAPI BOOL        WINAPI ActivateActCtx(HANDLE,ULONG_PTR *);
 WINADVAPI  BOOL        WINAPI AddAccessAllowedAce(PACL,DWORD,DWORD,PSID);
 WINADVAPI  BOOL        WINAPI AddAccessAllowedAceEx(PACL,DWORD,DWORD,DWORD,PSID);
@@ -2363,6 +2380,7 @@ WINBASEAPI BOOL        WINAPI SetVolumeMountPointA(LPCSTR,LPCSTR);
 WINBASEAPI BOOL        WINAPI SetVolumeMountPointW(LPCSTR,LPCSTR);
 #define                       SetVolumeMountPoint WINELIB_NAME_AW(SetVolumeMountPoint)
 WINBASEAPI BOOL        WINAPI SetWaitableTimer(HANDLE,const LARGE_INTEGER*,LONG,PTIMERAPCROUTINE,LPVOID,BOOL);
+WINBASEAPI BOOL        WINAPI SetWaitableTimerEx(HANDLE,const LARGE_INTEGER*,LONG,PTIMERAPCROUTINE,LPVOID,REASON_CONTEXT*,ULONG);
 WINBASEAPI BOOL        WINAPI SetupComm(HANDLE,DWORD,DWORD);
 WINBASEAPI DWORD       WINAPI SignalObjectAndWait(HANDLE,HANDLE,DWORD,BOOL);
 WINBASEAPI DWORD       WINAPI SizeofResource(HMODULE,HRSRC);




More information about the wine-cvs mailing list