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.

52 lines
1.4 KiB

  1. #ifndef __UTIL_H
  2. #define __UTIL_H
  3. void ErrorOut( void );
  4. #define ALG_IFC_BOUNDARY(_Type) \
  5. ((_Type) & eALG_BOUNDARY)
  6. #define ALG_IFC_PRIVATE(_Type) \
  7. ((_Type) & eALG_PRIVATE)
  8. #define ALG_IFC_FW(_Type) \
  9. ((_Type) & eALG_FIREWALLED)
  10. #define NEW_OBJECT( _X_, _Y_ ) \
  11. __try \
  12. { \
  13. (_X_) = new (_Y_); \
  14. } \
  15. __except( EXCEPTION_EXECUTE_HANDLER ) \
  16. { \
  17. DbgPrintX("ALLOCATION ERROR Line %s, File %s", __LINE__, __LINE__); \
  18. delete _X_; \
  19. _X_ = NULL; \
  20. }
  21. typedef struct _TIMER_CONTEXT {
  22. HANDLE TimerQueueHandle;
  23. HANDLE TimerHandle;
  24. ULONG uContext;
  25. } TIMER_CONTEXT, *PTIMER_CONTEXT;
  26. typedef enum _TIMER_DELETION
  27. {
  28. eTIMER_DELETION_ASYNC = 0x00,
  29. eTIMER_DELETION_SYNC = 0x01
  30. } TIMER_DELETION;
  31. #define TIMER_DELETION_ASYNC NULL
  32. #define TIMER_DELETION_SYNC
  33. PTIMER_CONTEXT
  34. AllocateAndSetTimer(
  35. ULONG uContext,
  36. ULONG timeOut,
  37. WAITORTIMERCALLBACK Callbackp
  38. );
  39. extern HANDLE g_TimerQueueHandle;
  40. #endif