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.

63 lines
1.8 KiB

  1. /*++ BUILD Version: 0001 // Increment this if a change has global effects
  2. Copyright (c) 1992-1999 Microsoft Corporation
  3. Module Name:
  4. ntddtime.h
  5. Abstract:
  6. This include file defines all constants and types for
  7. accessing an NT wave device.
  8. Author:
  9. Robin Speed (RobinSp) 30-Jan-92
  10. Revision History:
  11. --*/
  12. #ifndef _NTDDTIME_
  13. #define _NTDDTIME_
  14. #if _MSC_VER > 1000
  15. #pragma once
  16. #endif
  17. #ifdef __cplusplus
  18. extern "C" {
  19. #endif
  20. #define FILE_DEVICE_TIME 0x00000026
  21. //
  22. // Timer IOCTLs
  23. //
  24. #define IOCTL_TIMER_SET_TIMER_EVENT CTL_CODE(FILE_DEVICE_TIME, FILE_DEVICE_TIME + 0x0001, METHOD_BUFFERED, FILE_WRITE_DATA)
  25. #define IOCTL_TIMER_GET_TIME CTL_CODE(FILE_DEVICE_TIME, FILE_DEVICE_TIME + 0x0002, METHOD_NEITHER, FILE_WRITE_DATA)
  26. #define IOCTL_TIMER_GET_DEV_CAPS CTL_CODE(FILE_DEVICE_TIME, FILE_DEVICE_TIME + 0x0003, METHOD_BUFFERED, FILE_WRITE_DATA)
  27. #define IOCTL_TIMER_BEGIN_MIN_PERIOD CTL_CODE(FILE_DEVICE_TIME, FILE_DEVICE_TIME + 0x0004, METHOD_NEITHER, FILE_WRITE_DATA)
  28. #define IOCTL_TIMER_END_MIN_PERIOD CTL_CODE(FILE_DEVICE_TIME, FILE_DEVICE_TIME + 0x0005, METHOD_BUFFERED, FILE_WRITE_DATA)
  29. #define IOCTL_TIMER_RESET CTL_CODE(FILE_DEVICE_TIME, FILE_DEVICE_TIME + 0x0006, METHOD_BUFFERED, FILE_WRITE_DATA)
  30. #define IOCTL_TIMER_RESET_EVENT CTL_CODE(FILE_DEVICE_TIME, FILE_DEVICE_TIME + 0x0007, METHOD_NEITHER, FILE_WRITE_DATA)
  31. #define DD_TIMER_DEVICE_NAME_U L"\\Device\\Timer"
  32. #define IO_TIMER_INCREMENT 8
  33. typedef struct {
  34. ULONG EventTime; // Time in ms for event
  35. ULONG EventId; // Id (cannot be 0)
  36. LARGE_INTEGER EventTicks; // Driver use (not seen by caller)
  37. } TIMER_DD_SET_EVENT, *PTIMER_DD_SET_EVENT;
  38. #ifdef __cplusplus
  39. }
  40. #endif
  41. #endif // _NTDDTIME_