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.

337 lines
11 KiB

  1. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2. ;
  3. ; MMDDK.INC - Multimedia assembly language structures & constants
  4. ; for the Development Kit
  5. ;
  6. ; Copyright (c) Microsoft Corporation 1990. All rights reserved
  7. ;
  8. ;
  9. ; If defined, the following flags inhibit inclusion of the indicated items:
  10. ;
  11. ; NOTIMERDEV - The Timer Device
  12. ; NOJOYDEV - The Joystick Device
  13. ;
  14. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  15. ; If defined, the following flags inhibit inclusion
  16. ; of the indicated items:
  17. ;
  18. ; MMNOMIDIDEV - MIDI support
  19. ; MMNOWAVEDEV - Waveform support
  20. ; MMNOAUXDEV - Auxiliary output support
  21. ; MMNOTIMERDEV - Timer support
  22. ; MMNOJOYDEV - Joystick support
  23. ; MMNOMCIDEV - MCI support
  24. ; MMNOTASKDEV - Task support
  25. ;
  26. OFFSEL STRUC
  27. Off dw ?
  28. Sel dw ?
  29. OFFSEL ENDS
  30. LOHI STRUC
  31. Lo dw ?
  32. Hi dw ?
  33. LOHI ENDS
  34. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  35. ;
  36. ; Helper functions for drivers
  37. ;
  38. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  39. DCB_NOSWITCH equ 0008h ; don't switch stacks for callback
  40. DCB_TYPEMASK equ 0007h ; callback type mask
  41. DCB_NULL equ 0000h ; unknown callback type
  42. ; flags for wFlags parameter of DriverCallback()
  43. DCB_WINDOW equ 0001h ; dwCallback is a HWND
  44. DCB_TASK equ 0002h ; dwCallback is a HTASK
  45. DCB_FUNCTION equ 0003h ; dwCallback is a FARPROC
  46. ; device ID for 386 AUTODMA VxD
  47. VADMAD_Device_ID equ 0444h
  48. ifndef MMNOWAVEDEV
  49. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  50. ;
  51. ; Waveform device driver support
  52. ;
  53. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  54. ; maximum number of wave device drivers loaded
  55. MAXWAVEDRIVERS equ 10
  56. ; waveform input and output device open information structure
  57. WAVEOPENDESC struc
  58. wod_hWave dw ? ; handle
  59. wod_lpFormat dd ? ; format of wave data
  60. wod_dwCallback dd ? ; callback
  61. wod_dwInstance dd ? ; app's private instance information
  62. WAVEOPENDESC ends
  63. ; message sent by mmsystem to wodMessage(), widMessage(), modMessage(),
  64. ; and midMessage() when it initializes the wave and midi drivers
  65. DRVM_USER equ 4000h
  66. DRVM_INIT equ 100
  67. WODM_INIT equ DRVM_INIT
  68. WIDM_INIT equ DRVM_INIT
  69. MODM_INIT equ DRVM_INIT
  70. MIDM_INIT equ DRVM_INIT
  71. AUXM_INIT equ DRVM_INIT
  72. ; messages sent to wodMessage() entry-point function
  73. WODM_GETNUMDEVS equ 3
  74. WODM_GETDEVCAPS equ 4
  75. WODM_OPEN equ 5
  76. WODM_CLOSE equ 6
  77. WODM_PREPARE equ 7
  78. WODM_UNPREPARE equ 8
  79. WODM_WRITE equ 9
  80. WODM_PAUSE equ 10
  81. WODM_RESTART equ 11
  82. WODM_RESET equ 12
  83. WODM_GETPOS equ 13
  84. WODM_GETPITCH equ 14
  85. WODM_SETPITCH equ 15
  86. WODM_GETVOLUME equ 16
  87. WODM_SETVOLUME equ 17
  88. WODM_GETPLAYBACKRATE equ 18
  89. WODM_SETPLAYBACKRATE equ 19
  90. WODM_BREAKLOOP equ 20
  91. ; messages sent to widMessage() entry-point function
  92. WIDM_GETNUMDEVS equ 50
  93. WIDM_GETDEVCAPS equ 51
  94. WIDM_OPEN equ 52
  95. WIDM_CLOSE equ 53
  96. WIDM_PREPARE equ 54
  97. WIDM_UNPREPARE equ 55
  98. WIDM_ADDBUFFER equ 56
  99. WIDM_START equ 57
  100. WIDM_STOP equ 58
  101. WIDM_RESET equ 59
  102. WIDM_GETPOS equ 60
  103. endif ;ifndef MMNOWAVEDEV
  104. ifndef MMNOMIDIDEV
  105. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  106. ;
  107. ; MIDI device driver support
  108. ;
  109. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  110. ; maximum number of MIDI device drivers loaded
  111. MAXMIDIDRIVERS equ 10
  112. ; MIDI input and output device open information structure
  113. MIDIOPENDESC struc
  114. mod_hMidi dw ? ; handle
  115. mod_dwCallback dd ? ; callback
  116. mod_dwInstance dd ? ; app's private instance information
  117. MIDIOPENDESC ends
  118. ; messages sent to modMessage() entry-point function
  119. MODM_GETNUMDEVS equ 1
  120. MODM_GETDEVCAPS equ 2
  121. MODM_OPEN equ 3
  122. MODM_CLOSE equ 4
  123. MODM_PREPARE equ 5
  124. MODM_UNPREPARE equ 6
  125. MODM_DATA equ 7
  126. MODM_LONGDATA equ 8
  127. MODM_RESET equ 9
  128. MODM_GETVOLUME equ 10
  129. MODM_SETVOLUME equ 11
  130. MODM_CACHEPATCHES equ 12
  131. MODM_CACHEDRUMPATCHES equ 13
  132. ; messages sent to midMessage() entry-point function
  133. MIDM_GETNUMDEVS equ 53
  134. MIDM_GETDEVCAPS equ 54
  135. MIDM_OPEN equ 55
  136. MIDM_CLOSE equ 56
  137. MIDM_PREPARE equ 57
  138. MIDM_UNPREPARE equ 58
  139. MIDM_ADDBUFFER equ 59
  140. MIDM_START equ 60
  141. MIDM_STOP equ 61
  142. MIDM_RESET equ 62
  143. endif ;ifndef MMNOMIDIDEV
  144. ifndef MMNOAUXDEV
  145. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  146. ;
  147. ; Auxiliary audio device driver support
  148. ;
  149. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  150. ; maximum number of auxiliary device drivers loaded
  151. MAXAUXDRIVERS equ 10
  152. ; messages sent to auxMessage() entry-point function
  153. AUXDM_GETNUMDEVS equ 3
  154. AUXDM_GETDEVCAPS equ 4
  155. AUXDM_GETVOLUME equ 5
  156. AUXDM_SETVOLUME equ 6
  157. endif ;ifndef MMNOAUXDEV
  158. ifndef MMNOTIMERDEV
  159. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  160. ;
  161. ; Timer device driver support
  162. ;
  163. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  164. TIMEREVENT struc
  165. te_wDelay dw ? ; delay required
  166. te_wResolution dw ? ; resolution required
  167. te_lpFunction dd ? ; ptr to callback function
  168. te_dwUser dd ? ; user DWORD
  169. te_wFlags dw ? ; defines how to program event
  170. TIMEREVENT ends
  171. ; messages sent to tddMessage() function
  172. TDD_KILLTIMEREVENT equ DRV_RESERVED+0 ; indices into a table of
  173. TDD_SETTIMEREVENT equ DRV_RESERVED+4 ; functions; thus offset by
  174. TDD_GETSYSTEMTIME equ DRV_RESERVED+8 ; four each time...
  175. TDD_GETDEVCAPS equ DRV_RESERVED+12 ; room for future expansion
  176. TDD_BEGINMINPERIOD equ DRV_RESERVED+16 ; room for future expansion
  177. TDD_ENDMINPERIOD equ DRV_RESERVED+20 ; room for future expansion
  178. endif ;ifndef MMNOTIMERDEV
  179. ifndef MMNOJOYDEV
  180. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  181. ;
  182. ; Joystick device driver support
  183. ;
  184. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  185. ; joystick calibration info structure
  186. JOYCALIBRATE struc
  187. jcal_wXbase dw ?
  188. jcal_wXdelta dw ?
  189. jcal_wYbase dw ?
  190. jcal_wYdelta dw ?
  191. jcal_wZbase dw ?
  192. jcal_wZdelta dw ?
  193. JOYCALIBRATE ends
  194. ; messages sent to joystick driver's DriverProc() function
  195. JDD_GETNUMDEVS equ DRV_RESERVED+0001h
  196. JDD_GETDEVCAPS equ DRV_RESERVED+0002h
  197. JDD_GETPOS equ DRV_RESERVED+0101h
  198. JDD_SETCALIBRATION equ DRV_RESERVED+0102h
  199. endif ;ifndef MMNOJOYDEV
  200. ifndef MMNOMCIDEV
  201. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  202. ;
  203. ; MCI device driver support
  204. ;
  205. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  206. ; internal MCI messages
  207. MCI_OPEN_DRIVER equ 0801h
  208. MCI_CLOSE_DRIVER equ 0802h
  209. MAKEMCIRESOURCE MACRO a,b
  210. mov ax,a
  211. mov dx,b
  212. ENDM
  213. ; string return values only used with MAKEMCIRESOURCE
  214. MCI_FALSE equ (MCI_STRING_OFFSET + 19)
  215. MCI_TRUE equ (MCI_STRING_OFFSET + 20)
  216. ; resource string return values
  217. MCI_FORMAT_RETURN_BASE equ MCI_FORMAT_MILLISECONDS_S
  218. MCI_FORMAT_MILLISECONDS_S equ (MCI_STRING_OFFSET + 21)
  219. MCI_FORMAT_HMS_S equ (MCI_STRING_OFFSET + 22)
  220. MCI_FORMAT_MSF_S equ (MCI_STRING_OFFSET + 23)
  221. MCI_FORMAT_FRAMES_S equ (MCI_STRING_OFFSET + 24)
  222. MCI_FORMAT_SMPTE_24_S equ (MCI_STRING_OFFSET + 25)
  223. MCI_FORMAT_SMPTE_25_S equ (MCI_STRING_OFFSET + 26)
  224. MCI_FORMAT_SMPTE_30_S equ (MCI_STRING_OFFSET + 27)
  225. MCI_FORMAT_SMPTE_30DROP_S equ (MCI_STRING_OFFSET + 28)
  226. MCI_FORMAT_BYTES_S equ (MCI_STRING_OFFSET + 29)
  227. MCI_FORMAT_SAMPLES_S equ (MCI_STRING_OFFSET + 30)
  228. MCI_FORMAT_TMSF_S equ (MCI_STRING_OFFSET + 31)
  229. MCI_VD_FORMAT_TRACK_S equ (MCI_VD_OFFSET + 5)
  230. WAVE_FORMAT_PCM_S equ (MCI_WAVE_OFFSET + 0)
  231. WAVE_MAPPER_S equ (MCI_WAVE_OFFSET + 1)
  232. MCI_SEQ_MAPPER_S equ (MCI_SEQ_OFFSET + 5)
  233. MCI_SEQ_FILE_S equ (MCI_SEQ_OFFSET + 6)
  234. MCI_SEQ_MIDI_S equ (MCI_SEQ_OFFSET + 7)
  235. MCI_SEQ_SMPTE_S equ (MCI_SEQ_OFFSET + 8)
  236. MCI_SEQ_FORMAT_SONGPTR_S equ (MCI_SEQ_OFFSET + 9)
  237. MCI_SEQ_NONE_S equ (MCI_SEQ_OFFSET + 10)
  238. MIDIMAPPER_S equ (MCI_SEQ_OFFSET + 11)
  239. ; parameters for internal version of MCI_OPEN message sent from
  240. ; mciOpenDevice() to the driver
  241. MCI_OPEN_DRIVER_PARMS struc
  242. mciodrv_wDeviceID dw ? ; device ID
  243. mciodrv_lpstrParams dw ? ; parameter string for entry in SYSTEM.INI
  244. mciodrv_wCustomCommandTable dw ? ; custom command table (0FFFFh if none)
  245. ; filled in by the driver
  246. mciodrv_wType dw ? ; driver type filled in by the driver
  247. MCI_OPEN_DRIVER_PARMS ends
  248. ; maximum length of an MCI device type
  249. MCI_MAX_DEVICE_TYPE_LENGTH equ 80
  250. ; flags for mciSendCommandInternal() which direct mciSendString() how to
  251. ; interpret the return value
  252. MCI_RESOURCE_RETURNED equ 00010000h ; resource ID
  253. MCI_COLONIZED3_RETURN equ 00020000h ; colonized ID, 3 bytes data
  254. MCI_COLONIZED4_RETURN equ 00040000h ; colonized ID, 4 bytes data
  255. MCI_INTEGER_RETURNED equ 00080000h ; integer conversion needed
  256. MCI_RESOURCE_DRIVER equ 00100000h ; driver owns returned resource
  257. ; invalid command table ID
  258. MCI_NO_COMMAND_TABLE equ 0FFFFh
  259. ; command table information type tags
  260. MCI_COMMAND_HEAD equ 0
  261. MCI_STRING equ 1
  262. MCI_INTEGER equ 2
  263. MCI_END_COMMAND equ 3
  264. MCI_RETURN equ 4
  265. MCI_FLAG equ 5
  266. MCI_END_COMMAND_LIST equ 6
  267. MCI_RECT equ 7
  268. MCI_CONSTANT equ 8
  269. MCI_END_CONSTANT equ 9
  270. endif ;ifndef MMNOMCIDEV
  271. ifndef MMNOTASKDEV
  272. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  273. ;
  274. ; Task support
  275. ;
  276. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  277. ; error return values
  278. TASKERR_NOTASKSUPPORT equ 1
  279. TASKERR_OUTOFMEMORY equ 2
  280. endif ;ifndef MMNOTASKDEV