Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

usergdi.c File Reference

#include "precomp.h"

Go to the source code of this file.

Functions

UINT_PTR UserSetTimer (UINT dwElapse, PVOID pTimerFunc)
VOID UserKillTimer (UINT_PTR nID)


Function Documentation

VOID UserKillTimer UINT_PTR  nID  ) 
 

Definition at line 72 of file usergdi.c.

References KILLRITTIMER, NULL, and VOID().

00073 { 00074 /* 00075 * GDI may call during ChangeDisplaySettings, in which case the 00076 * critical section will already be held. GDI may also call any 00077 * time its PDEV reference counts go to zero, in which case the 00078 * critical section will not already be held. 00079 */ 00080 BEGIN_REENTERCRIT(); 00081 00082 KILLRITTIMER(NULL, nID); 00083 00084 END_REENTERCRIT(); 00085 }

UINT_PTR UserSetTimer UINT  dwElapse,
PVOID  pTimerFunc
 

Definition at line 24 of file usergdi.c.

References FALSE, FindTimer(), gptmrMaster, InternalSetTimer(), NULL, tagTIMER::ptiOptCreator, and TIMERPROC_PWND.

00025 { 00026 UINT_PTR id = 0; 00027 PTIMER ptmr; 00028 00029 /* 00030 * GDI may call during ChangeDisplaySettings, in which case the 00031 * critical section will already be held. GDI may also call during 00032 * CreateDC("Device"), in which case the critical section will not 00033 * already be held. 00034 */ 00035 BEGIN_REENTERCRIT(); 00036 00037 /* 00038 * If the RIT hasn't been started yet, let GDI know this by returning 00039 * failure. Once we've initialized the RIT, we'll let GDI know 00040 * that GDI can start its timers by calling GreStartTimers(). 00041 */ 00042 if (gptmrMaster) { 00043 00044 id = InternalSetTimer(NULL, 0, dwElapse, (TIMERPROC_PWND) pTimerFunc, TMRF_RIT); 00045 00046 /* 00047 * We don't want cleanup to be done on thread termination. Rather 00048 * than creating a new flag and adding more code to InternalSetTimer, 00049 * we disable cleanup by modifying the timer directly. 00050 */ 00051 if (id) { 00052 00053 ptmr = FindTimer(NULL, id, TMRF_RIT, FALSE); 00054 00055 UserAssert(ptmr); 00056 00057 ptmr->ptiOptCreator = NULL; 00058 } 00059 } 00060 00061 END_REENTERCRIT(); 00062 00063 return id; 00064 }


Generated on Sat May 15 19:45:58 2004 for test by doxygen 1.3.7