timer messages impl.

svn path=/trunk/; revision=4482
This commit is contained in:
Gunnar Dalsnes 2003-04-02 23:29:04 +00:00
parent 42f7ce354a
commit 4948893df6
2 changed files with 42 additions and 15 deletions

View file

@ -899,11 +899,11 @@ STDCALL
NtUserIsClipboardFormatAvailable( NtUserIsClipboardFormatAvailable(
DWORD Unknown0); DWORD Unknown0);
DWORD NTSTATUS
STDCALL STDCALL
NtUserKillTimer( NtUserKillTimer(
DWORD Unknown0, HWND hWnd,
DWORD Unknown1); UINT_PTR IDEvent);
DWORD DWORD
STDCALL STDCALL
@ -1415,13 +1415,13 @@ NtUserSetThreadState(
DWORD Unknown0, DWORD Unknown0,
DWORD Unknown1); DWORD Unknown1);
DWORD NTSTATUS
STDCALL STDCALL
NtUserSetTimer( NtUserSetTimer(
DWORD Unknown0, HWND hWnd,
DWORD Unknown1, UINT_PTR * IDEvent,
DWORD Unknown2, UINT Period,
DWORD Unknown3); TIMERPROC TimerFunc);
DWORD DWORD
STDCALL STDCALL

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
/* $Id: timer.c,v 1.4 2002/09/08 10:23:10 chorns Exp $ /* $Id: timer.c,v 1.5 2003/04/02 23:29:04 gdalsnes Exp $
* *
* PROJECT: ReactOS user32.dll * PROJECT: ReactOS user32.dll
* FILE: lib/user32/misc/dde.c * FILE: lib/user32/misc/dde.c
@ -29,6 +29,7 @@
/* INCLUDES ******************************************************************/ /* INCLUDES ******************************************************************/
#include <windows.h> #include <windows.h>
#include <kernel32/error.h>
#include <user32.h> #include <user32.h>
#include <debug.h> #include <debug.h>
@ -38,18 +39,44 @@ WINBOOL
STDCALL STDCALL
KillTimer( KillTimer(
HWND hWnd, HWND hWnd,
UINT_PTR uIDEvent) UINT_PTR IDEvent)
{ {
return FALSE;
NTSTATUS Status;
Status = NtUserKillTimer(hWnd, IDEvent);
if (!NT_SUCCESS(Status))
{
SetLastErrorByStatus(Status);
return FALSE;
}
return TRUE;
} }
UINT_PTR UINT_PTR
STDCALL STDCALL
SetTimer( SetTimer(
HWND hWnd, HWND hWnd,
UINT_PTR nIDEvent, UINT_PTR IDEvent,
UINT uElapse, UINT Period,
TIMERPROC lpTimerFunc) TIMERPROC TimerFunc)
{ {
return (UINT_PTR)0; NTSTATUS Status;
Status = NtUserSetTimer(hWnd, &IDEvent, Period, TimerFunc);
if (!NT_SUCCESS(Status))
{
SetLastErrorByStatus(Status);
return FALSE;
}
if (hWnd == NULL)
return IDEvent;
return TRUE;
} }