This method of the IUserEventTimer interface destroys a user event timer.


KillUserEventTimer (
    HWND hWnd,
    ULONG uUserEventTimerID);


The hWnd and uUserEventTimerID arguments identify the timer.

Return Value

The function returns zero for success, else an error code.


If the internal timer is not yet initialised (which should not ordinarily be possible by the time this interface method can be called), the function fails, returning E_FAIL.

If the combination of hWnd and uUserEventTimerID does not identify a timer as set already through the SetUserEventTimer method, the function fails, returning E_FAIL.

Otherwise, the function destroys the given user event timer, and if this leaves no more user event timers, then the function also kills the internal timer.