Leaked source code of windows server 2003
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.

341 lines
12 KiB

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