Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
1018 B

  1. /*++
  2. Copyright (c) 1996,1997 Microsoft Corporation
  3. Module Name:
  4. MYTIMER.H
  5. Abstract:
  6. Include For
  7. Handle adjusting timer resolution for throttling and do thread pool
  8. Author:
  9. Aaron Ogus (aarono)
  10. Environment:
  11. Win32
  12. Revision History:
  13. Date Author Description
  14. ====== ====== ============================================================
  15. 6/04/98 aarono Original
  16. --*/
  17. typedef void CALLBACK MYTIMERCALLBACK (UINT_PTR uID, UINT uMsg, DWORD_PTR dwUser, DWORD dw1, DWORD dw2);
  18. typedef enum _TimerState {
  19. NotInUse,
  20. WaitingForTimeout,
  21. QueuedForThread,
  22. InCallBack,
  23. End
  24. } eTimerState;
  25. typedef struct _MyTimer {
  26. BILINK Bilink;
  27. eTimerState TimerState;
  28. DWORD TimeOut;
  29. DWORD_PTR Context;
  30. MYTIMERCALLBACK *CallBack;
  31. DWORD Unique;
  32. } MYTIMER, *PMYTIMER;
  33. DWORD_PTR SetMyTimer(DWORD dwTimeOut, DWORD TimerRes, MYTIMERCALLBACK TimerCallBack, DWORD_PTR UserContext, PUINT pUnique);
  34. HRESULT InitTimerWorkaround();
  35. VOID FiniTimerWorkaround();
  36. HRESULT CancelMyTimer(DWORD_PTR pTimer, DWORD Unique);