close(timer->pipe[1]);
#endif
+ free(timer->name);
free(timer);
return TRUE;
}
{
HANDLE handle = NULL;
WINPR_TIMER* timer;
+
+ if (lpTimerAttributes)
+ WLog_WARN(TAG, "%s [%s] does not support lpTimerAttributes", __FUNCTION__, lpTimerName);
+
timer = (WINPR_TIMER*) calloc(1, sizeof(WINPR_TIMER));
if (timer)
timer->pfnCompletionRoutine = NULL;
timer->lpArgToCompletionRoutine = NULL;
timer->bInit = FALSE;
+ timer->name = strdup(lpTimerName);
timer->ops = &ops;
#if defined(__APPLE__)
HANDLE CreateWaitableTimerExA(LPSECURITY_ATTRIBUTES lpTimerAttributes, LPCSTR lpTimerName,
DWORD dwFlags, DWORD dwDesiredAccess)
{
- BOOL bManualReset;
- bManualReset = (dwFlags & CREATE_WAITABLE_TIMER_MANUAL_RESET) ? TRUE : FALSE;
+ BOOL bManualReset = (dwFlags & CREATE_WAITABLE_TIMER_MANUAL_RESET) ? TRUE : FALSE;
+
+ if (dwDesiredAccess != 0)
+ WLog_WARN(TAG, "%s [%s] does not support dwDesiredAccess 0x%08"PRIx32, __FUNCTION__, lpTimerName,
+ dwDesiredAccess);
+
return CreateWaitableTimerA(lpTimerAttributes, bManualReset, lpTimerName);
}
if (lPeriod < 0)
return FALSE;
+ if (fResume)
+ {
+ WLog_ERR(TAG, "%s does not support fResume", __FUNCTION__);
+ return FALSE;
+ }
+
timer = (WINPR_TIMER*) Object;
timer->lPeriod = lPeriod; /* milliseconds */
timer->pfnCompletionRoutine = pfnCompletionRoutine;
HANDLE OpenWaitableTimerA(DWORD dwDesiredAccess, BOOL bInheritHandle, LPCSTR lpTimerName)
{
+ /* TODO: Implement */
+ WLog_ERR(TAG, "%s not implemented", __FUNCTION__);
return NULL;
}
HANDLE OpenWaitableTimerW(DWORD dwDesiredAccess, BOOL bInheritHandle, LPCWSTR lpTimerName)
{
+ /* TODO: Implement */
+ WLog_ERR(TAG, "%s not implemented", __FUNCTION__);
return NULL;
}