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.

179 lines
4.8 KiB

  1. /*****************************************************************************
  2. //;
  3. // VTDAPI.INC
  4. //;
  5. // VTDAPI service equates and structures
  6. //;
  7. *****************************************************************************/
  8. #define MULTIMEDIA_OEM_ID 0x0440 // MS Reserved OEM # 34
  9. #define VTDAPI_DEVICE_ID MULTIMEDIA_OEM_ID + 2 // VTD API Device
  10. /* VTDAPI_Get_Version
  11. //;
  12. // ENTRY:
  13. // AX = 0
  14. // ES:BX = pointer to VTDAPI_Get_Version_Parameters structure
  15. //
  16. // RETURNS:
  17. // SUCCESS: AX == TRUE
  18. // ERROR: AX == FALSE
  19. */
  20. #define VTDAPI_Get_Version 0
  21. /* VTDAPI_Begin_Min_Int_Period
  22. //;
  23. // ENTRY:
  24. // AX = 1
  25. // CX = interrupt period in ms
  26. //
  27. // RETURNS:
  28. // SUCCESS: AX != 0
  29. // ERROR: AX == 0
  30. */
  31. #define VTDAPI_Begin_Min_Int_Period 1
  32. /* VTDAPI_End_Min_Int_Period
  33. //;
  34. // ENTRY:
  35. // AX = 2
  36. // ES:BX = pointer to word interrupt period in ms
  37. //;
  38. // RETURNS:
  39. // SUCCESS: AX == TIMERR_NOERROR
  40. // ERROR: AX == TIMERR_NOCANDO
  41. */
  42. #define VTDAPI_End_Min_Int_Period 2
  43. /* VTDAPI_Get_Int_Period
  44. //;
  45. // ENTRY:
  46. // AX = 3
  47. //;
  48. // RETURNS:
  49. // DX:AX = current period (resolution) in ms
  50. */
  51. #define VTDAPI_Get_Int_Period 3
  52. /* VTDAPI_Get_Sys_Time
  53. //;
  54. // ENTRY:
  55. // AX = 4
  56. //;
  57. // RETURNS:
  58. // DX:AX = current time in ms
  59. */
  60. #define VTDAPI_Get_Sys_Time 4
  61. /* VTDAPI_Timer_Start
  62. //;
  63. // ENTRY:
  64. // AX = 5
  65. // ES:BX = pointer to VTDAPI_Timer_Parameters structure
  66. //;
  67. // RETURNS:
  68. // SUCCESS: AX != 0, 16 bit timer handle
  69. // ERROR: AX == 0
  70. */
  71. #define VTDAPI_Timer_Start 5
  72. /* VTDAPI_Timer_Stop
  73. //;
  74. // ENTRY:
  75. // AX = 6
  76. // CX = 16 bit timer handle from VTDAPI_Timer_Start
  77. //;
  78. // RETURNS:
  79. // SUCCESS: AX == TIMERR_NOERROR
  80. // ERROR: AX == TIMERR_NOCANDO, invalid timer handle
  81. */
  82. #define VTDAPI_Timer_Stop 6
  83. /* VTDAPI_Start_User_Timer
  84. //;
  85. // ENTRY:
  86. // AX = 7
  87. // ES:BX = pointer to VTDAPI_Timer_Parameters structure
  88. //;
  89. // RETURNS:
  90. // SUCCESS: EAX != 0, 32 bit timer handle
  91. // ERROR: EAX == 0
  92. */
  93. #define VTDAPI_Start_User_Timer 7
  94. /* VTDAPI_Stop_User_Timer
  95. //;
  96. // ENTRY:
  97. // AX = 8
  98. // ES:BX = pointer to 32 bit timer handle from VTDAPI_Start_User_Timer
  99. //;
  100. // RETURNS:
  101. // SUCCESS: AX == 0
  102. // ERROR: AX != 0
  103. */
  104. #define VTDAPI_Stop_User_Timer 8
  105. /* VTDAPI_Get_System_Time_Selector
  106. //;
  107. // ENTRY:
  108. // AX = 9
  109. //;
  110. // RETURNS:
  111. // SUCCESS: AX = R/O selector to a dword of running ms
  112. // ERROR: AX == 0
  113. */
  114. #define VTDAPI_Get_System_Time_Selector 9
  115. /* VTDAPI_Cleanup_Timers
  116. //;
  117. // ENTRY:
  118. // AX = 10
  119. // CX = CS selector
  120. //;
  121. // RETURNS:
  122. // NONE
  123. */
  124. #define VTDAPI_Cleanup_Timers 10
  125. typedef struct VTDAPI_Get_Version_Parameters {
  126. DWORD VTDAPI_Version;
  127. DWORD VTDAPI_Min_Period;
  128. DWORD VTDAPI_Max_Period;
  129. } VTDAPI_Get_Version_Parameters;
  130. typedef struct VTDAPI_Timer_Parameters {
  131. WORD VTDAPI_Timer_Period;
  132. WORD VTDAPI_Timer_Resolution;
  133. DWORD VTDAPI_Timer_IPCS;
  134. DWORD VTDAPI_Timer_Inst;
  135. WORD VTDAPI_Timer_Flags;
  136. DWORD VTDAPI_Timer_Ring0_Thread; /* ;Internal */
  137. DWORD VTDAPI_Timer_Handle; /* ;Internal */
  138. } VTDAPI_Timer_Parameters;
  139. #ifndef TIME_ONESHOT
  140. #define TIME_ONESHOT 0x0000 // program timer for single event
  141. #define TIME_PERIODIC 0x0001 // program for continuous periodic event
  142. #endif
  143. #define TIME_PERIODIC_BIT 0x00 /* ;Internal */
  144. #define TIME_SYSCB 0x0002 // use windows timer events /* ;Internal */
  145. #define TIME_EVENT_SET 0x0010 // Set event /* ;Internal */
  146. #define TIME_EVENT_PULSE 0x0020 // Pulse event /* ;Internal */
  147. #define TIME_APC 0x0040 // APC callback /* ;Internal */
  148. #define TIME_VALID_FLAGS 0x0073 // Valid flags /* ;Internal */
  149. #ifndef TIMERR_BASE
  150. #define TIMERR_BASE 96
  151. #define TIMERR_NOERROR 0 // no error
  152. #define TIMERR_NOCANDO (TIMERR_BASE+1) // the operation wasn't executed
  153. #endif
  154. #define VTDAPI_IOCTL_Get_Version 0 /* ;Internal */
  155. #define VTDAPI_IOCTL_Get_Resolution 1 /* ;Internal */
  156. #define VTDAPI_IOCTL_Begin_Min_Int_Period 2 /* ;Internal */
  157. #define VTDAPI_IOCTL_End_Min_Int_Period 3 /* ;Internal */
  158. #define VTDAPI_IOCTL_Get_Int_Period 4 /* ;Internal */
  159. #define VTDAPI_IOCTL_Get_Sys_Time 5 /* ;Internal */
  160. #define VTDAPI_IOCTL_Timer_Start 6 /* ;Internal */
  161. #define VTDAPI_IOCTL_Timer_Stop 7 /* ;Internal */
  162. #define VTDAPI_IOCTL_Timer_Rundown 8 /* ;Internal */