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.

3986 lines
155 KiB

  1. /*==========================================================================
  2. *
  3. * mmsystem.h -- Include file for Multimedia API's
  4. * mmsysp.h -- Internal include file for Multimedia API's // ;internal
  5. *
  6. * Version 4.00
  7. *
  8. * Copyright (C) 1992-1995 Microsoft Corporation. All Rights Reserved.
  9. *
  10. *--------------------------------------------------------------------------
  11. *
  12. * Define: Prevent inclusion of:
  13. * -------------- --------------------------------------------------------
  14. * MMNODRV Installable driver support
  15. * MMNOSOUND Sound support
  16. * MMNOWAVE Waveform support
  17. * MMNOMIDI MIDI support
  18. * MMNOAUX Auxiliary audio support
  19. * MMNOMIXER Mixer support
  20. * MMNOTIMER Timer support
  21. * MMNOJOY Joystick support
  22. * MMNOMCI MCI support
  23. * MMNOMMIO Multimedia file I/O support
  24. * MMNOMMSYSTEM General MMSYSTEM functions
  25. *
  26. *==========================================================================
  27. */
  28. #ifndef _INC_MMSYSTEM
  29. #define _INC_MMSYSTEM /* #defined if mmsystem.h has been included */
  30. #ifndef _INC_MMSYSP // ;internal
  31. #define _INC_MMSYSP // ;internal
  32. #ifdef _WIN32
  33. #include <pshpack1.h>
  34. #else
  35. #ifndef RC_INVOKED
  36. #pragma pack(1)
  37. #endif
  38. #endif
  39. #ifdef __cplusplus
  40. extern "C" { /* Assume C declarations for C++ */
  41. #endif /* __cplusplus */
  42. #ifdef _WIN32
  43. #ifndef _WINMM_
  44. #define WINMMAPI DECLSPEC_IMPORT
  45. #else
  46. #define WINMMAPI
  47. #endif
  48. #define _loadds
  49. #define _huge
  50. #else
  51. #define WINMMAPI
  52. #endif
  53. #ifdef BUILDDLL // ;internal
  54. #undef WINAPI // ;internal
  55. #define WINAPI _loadds FAR PASCAL // ;internal
  56. #undef CALLBACK // ;internal
  57. #define CALLBACK _loadds FAR PASCAL // ;internal
  58. #endif /* ifdef BUILDDLL */ // ;internal
  59. #ifdef _WIN32_VXD
  60. #define NEAR
  61. #define FAR
  62. #define DECLARE_HANDLE(x) typedef WORD x
  63. #define WINAPI
  64. typedef DWORD LPSTR;
  65. typedef DWORD LPVOID;
  66. typedef DWORD LPCSTR;
  67. typedef DWORD LPCWSTR;
  68. typedef DWORD LRESULT;
  69. typedef DWORD LPARAM;
  70. typedef DWORD WPARAM;
  71. typedef short WCHAR;
  72. #endif
  73. /****************************************************************************
  74. General constants and data types
  75. ****************************************************************************/
  76. /* general constants */
  77. #define MAXPNAMELEN 32 /* max product name length (including NULL) */
  78. #define MAXERRORLENGTH 256 /* max error text length (including NULL) */
  79. #define MAX_JOYSTICKOEMVXDNAME 260 /* max oem vxd name length (including NULL) */
  80. /*
  81. * Microsoft Manufacturer and Product ID's (these have been moved to
  82. * MMREG.H for Windows 4.00 and above).
  83. */
  84. #if (WINVER <= 0x030A)
  85. #ifndef MM_MICROSOFT
  86. #define MM_MICROSOFT 1 /* Microsoft Corporation */
  87. #endif
  88. #ifndef MM_MIDI_MAPPER
  89. #define MM_MIDI_MAPPER 1 /* MIDI Mapper */
  90. #define MM_WAVE_MAPPER 2 /* Wave Mapper */
  91. #define MM_SNDBLST_MIDIOUT 3 /* Sound Blaster MIDI output port */
  92. #define MM_SNDBLST_MIDIIN 4 /* Sound Blaster MIDI input port */
  93. #define MM_SNDBLST_SYNTH 5 /* Sound Blaster internal synthesizer */
  94. #define MM_SNDBLST_WAVEOUT 6 /* Sound Blaster waveform output */
  95. #define MM_SNDBLST_WAVEIN 7 /* Sound Blaster waveform input */
  96. #define MM_ADLIB 9 /* Ad Lib-compatible synthesizer */
  97. #define MM_MPU401_MIDIOUT 10 /* MPU401-compatible MIDI output port */
  98. #define MM_MPU401_MIDIIN 11 /* MPU401-compatible MIDI input port */
  99. #define MM_PC_JOYSTICK 12 /* Joystick adapter */
  100. #endif
  101. #endif
  102. /* general data types */
  103. #ifdef _WIN32
  104. typedef UINT MMVERSION; /* major (high byte), minor (low byte) */
  105. #else
  106. typedef UINT VERSION; /* major (high byte), minor (low byte) */
  107. #endif
  108. typedef UINT MMRESULT; /* error return code, 0 means no error */
  109. /* call as if(err=xxxx(...)) Error(err); else */
  110. #define _MMRESULT_
  111. typedef UINT FAR *LPUINT;
  112. /* MMTIME data structure */
  113. typedef struct mmtime_tag
  114. {
  115. UINT wType; /* indicates the contents of the union */
  116. union
  117. {
  118. DWORD ms; /* milliseconds */
  119. DWORD sample; /* samples */
  120. DWORD cb; /* byte count */
  121. DWORD ticks; /* ticks in MIDI stream */
  122. /* SMPTE */
  123. struct
  124. {
  125. BYTE hour; /* hours */
  126. BYTE min; /* minutes */
  127. BYTE sec; /* seconds */
  128. BYTE frame; /* frames */
  129. BYTE fps; /* frames per second */
  130. BYTE dummy; /* pad */
  131. #ifdef _WIN32
  132. BYTE pad[2];
  133. #endif
  134. } smpte;
  135. /* MIDI */
  136. struct
  137. {
  138. DWORD songptrpos; /* song pointer position */
  139. } midi;
  140. } u;
  141. } MMTIME, *PMMTIME, NEAR *NPMMTIME, FAR *LPMMTIME;
  142. /* types for wType field in MMTIME struct */
  143. #define TIME_MS 0x0001 /* time in milliseconds */
  144. #define TIME_SAMPLES 0x0002 /* number of wave samples */
  145. #define TIME_BYTES 0x0004 /* current byte offset */
  146. #define TIME_SMPTE 0x0008 /* SMPTE time */
  147. #define TIME_MIDI 0x0010 /* MIDI time */
  148. #define TIME_TICKS 0x0020 /* Ticks within MIDI stream */
  149. /*
  150. *
  151. *
  152. */
  153. #define MAKEFOURCC(ch0, ch1, ch2, ch3) \
  154. ((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) | \
  155. ((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24 ))
  156. /****************************************************************************
  157. Multimedia Extensions Window Messages
  158. ****************************************************************************/
  159. /* Multimedia messages */ // ;internal
  160. #define WM_MM_RESERVED_FIRST 0x03A0 // ;internal
  161. #define WM_MM_RESERVED_LAST 0x03DF // ;internal
  162. #define MM_JOY1MOVE 0x3A0 /* joystick */
  163. #define MM_JOY2MOVE 0x3A1
  164. #define MM_JOY1ZMOVE 0x3A2
  165. #define MM_JOY2ZMOVE 0x3A3
  166. #define MM_JOY1BUTTONDOWN 0x3B5
  167. #define MM_JOY2BUTTONDOWN 0x3B6
  168. #define MM_JOY1BUTTONUP 0x3B7
  169. #define MM_JOY2BUTTONUP 0x3B8
  170. #define MM_MCINOTIFY 0x3B9 /* MCI */
  171. /* 0x3BA is open */ // ;internal
  172. #define MM_WOM_OPEN 0x3BB /* waveform output */
  173. #define MM_WOM_CLOSE 0x3BC
  174. #define MM_WOM_DONE 0x3BD
  175. #define MM_WIM_OPEN 0x3BE /* waveform input */
  176. #define MM_WIM_CLOSE 0x3BF
  177. #define MM_WIM_DATA 0x3C0
  178. #define MM_MIM_OPEN 0x3C1 /* MIDI input */
  179. #define MM_MIM_CLOSE 0x3C2
  180. #define MM_MIM_DATA 0x3C3
  181. #define MM_MIM_LONGDATA 0x3C4
  182. #define MM_MIM_ERROR 0x3C5
  183. #define MM_MIM_LONGERROR 0x3C6
  184. #define MM_MOM_OPEN 0x3C7 /* MIDI output */
  185. #define MM_MOM_CLOSE 0x3C8
  186. #define MM_MOM_DONE 0x3C9
  187. #if (WINVER < 0x400) // ;internal
  188. #define MM_MCISYSTEM_STRING 0x3CA // ;internal
  189. #endif // ;internal
  190. /* these are also in msvideo.h */
  191. #ifndef MM_DRVM_OPEN
  192. #define MM_DRVM_OPEN 0x3D0 /* installable drivers */
  193. #define MM_DRVM_CLOSE 0x3D1
  194. #define MM_DRVM_DATA 0x3D2
  195. #define MM_DRVM_ERROR 0x3D3
  196. #endif
  197. /* these are used by msacm.h */
  198. #define MM_STREAM_OPEN 0x3D4
  199. #define MM_STREAM_CLOSE 0x3D5
  200. #define MM_STREAM_DONE 0x3D6
  201. #define MM_STREAM_ERROR 0x3D7
  202. #if(WINVER >= 0x0400)
  203. #define MM_MOM_POSITIONCB 0x3CA /* Callback for MEVT_POSITIONCB */
  204. #ifndef MM_MCISIGNAL
  205. #define MM_MCISIGNAL 0x3CB
  206. #endif
  207. #define MM_MIM_MOREDATA 0x3CC /* MIM_DONE w/ pending events */
  208. /* 0x3CF is open */ // ;internal
  209. #endif /* WINVER >= 0x0400 */
  210. #define MM_MIXM_LINE_CHANGE 0x3D0 /* mixer line change notify */
  211. #define MM_MIXM_CONTROL_CHANGE 0x3D1 /* mixer control change notify */
  212. /* 3D8 - 3DF are reserved for Haiku */ // ;internal
  213. /****************************************************************************
  214. String resource number bases (internal use)
  215. ****************************************************************************/
  216. #define MMSYSERR_BASE 0
  217. #define WAVERR_BASE 32
  218. #define MIDIERR_BASE 64
  219. #define TIMERR_BASE 96
  220. #define JOYERR_BASE 160
  221. #define MCIERR_BASE 256
  222. #define MIXERR_BASE 1024
  223. #define MCI_STRING_OFFSET 512
  224. #define MCI_VD_OFFSET 1024
  225. #define MCI_CD_OFFSET 1088
  226. #define MCI_WAVE_OFFSET 1152
  227. #define MCI_SEQ_OFFSET 1216
  228. /****************************************************************************
  229. General error return values
  230. ****************************************************************************/
  231. /* general error return values */
  232. #define MMSYSERR_NOERROR 0 /* no error */
  233. #define MMSYSERR_ERROR (MMSYSERR_BASE + 1) /* unspecified error */
  234. #define MMSYSERR_BADDEVICEID (MMSYSERR_BASE + 2) /* device ID out of range */
  235. #define MMSYSERR_NOTENABLED (MMSYSERR_BASE + 3) /* driver failed enable */
  236. #define MMSYSERR_ALLOCATED (MMSYSERR_BASE + 4) /* device already allocated */
  237. #define MMSYSERR_INVALHANDLE (MMSYSERR_BASE + 5) /* device handle is invalid */
  238. #define MMSYSERR_NODRIVER (MMSYSERR_BASE + 6) /* no device driver present */
  239. #define MMSYSERR_NOMEM (MMSYSERR_BASE + 7) /* memory allocation error */
  240. #define MMSYSERR_NOTSUPPORTED (MMSYSERR_BASE + 8) /* function isn't supported */
  241. #define MMSYSERR_BADERRNUM (MMSYSERR_BASE + 9) /* error value out of range */
  242. #define MMSYSERR_INVALFLAG (MMSYSERR_BASE + 10) /* invalid flag passed */
  243. #define MMSYSERR_INVALPARAM (MMSYSERR_BASE + 11) /* invalid parameter passed */
  244. #define MMSYSERR_HANDLEBUSY (MMSYSERR_BASE + 12) /* handle being used */
  245. /* simultaneously on another */
  246. /* thread (eg callback) */
  247. #define MMSYSERR_INVALIDALIAS (MMSYSERR_BASE + 13) /* specified alias not found */
  248. #define MMSYSERR_BADDB (MMSYSERR_BASE + 14) /* bad registry database */
  249. #define MMSYSERR_KEYNOTFOUND (MMSYSERR_BASE + 15) /* registry key not found */
  250. #define MMSYSERR_READERROR (MMSYSERR_BASE + 16) /* registry read error */
  251. #define MMSYSERR_WRITEERROR (MMSYSERR_BASE + 17) /* registry write error */
  252. #define MMSYSERR_DELETEERROR (MMSYSERR_BASE + 18) /* registry delete error */
  253. #define MMSYSERR_VALNOTFOUND (MMSYSERR_BASE + 19) /* registry value not found */
  254. #define MMSYSERR_NODRIVERCB (MMSYSERR_BASE + 20) /* driver does not call DriverCallback */
  255. #define MMSYSERR_LASTERROR (MMSYSERR_BASE + 20) /* last error in range */
  256. #if (WINVER < 0x030a) || defined(_WIN32)
  257. DECLARE_HANDLE(HDRVR);
  258. #endif /* ifdef WINVER < 0x030a */
  259. #ifndef MMNODRV
  260. /****************************************************************************
  261. Installable driver support
  262. ****************************************************************************/
  263. #ifdef _WIN32
  264. typedef struct DRVCONFIGINFOEX {
  265. DWORD dwDCISize;
  266. LPCWSTR lpszDCISectionName;
  267. LPCWSTR lpszDCIAliasName;
  268. DWORD dnDevNode;
  269. } DRVCONFIGINFOEX, *PDRVCONFIGINFOEX, NEAR *NPDRVCONFIGINFOEX, FAR *LPDRVCONFIGINFOEX;
  270. #else
  271. typedef struct DRVCONFIGINFOEX {
  272. DWORD dwDCISize;
  273. LPCSTR lpszDCISectionName;
  274. LPCSTR lpszDCIAliasName;
  275. DWORD dnDevNode;
  276. } DRVCONFIGINFOEX, *PDRVCONFIGINFOEX, NEAR *NPDRVCONFIGINFOEX, FAR *LPDRVCONFIGINFOEX;
  277. #endif
  278. #if (WINVER < 0x030a) || defined(_WIN32)
  279. #ifndef DRV_LOAD
  280. /* Driver messages */
  281. #define DRV_LOAD 0x0001
  282. #define DRV_ENABLE 0x0002
  283. #define DRV_OPEN 0x0003
  284. #define DRV_CLOSE 0x0004
  285. #define DRV_DISABLE 0x0005
  286. #define DRV_FREE 0x0006
  287. #define DRV_CONFIGURE 0x0007
  288. #define DRV_QUERYCONFIGURE 0x0008
  289. #define DRV_INSTALL 0x0009
  290. #define DRV_REMOVE 0x000A
  291. #define DRV_EXITSESSION 0x000B
  292. #define DRV_POWER 0x000F
  293. #define DRV_RESERVED 0x0800
  294. #define DRV_USER 0x4000
  295. /* LPARAM of DRV_CONFIGURE message */
  296. #ifdef _WIN32
  297. typedef struct tagDRVCONFIGINFO {
  298. DWORD dwDCISize;
  299. LPCWSTR lpszDCISectionName;
  300. LPCWSTR lpszDCIAliasName;
  301. } DRVCONFIGINFO, *PDRVCONFIGINFO, NEAR *NPDRVCONFIGINFO, FAR *LPDRVCONFIGINFO;
  302. #else
  303. typedef struct tagDRVCONFIGINFO {
  304. DWORD dwDCISize;
  305. LPCSTR lpszDCISectionName;
  306. LPCSTR lpszDCIAliasName;
  307. } DRVCONFIGINFO, *PDRVCONFIGINFO, NEAR *NPDRVCONFIGINFO, FAR *LPDRVCONFIGINFO;
  308. #endif
  309. /* Supported return values for DRV_CONFIGURE message */
  310. #define DRVCNF_CANCEL 0x0000
  311. #define DRVCNF_OK 0x0001
  312. #define DRVCNF_RESTART 0x0002
  313. /* installable driver function prototypes */
  314. #ifdef _WIN32
  315. #ifndef _WIN32_VXD
  316. typedef LRESULT (CALLBACK* DRIVERPROC)(DWORD, HDRVR, UINT, LPARAM, LPARAM);
  317. WINMMAPI LRESULT WINAPI CloseDriver(HDRVR hDriver, LONG lParam1, LONG lParam2);
  318. WINMMAPI HDRVR WINAPI OpenDriver(LPCWSTR szDriverName, LPCWSTR szSectionName, LONG lParam2);
  319. WINMMAPI LRESULT WINAPI SendDriverMessage(HDRVR hDriver, UINT message, LONG lParam1, LONG lParam2);
  320. WINMMAPI HMODULE WINAPI DrvGetModuleHandle(HDRVR hDriver);
  321. WINMMAPI HMODULE WINAPI GetDriverModuleHandle(HDRVR hDriver);
  322. WINMMAPI LRESULT WINAPI DefDriverProc(DWORD dwDriverIdentifier, HDRVR hdrvr, UINT uMsg, LPARAM lParam1, LPARAM lParam2);
  323. #endif /* ifndef _WIN32_VXD */
  324. #else
  325. LRESULT WINAPI DrvClose(HDRVR hdrvr, LPARAM lParam1, LPARAM lParam2);
  326. HDRVR WINAPI DrvOpen(LPCSTR szDriverName, LPCSTR szSectionName, LPARAM lParam2);
  327. LRESULT WINAPI DrvSendMessage(HDRVR hdrvr, UINT uMsg, LPARAM lParam1, LPARAM lParam2);
  328. HINSTANCE WINAPI DrvGetModuleHandle(HDRVR hdrvr);
  329. LRESULT WINAPI DrvDefDriverProc(DWORD dwDriverIdentifier, HDRVR hdrvr, UINT uMsg, LPARAM lParam1, LPARAM lParam2);
  330. #define DefDriverProc DrvDefDriverProc
  331. #endif /* ifdef _WIN32 */
  332. #endif /* DRV_LOAD */
  333. #endif /* ifdef (WINVER < 0x030a) || defined(_WIN32) */
  334. #if (WINVER >= 0x030a)
  335. /* return values from DriverProc() function */
  336. #define DRV_CANCEL DRVCNF_CANCEL
  337. #define DRV_OK DRVCNF_OK
  338. #define DRV_RESTART DRVCNF_RESTART
  339. #endif /* ifdef WINVER >= 0x030a */
  340. #define DRV_MCI_FIRST DRV_RESERVED
  341. #define DRV_MCI_LAST (DRV_RESERVED + 0xFFF)
  342. #endif /* ifndef MMNODRV */
  343. /****************************************************************************
  344. Driver callback support
  345. ****************************************************************************/
  346. /* flags used with waveOutOpen(), waveInOpen(), midiInOpen(), and */
  347. /* midiOutOpen() to specify the type of the dwCallback parameter. */
  348. #define CALLBACK_TYPEMASK 0x00070000l /* callback type mask */
  349. #define CALLBACK_NULL 0x00000000l /* no callback */
  350. #define CALLBACK_WINDOW 0x00010000l /* dwCallback is a HWND */
  351. #define CALLBACK_TASK 0x00020000l /* dwCallback is a HTASK */
  352. #define CALLBACK_FUNCTION 0x00030000l /* dwCallback is a FARPROC */
  353. #define CALLBACK_THUNK 0x00040000l /* dwCallback is a Ring0 Thread Handle */ // ;internal
  354. #ifdef _WIN32
  355. #define CALLBACK_THREAD (CALLBACK_TASK)/* thread ID replaces 16 bit task */
  356. #define CALLBACK_EVENT 0x00050000l /* dwCallback is an EVENT Handle */
  357. #endif
  358. #define CALLBACK_EVENT16 0x00060000l /* dwCallback is an EVENT under Win16*/ // ;internal
  359. #ifndef _WIN32_VXD
  360. #ifdef BUILDDLL // ;internal
  361. typedef void (FAR PASCAL DRVCALLBACK)(HDRVR hdrvr, UINT uMsg, DWORD dwUser, DWORD dw1, DWORD dw2); // ;internal
  362. #else /* ifdef BUILDDLL */ // ;internal
  363. typedef void (CALLBACK DRVCALLBACK)(HDRVR hdrvr, UINT uMsg, DWORD dwUser, DWORD dw1, DWORD dw2);
  364. #endif /* ifdef BUILDDLL */ // ;internal
  365. typedef DRVCALLBACK FAR *LPDRVCALLBACK;
  366. #ifdef _WIN32
  367. typedef DRVCALLBACK *PDRVCALLBACK;
  368. #endif
  369. #endif /* ifndef _WIN32_VXD */
  370. #ifndef MMNOMMSYSTEM
  371. #ifndef _WIN32_VXD
  372. /****************************************************************************
  373. General MMSYSTEM support
  374. ****************************************************************************/
  375. #if (WINVER <= 0x030A)
  376. WINMMAPI UINT WINAPI mmsystemGetVersion(void);
  377. #endif
  378. WINMMAPI UINT WINAPI mmsystemGetVersion(void); // ;internal
  379. #ifdef _WIN32
  380. #define OutputDebugStr OutputDebugString
  381. #else
  382. void WINAPI OutputDebugStr(LPCSTR);
  383. void FAR CDECL _loadds OutputDebugStrF(LPCSTR pszFormat, ...); // ;internal
  384. #endif
  385. void WINAPI winmmUntileBuffer(DWORD dwTilingInfo); // ;internal
  386. DWORD WINAPI winmmTileBuffer(DWORD dwFlatMemory, DWORD dwLength); // ;internal
  387. BOOL WINAPI mmShowMMCPLPropertySheet(HWND hWnd, LPSTR szPropSheetID, LPSTR szTabName, LPSTR szCaption); // ;internal
  388. #endif /* ifndef _WIN32_VXD */
  389. #endif /* ifndef MMNOMMSYSTEM */
  390. #ifndef MMNOSOUND
  391. #ifndef _WIN32_VXD
  392. /****************************************************************************
  393. Sound support
  394. ****************************************************************************/
  395. #ifdef _WIN32
  396. WINMMAPI BOOL WINAPI sndPlaySoundA(LPCSTR pszSound, UINT fuSound);
  397. WINMMAPI BOOL WINAPI sndPlaySoundW(LPCWSTR pszSound, UINT fuSound);
  398. #ifdef UNICODE
  399. #define sndPlaySound sndPlaySoundW
  400. #else
  401. #define sndPlaySound sndPlaySoundA
  402. #endif // !UNICODE
  403. #else
  404. BOOL WINAPI sndPlaySound(LPCSTR pszSound, UINT fuSound);
  405. #endif
  406. /*
  407. * flag values for fuSound and fdwSound arguments on [snd]PlaySound
  408. */
  409. #define SND_SYNC 0x0000 /* play synchronously (default) */
  410. #define SND_ASYNC 0x0001 /* play asynchronously */
  411. #define SND_NODEFAULT 0x0002 /* silence (!default) if sound not found */
  412. #define SND_MEMORY 0x0004 /* pszSound points to a memory file */
  413. #define SND_LOOP 0x0008 /* loop the sound until next sndPlaySound */
  414. #define SND_NOSTOP 0x0010 /* don't stop any currently playing sound */
  415. #define SND_NOWAIT 0x00002000L /* don't wait if the driver is busy */
  416. #define SND_ALIAS 0x00010000L /* name is a registry alias */
  417. #define SND_ALIAS_ID 0x00110000L /* alias is a predefined ID */
  418. #define SND_FILENAME 0x00020000L /* name is file name */
  419. #define SND_RESOURCE 0x00040004L /* name is resource name or atom */
  420. #if(WINVER >= 0x0400)
  421. #define SND_PURGE 0x0040 /* purge non-static events for task */
  422. #define SND_APPLICATION 0x0080 /* look for application specific association */
  423. #define SND_LOPRIORITY 0x10000000L /* low priority sound */ // ;internal
  424. #define SND_EVENTTIME 0x20000000L /* dangerous event time */ // ;internal
  425. #endif /* WINVER >= 0x0400 */
  426. #define SND_VALIDFLAGS 0x0017201F // Set of valid flag bits. Anything outside // ;internal
  427. // this range will raise an error // ;internal
  428. #define SND_ALIAS_START 0 /* alias base */
  429. #ifdef _WIN32
  430. #define sndAlias(ch0, ch1) (SND_ALIAS_START + (DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8))
  431. #define SND_ALIAS_SYSTEMASTERISK sndAlias('S', '*')
  432. #define SND_ALIAS_SYSTEMQUESTION sndAlias('S', '?')
  433. #define SND_ALIAS_SYSTEMHAND sndAlias('S', 'H')
  434. #define SND_ALIAS_SYSTEMEXIT sndAlias('S', 'E')
  435. #define SND_ALIAS_SYSTEMSTART sndAlias('S', 'S')
  436. #define SND_ALIAS_SYSTEMWELCOME sndAlias('S', 'W')
  437. #define SND_ALIAS_SYSTEMEXCLAMATION sndAlias('S', '!')
  438. #define SND_ALIAS_SYSTEMDEFAULT sndAlias('S', 'D')
  439. WINMMAPI BOOL WINAPI PlaySoundA(LPCSTR pszSound, HMODULE hmod, DWORD fdwSound);
  440. WINMMAPI BOOL WINAPI PlaySoundW(LPCWSTR pszSound, HMODULE hmod, DWORD fdwSound);
  441. #ifdef UNICODE
  442. #define PlaySound PlaySoundW
  443. #else
  444. #define PlaySound PlaySoundA
  445. #endif // !UNICODE
  446. #else
  447. BOOL WINAPI PlaySound(LPCSTR pszSound, HMODULE hmod, DWORD fdwSound);
  448. #endif
  449. #define SND_SNDPLAYSOUNDF_VALID 0x20FF // ;internal
  450. #define SND_PLAYSOUNDF_VALID 0x301720DFL // ;internal
  451. #endif /* ifndef _WIN32_VXD */
  452. #endif /* ifndef MMNOSOUND */
  453. #ifndef MMNOWAVE
  454. /****************************************************************************
  455. Waveform audio support
  456. ****************************************************************************/
  457. /* waveform audio error return values */
  458. #define WAVERR_BADFORMAT (WAVERR_BASE + 0) /* unsupported wave format */
  459. #define WAVERR_STILLPLAYING (WAVERR_BASE + 1) /* still something playing */
  460. #define WAVERR_UNPREPARED (WAVERR_BASE + 2) /* header not prepared */
  461. #define WAVERR_SYNC (WAVERR_BASE + 3) /* device is synchronous */
  462. #define WAVERR_LASTERROR (WAVERR_BASE + 3) /* last error in range */
  463. /* waveform audio data types */
  464. DECLARE_HANDLE(HWAVE);
  465. DECLARE_HANDLE(HWAVEIN);
  466. DECLARE_HANDLE(HWAVEOUT);
  467. #ifndef _WIN32_VXD
  468. typedef HWAVEIN FAR *LPHWAVEIN;
  469. typedef HWAVEOUT FAR *LPHWAVEOUT;
  470. typedef DRVCALLBACK WAVECALLBACK;
  471. typedef WAVECALLBACK FAR *LPWAVECALLBACK;
  472. #endif
  473. /* wave callback messages */
  474. #define WOM_OPEN MM_WOM_OPEN
  475. #define WOM_CLOSE MM_WOM_CLOSE
  476. #define WOM_DONE MM_WOM_DONE
  477. #define WIM_OPEN MM_WIM_OPEN
  478. #define WIM_CLOSE MM_WIM_CLOSE
  479. #define WIM_DATA MM_WIM_DATA
  480. /* device ID for wave device mapper */
  481. #define WAVE_MAPPER ((UINT)-1)
  482. /* flags for dwFlags parameter in waveOutOpen() and waveInOpen() */
  483. #define WAVE_FORMAT_QUERY 0x0001
  484. #define WAVE_ALLOWSYNC 0x0002
  485. #if(WINVER >= 0x0400)
  486. #define WAVE_MAPPED 0x0004
  487. #define WAVE_FORMAT_DIRECT 0x0008
  488. #define WAVE_FORMAT_DIRECT_QUERY (WAVE_FORMAT_QUERY | WAVE_FORMAT_DIRECT)
  489. #ifndef _WIN32 // ;internal
  490. #define WAVE_SHARED 0x8000 // ;internal
  491. #endif // ;internal
  492. #endif /* WINVER >= 0x0400 */
  493. #define WAVE_VALID 0x800F // ;internal
  494. /* wave data block header */
  495. typedef struct wavehdr_tag {
  496. LPSTR lpData; /* pointer to locked data buffer */
  497. DWORD dwBufferLength; /* length of data buffer */
  498. DWORD dwBytesRecorded; /* used for input only */
  499. DWORD dwUser; /* for client's use */
  500. DWORD dwFlags; /* assorted flags (see defines) */
  501. DWORD dwLoops; /* loop control counter */
  502. struct wavehdr_tag FAR *lpNext; /* reserved for driver */
  503. DWORD reserved; /* reserved for driver */
  504. } WAVEHDR, *PWAVEHDR, NEAR *NPWAVEHDR, FAR *LPWAVEHDR;
  505. /* flags for dwFlags field of WAVEHDR */
  506. #define WHDR_DONE 0x00000001 /* done bit */
  507. #define WHDR_PREPARED 0x00000002 /* set if this header has been prepared */
  508. #define WHDR_BEGINLOOP 0x00000004 /* loop start block */
  509. #define WHDR_ENDLOOP 0x00000008 /* loop end block */
  510. #define WHDR_INQUEUE 0x00000010 /* reserved for driver */
  511. #define WHDR_MAPPED 0x00001000 /* thunked header */ // ;internal
  512. #define WHDR_VALID 0x0000101F /* valid flags */ // ;internal
  513. /* waveform output device capabilities structure */
  514. #ifdef _WIN32
  515. typedef struct tagWAVEOUTCAPSA {
  516. WORD wMid; /* manufacturer ID */
  517. WORD wPid; /* product ID */
  518. MMVERSION vDriverVersion; /* version of the driver */
  519. CHAR szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
  520. DWORD dwFormats; /* formats supported */
  521. WORD wChannels; /* number of sources supported */
  522. WORD wReserved1; /* packing */
  523. DWORD dwSupport; /* functionality supported by driver */
  524. } WAVEOUTCAPSA, *PWAVEOUTCAPSA, *NPWAVEOUTCAPSA, *LPWAVEOUTCAPSA;
  525. typedef struct tagWAVEOUTCAPSW {
  526. WORD wMid; /* manufacturer ID */
  527. WORD wPid; /* product ID */
  528. MMVERSION vDriverVersion; /* version of the driver */
  529. WCHAR szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
  530. DWORD dwFormats; /* formats supported */
  531. WORD wChannels; /* number of sources supported */
  532. WORD wReserved1; /* packing */
  533. DWORD dwSupport; /* functionality supported by driver */
  534. } WAVEOUTCAPSW, *PWAVEOUTCAPSW, *NPWAVEOUTCAPSW, *LPWAVEOUTCAPSW;
  535. #ifdef UNICODE
  536. typedef WAVEOUTCAPSW WAVEOUTCAPS;
  537. typedef PWAVEOUTCAPSW PWAVEOUTCAPS;
  538. typedef NPWAVEOUTCAPSW NPWAVEOUTCAPS;
  539. typedef LPWAVEOUTCAPSW LPWAVEOUTCAPS;
  540. #else
  541. typedef WAVEOUTCAPSA WAVEOUTCAPS;
  542. typedef PWAVEOUTCAPSA PWAVEOUTCAPS;
  543. typedef NPWAVEOUTCAPSA NPWAVEOUTCAPS;
  544. typedef LPWAVEOUTCAPSA LPWAVEOUTCAPS;
  545. #endif // UNICODE
  546. #else
  547. typedef struct waveoutcaps_tag {
  548. WORD wMid; /* manufacturer ID */
  549. WORD wPid; /* product ID */
  550. VERSION vDriverVersion; /* version of the driver */
  551. char szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
  552. DWORD dwFormats; /* formats supported */
  553. WORD wChannels; /* number of sources supported */
  554. DWORD dwSupport; /* functionality supported by driver */
  555. } WAVEOUTCAPS, *PWAVEOUTCAPS, NEAR *NPWAVEOUTCAPS, FAR *LPWAVEOUTCAPS;
  556. #endif
  557. /* flags for dwSupport field of WAVEOUTCAPS */
  558. #define WAVECAPS_PITCH 0x0001 /* supports pitch control */
  559. #define WAVECAPS_PLAYBACKRATE 0x0002 /* supports playback rate control */
  560. #define WAVECAPS_VOLUME 0x0004 /* supports volume control */
  561. #define WAVECAPS_LRVOLUME 0x0008 /* separate left-right volume control */
  562. #define WAVECAPS_SYNC 0x0010
  563. #define WAVECAPS_SAMPLEACCURATE 0x0020
  564. #define WAVECAPS_DIRECTSOUND 0x0040
  565. /* waveform input device capabilities structure */
  566. #ifdef _WIN32
  567. typedef struct tagWAVEINCAPSA {
  568. WORD wMid; /* manufacturer ID */
  569. WORD wPid; /* product ID */
  570. MMVERSION vDriverVersion; /* version of the driver */
  571. CHAR szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
  572. DWORD dwFormats; /* formats supported */
  573. WORD wChannels; /* number of channels supported */
  574. WORD wReserved1; /* structure packing */
  575. } WAVEINCAPSA, *PWAVEINCAPSA, *NPWAVEINCAPSA, *LPWAVEINCAPSA;
  576. typedef struct tagWAVEINCAPSW {
  577. WORD wMid; /* manufacturer ID */
  578. WORD wPid; /* product ID */
  579. MMVERSION vDriverVersion; /* version of the driver */
  580. WCHAR szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
  581. DWORD dwFormats; /* formats supported */
  582. WORD wChannels; /* number of channels supported */
  583. WORD wReserved1; /* structure packing */
  584. } WAVEINCAPSW, *PWAVEINCAPSW, *NPWAVEINCAPSW, *LPWAVEINCAPSW;
  585. #ifdef UNICODE
  586. typedef WAVEINCAPSW WAVEINCAPS;
  587. typedef PWAVEINCAPSW PWAVEINCAPS;
  588. typedef NPWAVEINCAPSW NPWAVEINCAPS;
  589. typedef LPWAVEINCAPSW LPWAVEINCAPS;
  590. #else
  591. typedef WAVEINCAPSA WAVEINCAPS;
  592. typedef PWAVEINCAPSA PWAVEINCAPS;
  593. typedef NPWAVEINCAPSA NPWAVEINCAPS;
  594. typedef LPWAVEINCAPSA LPWAVEINCAPS;
  595. #endif // UNICODE
  596. #else
  597. typedef struct waveincaps_tag {
  598. WORD wMid; /* manufacturer ID */
  599. WORD wPid; /* product ID */
  600. VERSION vDriverVersion; /* version of the driver */
  601. char szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
  602. DWORD dwFormats; /* formats supported */
  603. WORD wChannels; /* number of channels supported */
  604. } WAVEINCAPS, *PWAVEINCAPS, NEAR *NPWAVEINCAPS, FAR *LPWAVEINCAPS;
  605. #endif
  606. /* defines for dwFormat field of WAVEINCAPS and WAVEOUTCAPS */
  607. #define WAVE_INVALIDFORMAT 0x00000000 /* invalid format */
  608. #define WAVE_FORMAT_1M08 0x00000001 /* 11.025 kHz, Mono, 8-bit */
  609. #define WAVE_FORMAT_1S08 0x00000002 /* 11.025 kHz, Stereo, 8-bit */
  610. #define WAVE_FORMAT_1M16 0x00000004 /* 11.025 kHz, Mono, 16-bit */
  611. #define WAVE_FORMAT_1S16 0x00000008 /* 11.025 kHz, Stereo, 16-bit */
  612. #define WAVE_FORMAT_2M08 0x00000010 /* 22.05 kHz, Mono, 8-bit */
  613. #define WAVE_FORMAT_2S08 0x00000020 /* 22.05 kHz, Stereo, 8-bit */
  614. #define WAVE_FORMAT_2M16 0x00000040 /* 22.05 kHz, Mono, 16-bit */
  615. #define WAVE_FORMAT_2S16 0x00000080 /* 22.05 kHz, Stereo, 16-bit */
  616. #define WAVE_FORMAT_4M08 0x00000100 /* 44.1 kHz, Mono, 8-bit */
  617. #define WAVE_FORMAT_4S08 0x00000200 /* 44.1 kHz, Stereo, 8-bit */
  618. #define WAVE_FORMAT_4M16 0x00000400 /* 44.1 kHz, Mono, 16-bit */
  619. #define WAVE_FORMAT_4S16 0x00000800 /* 44.1 kHz, Stereo, 16-bit */
  620. /* OLD general waveform format structure (information common to all formats) */
  621. typedef struct waveformat_tag {
  622. WORD wFormatTag; /* format type */
  623. WORD nChannels; /* number of channels (i.e. mono, stereo, etc.) */
  624. DWORD nSamplesPerSec; /* sample rate */
  625. DWORD nAvgBytesPerSec; /* for buffer estimation */
  626. WORD nBlockAlign; /* block size of data */
  627. } WAVEFORMAT, *PWAVEFORMAT, NEAR *NPWAVEFORMAT, FAR *LPWAVEFORMAT;
  628. /* flags for wFormatTag field of WAVEFORMAT */
  629. #define WAVE_FORMAT_PCM 1
  630. /* specific waveform format structure for PCM data */
  631. typedef struct pcmwaveformat_tag {
  632. WAVEFORMAT wf;
  633. WORD wBitsPerSample;
  634. } PCMWAVEFORMAT, *PPCMWAVEFORMAT, NEAR *NPPCMWAVEFORMAT, FAR *LPPCMWAVEFORMAT;
  635. #ifndef _WAVEFORMATEX_
  636. #define _WAVEFORMATEX_
  637. /*
  638. * extended waveform format structure used for all non-PCM formats. this
  639. * structure is common to all non-PCM formats.
  640. */
  641. typedef struct tWAVEFORMATEX
  642. {
  643. WORD wFormatTag; /* format type */
  644. WORD nChannels; /* number of channels (i.e. mono, stereo...) */
  645. DWORD nSamplesPerSec; /* sample rate */
  646. DWORD nAvgBytesPerSec; /* for buffer estimation */
  647. WORD nBlockAlign; /* block size of data */
  648. WORD wBitsPerSample; /* number of bits per sample of mono data */
  649. WORD cbSize; /* the count in bytes of the size of */
  650. /* extra information (after cbSize) */
  651. } WAVEFORMATEX, *PWAVEFORMATEX, NEAR *NPWAVEFORMATEX, FAR *LPWAVEFORMATEX;
  652. typedef const WAVEFORMATEX FAR *LPCWAVEFORMATEX;
  653. #endif /* _WAVEFORMATEX_ */
  654. #ifndef _WIN32_VXD
  655. /* waveform audio function prototypes */
  656. WINMMAPI UINT WINAPI waveOutGetNumDevs(void);
  657. #ifdef _WIN32
  658. WINMMAPI MMRESULT WINAPI waveOutGetDevCapsA(UINT uDeviceID, LPWAVEOUTCAPSA pwoc, UINT cbwoc);
  659. WINMMAPI MMRESULT WINAPI waveOutGetDevCapsW(UINT uDeviceID, LPWAVEOUTCAPSW pwoc, UINT cbwoc);
  660. #ifdef UNICODE
  661. #define waveOutGetDevCaps waveOutGetDevCapsW
  662. #else
  663. #define waveOutGetDevCaps waveOutGetDevCapsA
  664. #endif // !UNICODE
  665. #else
  666. WINMMAPI MMRESULT WINAPI waveOutGetDevCaps(UINT uDeviceID, LPWAVEOUTCAPS pwoc, UINT cbwoc);
  667. #endif
  668. #if (WINVER >= 0x0400)
  669. WINMMAPI MMRESULT WINAPI waveOutGetVolume(HWAVEOUT hwo, LPDWORD pdwVolume);
  670. WINMMAPI MMRESULT WINAPI waveOutSetVolume(HWAVEOUT hwo, DWORD dwVolume);
  671. #else
  672. WINMMAPI MMRESULT WINAPI waveOutGetVolume(UINT uId, LPDWORD pdwVolume);
  673. WINMMAPI MMRESULT WINAPI waveOutSetVolume(UINT uId, DWORD dwVolume);
  674. #endif
  675. #ifdef _WIN32
  676. WINMMAPI MMRESULT WINAPI waveOutGetErrorTextA(MMRESULT mmrError, LPSTR pszText, UINT cchText);
  677. WINMMAPI MMRESULT WINAPI waveOutGetErrorTextW(MMRESULT mmrError, LPWSTR pszText, UINT cchText);
  678. #ifdef UNICODE
  679. #define waveOutGetErrorText waveOutGetErrorTextW
  680. #else
  681. #define waveOutGetErrorText waveOutGetErrorTextA
  682. #endif // !UNICODE
  683. #else
  684. MMRESULT WINAPI waveOutGetErrorText(MMRESULT mmrError, LPSTR pszText, UINT cchText);
  685. #endif
  686. WINMMAPI MMRESULT WINAPI waveOutOpen(LPHWAVEOUT phwo, UINT uDeviceID,
  687. LPCWAVEFORMATEX pwfx, DWORD dwCallback, DWORD dwInstance, DWORD fdwOpen);
  688. WINMMAPI MMRESULT WINAPI waveOutClose(HWAVEOUT hwo);
  689. WINMMAPI MMRESULT WINAPI waveOutPrepareHeader(HWAVEOUT hwo, LPWAVEHDR pwh, UINT cbwh);
  690. WINMMAPI MMRESULT WINAPI waveOutUnprepareHeader(HWAVEOUT hwo, LPWAVEHDR pwh, UINT cbwh);
  691. WINMMAPI MMRESULT WINAPI waveOutWrite(HWAVEOUT hwo, LPWAVEHDR pwh, UINT cbwh);
  692. WINMMAPI MMRESULT WINAPI waveOutPause(HWAVEOUT hwo);
  693. WINMMAPI MMRESULT WINAPI waveOutRestart(HWAVEOUT hwo);
  694. WINMMAPI MMRESULT WINAPI waveOutReset(HWAVEOUT hwo);
  695. WINMMAPI MMRESULT WINAPI waveOutBreakLoop(HWAVEOUT hwo);
  696. WINMMAPI MMRESULT WINAPI waveOutGetPosition(HWAVEOUT hwo, LPMMTIME pmmt, UINT cbmmt);
  697. WINMMAPI MMRESULT WINAPI waveOutGetPitch(HWAVEOUT hwo, LPDWORD pdwPitch);
  698. WINMMAPI MMRESULT WINAPI waveOutSetPitch(HWAVEOUT hwo, DWORD dwPitch);
  699. WINMMAPI MMRESULT WINAPI waveOutGetPlaybackRate(HWAVEOUT hwo, LPDWORD pdwRate);
  700. WINMMAPI MMRESULT WINAPI waveOutSetPlaybackRate(HWAVEOUT hwo, DWORD dwRate);
  701. WINMMAPI MMRESULT WINAPI waveOutGetID(HWAVEOUT hwo, LPUINT puDeviceID);
  702. #if (WINVER >= 0x030a)
  703. #ifdef _WIN32
  704. WINMMAPI MMRESULT WINAPI waveOutMessage(HWAVEOUT hwo, UINT uMsg, DWORD dw1, DWORD dw2);
  705. #else
  706. DWORD WINAPI waveOutMessage(HWAVEOUT hwo, UINT uMsg, DWORD dw1, DWORD dw2);
  707. #endif
  708. #endif /* ifdef WINVER >= 0x030a */
  709. WINMMAPI UINT WINAPI waveInGetNumDevs(void);
  710. #ifdef _WIN32
  711. WINMMAPI MMRESULT WINAPI waveInGetDevCapsA(UINT uDeviceID, LPWAVEINCAPSA pwic, UINT cbwic);
  712. WINMMAPI MMRESULT WINAPI waveInGetDevCapsW(UINT uDeviceID, LPWAVEINCAPSW pwic, UINT cbwic);
  713. #ifdef UNICODE
  714. #define waveInGetDevCaps waveInGetDevCapsW
  715. #else
  716. #define waveInGetDevCaps waveInGetDevCapsA
  717. #endif // !UNICODE
  718. #else
  719. MMRESULT WINAPI waveInGetDevCaps(UINT uDeviceID, LPWAVEINCAPS pwic, UINT cbwic);
  720. #endif
  721. #ifdef _WIN32
  722. WINMMAPI MMRESULT WINAPI waveInGetErrorTextA(MMRESULT mmrError, LPSTR pszText, UINT cchText);
  723. WINMMAPI MMRESULT WINAPI waveInGetErrorTextW(MMRESULT mmrError, LPWSTR pszText, UINT cchText);
  724. #ifdef UNICODE
  725. #define waveInGetErrorText waveInGetErrorTextW
  726. #else
  727. #define waveInGetErrorText waveInGetErrorTextA
  728. #endif // !UNICODE
  729. #else
  730. MMRESULT WINAPI waveInGetErrorText(MMRESULT mmrError, LPSTR pszText, UINT cchText);
  731. #endif
  732. WINMMAPI MMRESULT WINAPI waveInOpen(LPHWAVEIN phwi, UINT uDeviceID,
  733. LPCWAVEFORMATEX pwfx, DWORD dwCallback, DWORD dwInstance, DWORD fdwOpen);
  734. WINMMAPI MMRESULT WINAPI waveInClose(HWAVEIN hwi);
  735. WINMMAPI MMRESULT WINAPI waveInPrepareHeader(HWAVEIN hwi, LPWAVEHDR pwh, UINT cbwh);
  736. WINMMAPI MMRESULT WINAPI waveInUnprepareHeader(HWAVEIN hwi, LPWAVEHDR pwh, UINT cbwh);
  737. WINMMAPI MMRESULT WINAPI waveInAddBuffer(HWAVEIN hwi, LPWAVEHDR pwh, UINT cbwh);
  738. WINMMAPI MMRESULT WINAPI waveInStart(HWAVEIN hwi);
  739. WINMMAPI MMRESULT WINAPI waveInStop(HWAVEIN hwi);
  740. WINMMAPI MMRESULT WINAPI waveInReset(HWAVEIN hwi);
  741. WINMMAPI MMRESULT WINAPI waveInGetPosition(HWAVEIN hwi, LPMMTIME pmmt, UINT cbmmt);
  742. WINMMAPI MMRESULT WINAPI waveInGetID(HWAVEIN hwi, LPUINT puDeviceID);
  743. #if (WINVER >= 0x030a)
  744. #ifdef _WIN32
  745. WINMMAPI MMRESULT WINAPI waveInMessage(HWAVEIN hwi, UINT uMsg, DWORD dw1, DWORD dw2);
  746. #else
  747. DWORD WINAPI waveInMessage(HWAVEIN hwi, UINT uMsg, DWORD dw1, DWORD dw2);
  748. #endif
  749. #endif /* ifdef WINVER >= 0x030a */
  750. #endif /* ifndef _WIN32_VXD */
  751. #endif /* ifndef MMNOWAVE */
  752. #ifndef MMNOMIDI
  753. /****************************************************************************
  754. MIDI audio support
  755. ****************************************************************************/
  756. /* MIDI error return values */
  757. #define MIDIERR_UNPREPARED (MIDIERR_BASE + 0) /* header not prepared */
  758. #define MIDIERR_STILLPLAYING (MIDIERR_BASE + 1) /* still something playing */
  759. #define MIDIERR_NOMAP (MIDIERR_BASE + 2) /* no configured instruments */
  760. #define MIDIERR_NOTREADY (MIDIERR_BASE + 3) /* hardware is still busy */
  761. #define MIDIERR_NODEVICE (MIDIERR_BASE + 4) /* port no longer connected */
  762. #define MIDIERR_INVALIDSETUP (MIDIERR_BASE + 5) /* invalid MIF */
  763. #define MIDIERR_BADOPENMODE (MIDIERR_BASE + 6) /* operation unsupported w/ open mode */
  764. #define MIDIERR_DONT_CONTINUE (MIDIERR_BASE + 7) /* thru device 'eating' a message */
  765. #define MIDIERR_LASTERROR (MIDIERR_BASE + 7) /* last error in range */
  766. /* MIDI audio data types */
  767. DECLARE_HANDLE(HMIDI);
  768. DECLARE_HANDLE(HMIDIIN);
  769. DECLARE_HANDLE(HMIDIOUT);
  770. DECLARE_HANDLE(HMIDISTRM);
  771. #ifndef _WIN32_VXD
  772. typedef HMIDI FAR *LPHMIDI;
  773. typedef HMIDIIN FAR *LPHMIDIIN;
  774. typedef HMIDIOUT FAR *LPHMIDIOUT;
  775. typedef HMIDISTRM FAR *LPHMIDISTRM;
  776. typedef DRVCALLBACK MIDICALLBACK;
  777. typedef MIDICALLBACK FAR *LPMIDICALLBACK;
  778. #define MIDIPATCHSIZE 128
  779. typedef WORD PATCHARRAY[MIDIPATCHSIZE];
  780. typedef WORD FAR *LPPATCHARRAY;
  781. typedef WORD KEYARRAY[MIDIPATCHSIZE];
  782. typedef WORD FAR *LPKEYARRAY;
  783. #endif /* ifndef _WIN32_VXD */
  784. /* MIDI callback messages */
  785. #define MIM_OPEN MM_MIM_OPEN
  786. #define MIM_CLOSE MM_MIM_CLOSE
  787. #define MIM_DATA MM_MIM_DATA
  788. #define MIM_LONGDATA MM_MIM_LONGDATA
  789. #define MIM_ERROR MM_MIM_ERROR
  790. #define MIM_LONGERROR MM_MIM_LONGERROR
  791. #define MOM_OPEN MM_MOM_OPEN
  792. #define MOM_CLOSE MM_MOM_CLOSE
  793. #define MOM_DONE MM_MOM_DONE
  794. #if(WINVER >= 0x0400)
  795. #define MIM_MOREDATA MM_MIM_MOREDATA
  796. #define MOM_POSITIONCB MM_MOM_POSITIONCB
  797. #endif /* WINVER >= 0x0400 */
  798. /* device ID for MIDI mapper */
  799. #define MIDIMAPPER ((UINT)-1)
  800. #define MIDI_MAPPER ((UINT)-1)
  801. #if(WINVER >= 0x0400)
  802. /* flags for dwFlags parm of midiInOpen() */
  803. #define MIDI_IO_CONTROL 0x00000008L // ;internal
  804. #define MIDI_IO_INPUT 0x00000010L /*future*/ // ;internal
  805. #define MIDI_IO_STATUS 0x00000020L
  806. #define MIDI_IO_OWNED 0x00004000L // ;internal
  807. #define MIDI_IO_SHARED 0x00008000L // ;internal
  808. #define MIDI_I_VALID 0xC027 // ;internal
  809. #define MIDI_O_VALID 0xC00E // ;internal
  810. #endif /* WINVER >= 0x0400 */
  811. /* flags for wFlags parm of midiOutCachePatches(), midiOutCacheDrumPatches() */
  812. #define MIDI_CACHE_ALL 1
  813. #define MIDI_CACHE_BESTFIT 2
  814. #define MIDI_CACHE_QUERY 3
  815. #define MIDI_UNCACHE 4
  816. #define MIDI_CACHE_VALID (MIDI_CACHE_ALL | MIDI_CACHE_BESTFIT | MIDI_CACHE_QUERY | MIDI_UNCACHE) // ;internal
  817. /* MIDI output device capabilities structure */
  818. #ifdef _WIN32
  819. typedef struct tagMIDIOUTCAPSA {
  820. WORD wMid; /* manufacturer ID */
  821. WORD wPid; /* product ID */
  822. MMVERSION vDriverVersion; /* version of the driver */
  823. CHAR szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
  824. WORD wTechnology; /* type of device */
  825. WORD wVoices; /* # of voices (internal synth only) */
  826. WORD wNotes; /* max # of notes (internal synth only) */
  827. WORD wChannelMask; /* channels used (internal synth only) */
  828. DWORD dwSupport; /* functionality supported by driver */
  829. } MIDIOUTCAPSA, *PMIDIOUTCAPSA, *NPMIDIOUTCAPSA, *LPMIDIOUTCAPSA;
  830. typedef struct tagMIDIOUTCAPSW {
  831. WORD wMid; /* manufacturer ID */
  832. WORD wPid; /* product ID */
  833. MMVERSION vDriverVersion; /* version of the driver */
  834. WCHAR szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
  835. WORD wTechnology; /* type of device */
  836. WORD wVoices; /* # of voices (internal synth only) */
  837. WORD wNotes; /* max # of notes (internal synth only) */
  838. WORD wChannelMask; /* channels used (internal synth only) */
  839. DWORD dwSupport; /* functionality supported by driver */
  840. } MIDIOUTCAPSW, *PMIDIOUTCAPSW, *NPMIDIOUTCAPSW, *LPMIDIOUTCAPSW;
  841. #ifdef UNICODE
  842. typedef MIDIOUTCAPSW MIDIOUTCAPS;
  843. typedef PMIDIOUTCAPSW PMIDIOUTCAPS;
  844. typedef NPMIDIOUTCAPSW NPMIDIOUTCAPS;
  845. typedef LPMIDIOUTCAPSW LPMIDIOUTCAPS;
  846. #else
  847. typedef MIDIOUTCAPSA MIDIOUTCAPS;
  848. typedef PMIDIOUTCAPSA PMIDIOUTCAPS;
  849. typedef NPMIDIOUTCAPSA NPMIDIOUTCAPS;
  850. typedef LPMIDIOUTCAPSA LPMIDIOUTCAPS;
  851. #endif // UNICODE
  852. #else
  853. typedef struct midioutcaps_tag {
  854. WORD wMid; /* manufacturer ID */
  855. WORD wPid; /* product ID */
  856. VERSION vDriverVersion; /* version of the driver */
  857. char szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
  858. WORD wTechnology; /* type of device */
  859. WORD wVoices; /* # of voices (internal synth only) */
  860. WORD wNotes; /* max # of notes (internal synth only) */
  861. WORD wChannelMask; /* channels used (internal synth only) */
  862. DWORD dwSupport; /* functionality supported by driver */
  863. } MIDIOUTCAPS, *PMIDIOUTCAPS, NEAR *NPMIDIOUTCAPS, FAR *LPMIDIOUTCAPS;
  864. #endif
  865. /* flags for wTechnology field of MIDIOUTCAPS structure */
  866. #define MOD_MIDIPORT 1 /* output port */
  867. #define MOD_SYNTH 2 /* generic internal synth */
  868. #define MOD_SQSYNTH 3 /* square wave internal synth */
  869. #define MOD_FMSYNTH 4 /* FM internal synth */
  870. #define MOD_MAPPER 5 /* MIDI mapper */
  871. /* flags for dwSupport field of MIDIOUTCAPS structure */
  872. #define MIDICAPS_VOLUME 0x0001 /* supports volume control */
  873. #define MIDICAPS_LRVOLUME 0x0002 /* separate left-right volume control */
  874. #define MIDICAPS_CACHE 0x0004
  875. #if(WINVER >= 0x0400)
  876. #define MIDICAPS_STREAM 0x0008 /* driver supports midiStreamOut directly */
  877. #endif /* WINVER >= 0x0400 */
  878. /* MIDI input device capabilities structure */
  879. #ifdef _WIN32
  880. typedef struct tagMIDIINCAPSA {
  881. WORD wMid; /* manufacturer ID */
  882. WORD wPid; /* product ID */
  883. MMVERSION vDriverVersion; /* version of the driver */
  884. CHAR szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
  885. #if (WINVER >= 0x0400)
  886. DWORD dwSupport; /* functionality supported by driver */
  887. #endif
  888. } MIDIINCAPSA, *PMIDIINCAPSA, *NPMIDIINCAPSA, *LPMIDIINCAPSA;
  889. typedef struct tagMIDIINCAPSW {
  890. WORD wMid; /* manufacturer ID */
  891. WORD wPid; /* product ID */
  892. MMVERSION vDriverVersion; /* version of the driver */
  893. WCHAR szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
  894. #if (WINVER >= 0x0400)
  895. DWORD dwSupport; /* functionality supported by driver */
  896. #endif
  897. } MIDIINCAPSW, *PMIDIINCAPSW, *NPMIDIINCAPSW, *LPMIDIINCAPSW;
  898. #ifdef UNICODE
  899. typedef MIDIINCAPSW MIDIINCAPS;
  900. typedef PMIDIINCAPSW PMIDIINCAPS;
  901. typedef NPMIDIINCAPSW NPMIDIINCAPS;
  902. typedef LPMIDIINCAPSW LPMIDIINCAPS;
  903. #else
  904. typedef MIDIINCAPSA MIDIINCAPS;
  905. typedef PMIDIINCAPSA PMIDIINCAPS;
  906. typedef NPMIDIINCAPSA NPMIDIINCAPS;
  907. typedef LPMIDIINCAPSA LPMIDIINCAPS;
  908. #endif // UNICODE
  909. #else
  910. typedef struct midiincaps_tag {
  911. WORD wMid; /* manufacturer ID */
  912. WORD wPid; /* product ID */
  913. VERSION vDriverVersion; /* version of the driver */
  914. char szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
  915. #if (WINVER >= 0x0400)
  916. DWORD dwSupport; /* functionality supported by driver */
  917. #endif
  918. } MIDIINCAPS, *PMIDIINCAPS, NEAR *NPMIDIINCAPS, FAR *LPMIDIINCAPS;
  919. #endif
  920. /* MIDI data block header */
  921. typedef struct midihdr_tag {
  922. LPSTR lpData; /* pointer to locked data block */
  923. DWORD dwBufferLength; /* length of data in data block */
  924. DWORD dwBytesRecorded; /* used for input only */
  925. DWORD dwUser; /* for client's use */
  926. DWORD dwFlags; /* assorted flags (see defines) */
  927. struct midihdr_tag FAR *lpNext; /* reserved for driver */
  928. DWORD reserved; /* reserved for driver */
  929. #if (WINVER >= 0x0400)
  930. DWORD dwOffset; /* Callback offset into buffer */
  931. DWORD dwReserved[8]; /* Reserved for MMSYSTEM */
  932. #endif
  933. } MIDIHDR, *PMIDIHDR, NEAR *NPMIDIHDR, FAR *LPMIDIHDR;
  934. /* 3.1 style MIDIHDR for parameter validation */ // ;internal
  935. typedef struct midihdr31_tag { // ;internal
  936. LPSTR lpData; /* pointer to locked data block */ // ;internal
  937. DWORD dwBufferLength; /* length of data in data block */ // ;internal
  938. DWORD dwBytesRecorded; /* used for input only */ // ;internal
  939. DWORD dwUser; /* for client's use */ // ;internal
  940. DWORD dwFlags; /* assorted flags (see defines) */ // ;internal
  941. struct midihdr_tag FAR *lpNext; /* reserved for driver */ // ;internal
  942. DWORD reserved; /* reserved for driver */ // ;internal
  943. } MIDIHDR31, *PMIDIHDR31, NEAR *NPMIDIHDR31, FAR *LPMIDIHDR31; // ;internal
  944. #if(WINVER >= 0x0400)
  945. typedef struct midievent_tag
  946. {
  947. DWORD dwDeltaTime; /* Ticks since last event */
  948. DWORD dwStreamID; /* Reserved; must be zero */
  949. DWORD dwEvent; /* Event type and parameters */
  950. DWORD dwParms[1]; /* Parameters if this is a long event */
  951. } MIDIEVENT;
  952. typedef struct midistrmbuffver_tag
  953. {
  954. DWORD dwVersion; /* Stream buffer format version */
  955. DWORD dwMid; /* Manufacturer ID as defined in MMREG.H */
  956. DWORD dwOEMVersion; /* Manufacturer version for custom ext */
  957. } MIDISTRMBUFFVER;
  958. #endif /* WINVER >= 0x0400 */
  959. /* flags for dwFlags field of MIDIHDR structure */
  960. #define MHDR_DONE 0x00000001 /* done bit */
  961. #define MHDR_PREPARED 0x00000002 /* set if header prepared */
  962. #define MHDR_INQUEUE 0x00000004 /* reserved for driver */
  963. #define MHDR_ISSTRM 0x00000008 /* Buffer is stream buffer */
  964. #define MHDR_SENDING 0x00000020 // ;internal
  965. #define MHDR_MAPPED 0x00001000 /* thunked header */ // ;internal
  966. #define MHDR_SHADOWHDR 0x00002000 /* MIDIHDR is 16-bit shadow */ // ;internal
  967. #define MHDR_VALID 0x0000302F /* valid flags */ // ;internal
  968. /*#define MHDR_VALID 0xFFFF000F /* valid flags */ // ;internal */
  969. #define MHDR_SAVE 0x00003000 /* Save these flags */ // ;internal
  970. /* past driver calls */ // ;internal
  971. #if(WINVER >= 0x0400)
  972. /* */
  973. /* Type codes which go in the high byte of the event DWORD of a stream buffer */
  974. /* */
  975. /* Type codes 00-7F contain parameters within the low 24 bits */
  976. /* Type codes 80-FF contain a length of their parameter in the low 24 */
  977. /* bits, followed by their parameter data in the buffer. The event */
  978. /* DWORD contains the exact byte length; the parm data itself must be */
  979. /* padded to be an even multiple of 4 bytes long. */
  980. /* */
  981. #define MEVT_F_SHORT 0x00000000L
  982. #define MEVT_F_LONG 0x80000000L
  983. #define MEVT_F_CALLBACK 0x40000000L
  984. #define MEVT_EVENTTYPE(x) ((BYTE)(((x)>>24)&0xFF))
  985. #define MEVT_EVENTPARM(x) ((DWORD)((x)&0x00FFFFFFL))
  986. #define MEVT_SHORTMSG ((BYTE)0x00) /* parm = shortmsg for midiOutShortMsg */
  987. #define MEVT_TEMPO ((BYTE)0x01) /* parm = new tempo in microsec/qn */
  988. #define MEVT_NOP ((BYTE)0x02) /* parm = unused; does nothing */
  989. /* 0x04-0x7F reserved */
  990. #define MEVT_LONGMSG ((BYTE)0x80) /* parm = bytes to send verbatim */
  991. #define MEVT_COMMENT ((BYTE)0x82) /* parm = comment data */
  992. #define MEVT_VERSION ((BYTE)0x84) /* parm = MIDISTRMBUFFVER struct */
  993. /* 0x81-0xFF reserved */
  994. #define MIDISTRM_ERROR (-2)
  995. /* */
  996. /* Structures and defines for midiStreamProperty */
  997. /* */
  998. #define MIDIPROP_SET 0x80000000L
  999. #define MIDIPROP_GET 0x40000000L
  1000. #define MIDIPROP_PROPVAL 0x3FFFFFFFL // ;internal
  1001. /* These are intentionally both non-zero so the app cannot accidentally */
  1002. /* leave the operation off and happen to appear to work due to default */
  1003. /* action. */
  1004. #define MIDIPROP_TIMEDIV 0x00000001L
  1005. #define MIDIPROP_TEMPO 0x00000002L
  1006. typedef struct midiproptimediv_tag
  1007. {
  1008. DWORD cbStruct;
  1009. DWORD dwTimeDiv;
  1010. } MIDIPROPTIMEDIV, FAR *LPMIDIPROPTIMEDIV;
  1011. typedef struct midiproptempo_tag
  1012. {
  1013. DWORD cbStruct;
  1014. DWORD dwTempo;
  1015. } MIDIPROPTEMPO, FAR *LPMIDIPROPTEMPO;
  1016. #endif /* WINVER >= 0x0400 */
  1017. #ifndef _WIN32_VXD
  1018. /* MIDI function prototypes */
  1019. WINMMAPI UINT WINAPI midiOutGetNumDevs(void);
  1020. #if(WINVER >= 0x0400)
  1021. WINMMAPI MMRESULT WINAPI midiStreamOpen(LPHMIDISTRM phms, LPUINT puDeviceID, DWORD cMidi, DWORD dwCallback, DWORD dwInstance, DWORD fdwOpen);
  1022. WINMMAPI MMRESULT WINAPI midiStreamClose(HMIDISTRM hms);
  1023. WINMMAPI MMRESULT WINAPI midiStreamProperty(HMIDISTRM hms, LPBYTE lppropdata, DWORD dwProperty);
  1024. WINMMAPI MMRESULT WINAPI midiStreamPosition(HMIDISTRM hms, LPMMTIME lpmmt, UINT cbmmt);
  1025. WINMMAPI MMRESULT WINAPI midiStreamOut(HMIDISTRM hms, LPMIDIHDR pmh, UINT cbmh);
  1026. WINMMAPI MMRESULT WINAPI midiStreamPause(HMIDISTRM hms);
  1027. WINMMAPI MMRESULT WINAPI midiStreamRestart(HMIDISTRM hms);
  1028. WINMMAPI MMRESULT WINAPI midiStreamStop(HMIDISTRM hms);
  1029. #ifdef _WIN32
  1030. WINMMAPI MMRESULT WINAPI midiConnect(HMIDI hmi, HMIDIOUT hmo, LPVOID pReserved);
  1031. WINMMAPI MMRESULT WINAPI midiDisconnect(HMIDI hmi, HMIDIOUT hmo, LPVOID pReserved);
  1032. #endif
  1033. #endif /* WINVER >= 0x0400 */
  1034. #ifdef _WIN32
  1035. WINMMAPI MMRESULT WINAPI midiOutGetDevCapsA(UINT uDeviceID, LPMIDIOUTCAPSA pmoc, UINT cbmoc);
  1036. WINMMAPI MMRESULT WINAPI midiOutGetDevCapsW(UINT uDeviceID, LPMIDIOUTCAPSW pmoc, UINT cbmoc);
  1037. #ifdef UNICODE
  1038. #define midiOutGetDevCaps midiOutGetDevCapsW
  1039. #else
  1040. #define midiOutGetDevCaps midiOutGetDevCapsA
  1041. #endif // !UNICODE
  1042. #else
  1043. MMRESULT WINAPI midiOutGetDevCaps(UINT uDeviceID, LPMIDIOUTCAPS pmoc, UINT cbmoc);
  1044. #endif
  1045. #if (WINVER >= 0x0400)
  1046. WINMMAPI MMRESULT WINAPI midiOutGetVolume(HMIDIOUT hmo, LPDWORD pdwVolume);
  1047. WINMMAPI MMRESULT WINAPI midiOutSetVolume(HMIDIOUT hmo, DWORD dwVolume);
  1048. #else
  1049. WINMMAPI MMRESULT WINAPI midiOutGetVolume(UINT uId, LPDWORD pdwVolume);
  1050. WINMMAPI MMRESULT WINAPI midiOutSetVolume(UINT uId, DWORD dwVolume);
  1051. #endif
  1052. #ifdef _WIN32
  1053. WINMMAPI MMRESULT WINAPI midiOutGetErrorTextA(MMRESULT mmrError, LPSTR pszText, UINT cchText);
  1054. WINMMAPI MMRESULT WINAPI midiOutGetErrorTextW(MMRESULT mmrError, LPWSTR pszText, UINT cchText);
  1055. #ifdef UNICODE
  1056. #define midiOutGetErrorText midiOutGetErrorTextW
  1057. #else
  1058. #define midiOutGetErrorText midiOutGetErrorTextA
  1059. #endif // !UNICODE
  1060. #else
  1061. WINMMAPI MMRESULT WINAPI midiOutGetErrorText(MMRESULT mmrError, LPSTR pszText, UINT cchText);
  1062. #endif
  1063. WINMMAPI MMRESULT WINAPI midiOutOpen(LPHMIDIOUT phmo, UINT uDeviceID,
  1064. DWORD dwCallback, DWORD dwInstance, DWORD fdwOpen);
  1065. WINMMAPI MMRESULT WINAPI midiOutClose(HMIDIOUT hmo);
  1066. WINMMAPI MMRESULT WINAPI midiOutPrepareHeader(HMIDIOUT hmo, LPMIDIHDR pmh, UINT cbmh);
  1067. WINMMAPI MMRESULT WINAPI midiOutUnprepareHeader(HMIDIOUT hmo, LPMIDIHDR pmh, UINT cbmh);
  1068. WINMMAPI MMRESULT WINAPI midiOutShortMsg(HMIDIOUT hmo, DWORD dwMsg);
  1069. WINMMAPI MMRESULT WINAPI midiOutLongMsg(HMIDIOUT hmo, LPMIDIHDR pmh, UINT cbmh);
  1070. WINMMAPI MMRESULT WINAPI midiOutReset(HMIDIOUT hmo);
  1071. WINMMAPI MMRESULT WINAPI midiOutCachePatches(HMIDIOUT hmo, UINT uBank, LPWORD pwpa, UINT fuCache);
  1072. WINMMAPI MMRESULT WINAPI midiOutCacheDrumPatches(HMIDIOUT hmo, UINT uPatch, LPWORD pwkya, UINT fuCache);
  1073. WINMMAPI MMRESULT WINAPI midiOutGetID(HMIDIOUT hmo, LPUINT puDeviceID);
  1074. #if (WINVER >= 0x030a)
  1075. #ifdef _WIN32
  1076. WINMMAPI MMRESULT WINAPI midiOutMessage(HMIDIOUT hmo, UINT uMsg, DWORD dw1, DWORD dw2);
  1077. #else
  1078. DWORD WINAPI midiOutMessage(HMIDIOUT hmo, UINT uMsg, DWORD dw1, DWORD dw2);
  1079. #endif
  1080. #endif /* ifdef WINVER >= 0x030a */
  1081. WINMMAPI UINT WINAPI midiInGetNumDevs(void);
  1082. #ifdef _WIN32
  1083. WINMMAPI MMRESULT WINAPI midiInGetDevCapsA(UINT uDeviceID, LPMIDIINCAPSA pmic, UINT cbmic);
  1084. WINMMAPI MMRESULT WINAPI midiInGetDevCapsW(UINT uDeviceID, LPMIDIINCAPSW pmic, UINT cbmic);
  1085. #ifdef UNICODE
  1086. #define midiInGetDevCaps midiInGetDevCapsW
  1087. #else
  1088. #define midiInGetDevCaps midiInGetDevCapsA
  1089. #endif // !UNICODE
  1090. WINMMAPI MMRESULT WINAPI midiInGetErrorTextA(MMRESULT mmrError, LPSTR pszText, UINT cchText);
  1091. WINMMAPI MMRESULT WINAPI midiInGetErrorTextW(MMRESULT mmrError, LPWSTR pszText, UINT cchText);
  1092. #ifdef UNICODE
  1093. #define midiInGetErrorText midiInGetErrorTextW
  1094. #else
  1095. #define midiInGetErrorText midiInGetErrorTextA
  1096. #endif // !UNICODE
  1097. #else
  1098. MMRESULT WINAPI midiInGetDevCaps(UINT uDeviceID, LPMIDIINCAPS pmic, UINT cbmic);
  1099. WINMMAPI MMRESULT WINAPI midiInGetErrorText(MMRESULT mmrError, LPSTR pszText, UINT cchText);
  1100. #endif
  1101. WINMMAPI MMRESULT WINAPI midiInOpen(LPHMIDIIN phmi, UINT uDeviceID,
  1102. DWORD dwCallback, DWORD dwInstance, DWORD fdwOpen);
  1103. WINMMAPI MMRESULT WINAPI midiInClose(HMIDIIN hmi);
  1104. WINMMAPI MMRESULT WINAPI midiInPrepareHeader(HMIDIIN hmi, LPMIDIHDR pmh, UINT cbmh);
  1105. WINMMAPI MMRESULT WINAPI midiInUnprepareHeader(HMIDIIN hmi, LPMIDIHDR pmh, UINT cbmh);
  1106. WINMMAPI MMRESULT WINAPI midiInAddBuffer(HMIDIIN hmi, LPMIDIHDR pmh, UINT cbmh);
  1107. WINMMAPI MMRESULT WINAPI midiInStart(HMIDIIN hmi);
  1108. WINMMAPI MMRESULT WINAPI midiInStop(HMIDIIN hmi);
  1109. WINMMAPI MMRESULT WINAPI midiInReset(HMIDIIN hmi);
  1110. WINMMAPI MMRESULT WINAPI midiInGetID(HMIDIIN hmi, LPUINT puDeviceID);
  1111. #if (WINVER >= 0x030a)
  1112. #ifdef _WIN32
  1113. WINMMAPI MMRESULT WINAPI midiInMessage(HMIDIIN hmi, UINT uMsg, DWORD dw1, DWORD dw2);
  1114. #else
  1115. DWORD WINAPI midiInMessage(HMIDIIN hmi, UINT uMsg, DWORD dw1, DWORD dw2);
  1116. #endif
  1117. #endif /* ifdef WINVER >= 0x030a */
  1118. #endif /* ifndef _WIN32_VXD */
  1119. #endif /* ifndef MMNOMIDI */
  1120. #ifndef MMNOAUX
  1121. /****************************************************************************
  1122. Auxiliary audio support
  1123. ****************************************************************************/
  1124. /* device ID for aux device mapper */
  1125. #define AUX_MAPPER ((UINT)-1)
  1126. /* Auxiliary audio device capabilities structure */
  1127. #ifdef _WIN32
  1128. typedef struct tagAUXCAPSA {
  1129. WORD wMid; /* manufacturer ID */
  1130. WORD wPid; /* product ID */
  1131. MMVERSION vDriverVersion; /* version of the driver */
  1132. CHAR szPname[MAXPNAMELEN];/* product name (NULL terminated string) */
  1133. WORD wTechnology; /* type of device */
  1134. WORD wReserved1; /* padding */
  1135. DWORD dwSupport; /* functionality supported by driver */
  1136. } AUXCAPSA, *PAUXCAPSA, *NPAUXCAPSA, *LPAUXCAPSA;
  1137. typedef struct tagAUXCAPSW {
  1138. WORD wMid; /* manufacturer ID */
  1139. WORD wPid; /* product ID */
  1140. MMVERSION vDriverVersion; /* version of the driver */
  1141. WCHAR szPname[MAXPNAMELEN];/* product name (NULL terminated string) */
  1142. WORD wTechnology; /* type of device */
  1143. WORD wReserved1; /* padding */
  1144. DWORD dwSupport; /* functionality supported by driver */
  1145. } AUXCAPSW, *PAUXCAPSW, *NPAUXCAPSW, *LPAUXCAPSW;
  1146. #ifdef UNICODE
  1147. typedef AUXCAPSW AUXCAPS;
  1148. typedef PAUXCAPSW PAUXCAPS;
  1149. typedef NPAUXCAPSW NPAUXCAPS;
  1150. typedef LPAUXCAPSW LPAUXCAPS;
  1151. #else
  1152. typedef AUXCAPSA AUXCAPS;
  1153. typedef PAUXCAPSA PAUXCAPS;
  1154. typedef NPAUXCAPSA NPAUXCAPS;
  1155. typedef LPAUXCAPSA LPAUXCAPS;
  1156. #endif // UNICODE
  1157. #else
  1158. typedef struct auxcaps_tag {
  1159. WORD wMid; /* manufacturer ID */
  1160. WORD wPid; /* product ID */
  1161. VERSION vDriverVersion; /* version of the driver */
  1162. char szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
  1163. WORD wTechnology; /* type of device */
  1164. DWORD dwSupport; /* functionality supported by driver */
  1165. } AUXCAPS, *PAUXCAPS, NEAR *NPAUXCAPS, FAR *LPAUXCAPS;
  1166. #endif
  1167. /* flags for wTechnology field in AUXCAPS structure */
  1168. #define AUXCAPS_CDAUDIO 1 /* audio from internal CD-ROM drive */
  1169. #define AUXCAPS_AUXIN 2 /* audio from auxiliary input jacks */
  1170. /* flags for dwSupport field in AUXCAPS structure */
  1171. #define AUXCAPS_VOLUME 0x0001 /* supports volume control */
  1172. #define AUXCAPS_LRVOLUME 0x0002 /* separate left-right volume control */
  1173. #ifndef _WIN32_VXD
  1174. /* auxiliary audio function prototypes */
  1175. WINMMAPI UINT WINAPI auxGetNumDevs(void);
  1176. #ifdef _WIN32
  1177. WINMMAPI MMRESULT WINAPI auxGetDevCapsA(UINT uDeviceID, LPAUXCAPSA pac, UINT cbac);
  1178. WINMMAPI MMRESULT WINAPI auxGetDevCapsW(UINT uDeviceID, LPAUXCAPSW pac, UINT cbac);
  1179. #ifdef UNICODE
  1180. #define auxGetDevCaps auxGetDevCapsW
  1181. #else
  1182. #define auxGetDevCaps auxGetDevCapsA
  1183. #endif // !UNICODE
  1184. #else
  1185. MMRESULT WINAPI auxGetDevCaps(UINT uDeviceID, LPAUXCAPS pac, UINT cbac);
  1186. #endif
  1187. WINMMAPI MMRESULT WINAPI auxSetVolume(UINT uDeviceID, DWORD dwVolume);
  1188. WINMMAPI MMRESULT WINAPI auxGetVolume(UINT uDeviceID, LPDWORD pdwVolume);
  1189. #if (WINVER >= 0x030a)
  1190. #ifdef _WIN32
  1191. WINMMAPI MMRESULT WINAPI auxOutMessage(UINT uDeviceID, UINT uMsg, DWORD dw1, DWORD dw2);
  1192. #else
  1193. DWORD WINAPI auxOutMessage(UINT uDeviceID, UINT uMsg, DWORD dw1, DWORD dw2);
  1194. #endif
  1195. #endif /* ifdef WINVER >= 0x030a */
  1196. #endif /* ifndef _WIN32_VXD */
  1197. #endif /* ifndef MMNOAUX */
  1198. #ifndef MMNOMIXER
  1199. #ifndef _WIN32_VXD
  1200. /****************************************************************************
  1201. Mixer Support
  1202. ****************************************************************************/
  1203. DECLARE_HANDLE(HMIXEROBJ);
  1204. typedef HMIXEROBJ FAR *LPHMIXEROBJ;
  1205. DECLARE_HANDLE(HMIXER);
  1206. typedef HMIXER FAR *LPHMIXER;
  1207. #define MIXER_SHORT_NAME_CHARS 16
  1208. #define MIXER_LONG_NAME_CHARS 64
  1209. /* */
  1210. /* MMRESULT error return values specific to the mixer API */
  1211. /* */
  1212. /* */
  1213. #define MIXERR_INVALLINE (MIXERR_BASE + 0)
  1214. #define MIXERR_INVALCONTROL (MIXERR_BASE + 1)
  1215. #define MIXERR_INVALVALUE (MIXERR_BASE + 2)
  1216. #define MIXERR_LASTERROR (MIXERR_BASE + 2)
  1217. #define MIXER_OBJECTF_HANDLE 0x80000000L
  1218. #define MIXER_OBJECTF_MIXER 0x00000000L
  1219. #define MIXER_OBJECTF_HMIXER (MIXER_OBJECTF_HANDLE|MIXER_OBJECTF_MIXER)
  1220. #define MIXER_OBJECTF_WAVEOUT 0x10000000L
  1221. #define MIXER_OBJECTF_HWAVEOUT (MIXER_OBJECTF_HANDLE|MIXER_OBJECTF_WAVEOUT)
  1222. #define MIXER_OBJECTF_WAVEIN 0x20000000L
  1223. #define MIXER_OBJECTF_HWAVEIN (MIXER_OBJECTF_HANDLE|MIXER_OBJECTF_WAVEIN)
  1224. #define MIXER_OBJECTF_MIDIOUT 0x30000000L
  1225. #define MIXER_OBJECTF_HMIDIOUT (MIXER_OBJECTF_HANDLE|MIXER_OBJECTF_MIDIOUT)
  1226. #define MIXER_OBJECTF_MIDIIN 0x40000000L
  1227. #define MIXER_OBJECTF_HMIDIIN (MIXER_OBJECTF_HANDLE|MIXER_OBJECTF_MIDIIN)
  1228. #define MIXER_OBJECTF_AUX 0x50000000L
  1229. #define MIXER_OBJECTF_TYPEMASK 0xF0000000L // ;internal
  1230. WINMMAPI UINT WINAPI mixerGetNumDevs(void);
  1231. #ifdef _WIN32
  1232. typedef struct tagMIXERCAPSA {
  1233. WORD wMid; /* manufacturer id */
  1234. WORD wPid; /* product id */
  1235. MMVERSION vDriverVersion; /* version of the driver */
  1236. CHAR szPname[MAXPNAMELEN]; /* product name */
  1237. DWORD fdwSupport; /* misc. support bits */
  1238. DWORD cDestinations; /* count of destinations */
  1239. } MIXERCAPSA, *PMIXERCAPSA, *LPMIXERCAPSA;
  1240. typedef struct tagMIXERCAPSW {
  1241. WORD wMid; /* manufacturer id */
  1242. WORD wPid; /* product id */
  1243. MMVERSION vDriverVersion; /* version of the driver */
  1244. WCHAR szPname[MAXPNAMELEN]; /* product name */
  1245. DWORD fdwSupport; /* misc. support bits */
  1246. DWORD cDestinations; /* count of destinations */
  1247. } MIXERCAPSW, *PMIXERCAPSW, *LPMIXERCAPSW;
  1248. #ifdef UNICODE
  1249. typedef MIXERCAPSW MIXERCAPS;
  1250. typedef PMIXERCAPSW PMIXERCAPS;
  1251. typedef LPMIXERCAPSW LPMIXERCAPS;
  1252. #else
  1253. typedef MIXERCAPSA MIXERCAPS;
  1254. typedef PMIXERCAPSA PMIXERCAPS;
  1255. typedef LPMIXERCAPSA LPMIXERCAPS;
  1256. #endif // UNICODE
  1257. #else
  1258. typedef struct tMIXERCAPS {
  1259. WORD wMid; /* manufacturer id */
  1260. WORD wPid; /* product id */
  1261. VERSION vDriverVersion; /* version of the driver */
  1262. char szPname[MAXPNAMELEN]; /* product name */
  1263. DWORD fdwSupport; /* misc. support bits */
  1264. DWORD cDestinations; /* count of destinations */
  1265. } MIXERCAPS, *PMIXERCAPS, FAR *LPMIXERCAPS;
  1266. #endif
  1267. #define MIXERCAPS_SUPPORTF_xxx 0x00000000L // ;internal
  1268. #ifdef _WIN32
  1269. WINMMAPI MMRESULT WINAPI mixerGetDevCapsA(UINT uMxId, LPMIXERCAPSA pmxcaps, UINT cbmxcaps);
  1270. WINMMAPI MMRESULT WINAPI mixerGetDevCapsW(UINT uMxId, LPMIXERCAPSW pmxcaps, UINT cbmxcaps);
  1271. #ifdef UNICODE
  1272. #define mixerGetDevCaps mixerGetDevCapsW
  1273. #else
  1274. #define mixerGetDevCaps mixerGetDevCapsA
  1275. #endif // !UNICODE
  1276. #else
  1277. MMRESULT WINAPI mixerGetDevCaps(UINT uMxId, LPMIXERCAPS pmxcaps, UINT cbmxcaps);
  1278. #endif
  1279. WINMMAPI MMRESULT WINAPI mixerOpen(LPHMIXER phmx, UINT uMxId, DWORD dwCallback, DWORD dwInstance, DWORD fdwOpen);
  1280. #define MIXER_OPENF_VALID (MIXER_OBJECTF_TYPEMASK | CALLBACK_TYPEMASK) // ;internal
  1281. WINMMAPI MMRESULT WINAPI mixerClose(HMIXER hmx);
  1282. WINMMAPI DWORD WINAPI mixerMessage(HMIXER hmx, UINT uMsg, DWORD dwParam1, DWORD dwParam2);
  1283. #ifdef _WIN32
  1284. typedef struct tagMIXERLINEA {
  1285. DWORD cbStruct; /* size of MIXERLINE structure */
  1286. DWORD dwDestination; /* zero based destination index */
  1287. DWORD dwSource; /* zero based source index (if source) */
  1288. DWORD dwLineID; /* unique line id for mixer device */
  1289. DWORD fdwLine; /* state/information about line */
  1290. DWORD dwUser; /* driver specific information */
  1291. DWORD dwComponentType; /* component type line connects to */
  1292. DWORD cChannels; /* number of channels line supports */
  1293. DWORD cConnections; /* number of connections [possible] */
  1294. DWORD cControls; /* number of controls at this line */
  1295. CHAR szShortName[MIXER_SHORT_NAME_CHARS];
  1296. CHAR szName[MIXER_LONG_NAME_CHARS];
  1297. struct {
  1298. DWORD dwType; /* MIXERLINE_TARGETTYPE_xxxx */
  1299. DWORD dwDeviceID; /* target device ID of device type */
  1300. WORD wMid; /* of target device */
  1301. WORD wPid; /* " */
  1302. MMVERSION vDriverVersion; /* " */
  1303. CHAR szPname[MAXPNAMELEN]; /* " */
  1304. } Target;
  1305. } MIXERLINEA, *PMIXERLINEA, *LPMIXERLINEA;
  1306. typedef struct tagMIXERLINEW {
  1307. DWORD cbStruct; /* size of MIXERLINE structure */
  1308. DWORD dwDestination; /* zero based destination index */
  1309. DWORD dwSource; /* zero based source index (if source) */
  1310. DWORD dwLineID; /* unique line id for mixer device */
  1311. DWORD fdwLine; /* state/information about line */
  1312. DWORD dwUser; /* driver specific information */
  1313. DWORD dwComponentType; /* component type line connects to */
  1314. DWORD cChannels; /* number of channels line supports */
  1315. DWORD cConnections; /* number of connections [possible] */
  1316. DWORD cControls; /* number of controls at this line */
  1317. WCHAR szShortName[MIXER_SHORT_NAME_CHARS];
  1318. WCHAR szName[MIXER_LONG_NAME_CHARS];
  1319. struct {
  1320. DWORD dwType; /* MIXERLINE_TARGETTYPE_xxxx */
  1321. DWORD dwDeviceID; /* target device ID of device type */
  1322. WORD wMid; /* of target device */
  1323. WORD wPid; /* " */
  1324. MMVERSION vDriverVersion; /* " */
  1325. WCHAR szPname[MAXPNAMELEN]; /* " */
  1326. } Target;
  1327. } MIXERLINEW, *PMIXERLINEW, *LPMIXERLINEW;
  1328. #ifdef UNICODE
  1329. typedef MIXERLINEW MIXERLINE;
  1330. typedef PMIXERLINEW PMIXERLINE;
  1331. typedef LPMIXERLINEW LPMIXERLINE;
  1332. #else
  1333. typedef MIXERLINEA MIXERLINE;
  1334. typedef PMIXERLINEA PMIXERLINE;
  1335. typedef LPMIXERLINEA LPMIXERLINE;
  1336. #endif // UNICODE
  1337. #else
  1338. typedef struct tMIXERLINE {
  1339. DWORD cbStruct; /* size of MIXERLINE structure */
  1340. DWORD dwDestination; /* zero based destination index */
  1341. DWORD dwSource; /* zero based source index (if source) */
  1342. DWORD dwLineID; /* unique line id for mixer device */
  1343. DWORD fdwLine; /* state/information about line */
  1344. DWORD dwUser; /* driver specific information */
  1345. DWORD dwComponentType; /* component type line connects to */
  1346. DWORD cChannels; /* number of channels line supports */
  1347. DWORD cConnections; /* number of connections [possible] */
  1348. DWORD cControls; /* number of controls at this line */
  1349. char szShortName[MIXER_SHORT_NAME_CHARS];
  1350. char szName[MIXER_LONG_NAME_CHARS];
  1351. struct {
  1352. DWORD dwType; /* MIXERLINE_TARGETTYPE_xxxx */
  1353. DWORD dwDeviceID; /* target device ID of device type */
  1354. WORD wMid; /* of target device */
  1355. WORD wPid; /* " */
  1356. VERSION vDriverVersion; /* " */
  1357. char szPname[MAXPNAMELEN]; /* " */
  1358. } Target;
  1359. } MIXERLINE, *PMIXERLINE, FAR *LPMIXERLINE;
  1360. #endif
  1361. /* */
  1362. /* MIXERLINE.fdwLine */
  1363. /* */
  1364. /* */
  1365. #define MIXERLINE_LINEF_ACTIVE 0x00000001L
  1366. #define MIXERLINE_LINEF_DISCONNECTED 0x00008000L
  1367. #define MIXERLINE_LINEF_SOURCE 0x80000000L
  1368. /* */
  1369. /* MIXERLINE.dwComponentType */
  1370. /* */
  1371. /* component types for destinations and sources */
  1372. /* */
  1373. /* */
  1374. #define MIXERLINE_COMPONENTTYPE_DST_FIRST 0x00000000L
  1375. #define MIXERLINE_COMPONENTTYPE_DST_UNDEFINED (MIXERLINE_COMPONENTTYPE_DST_FIRST + 0)
  1376. #define MIXERLINE_COMPONENTTYPE_DST_DIGITAL (MIXERLINE_COMPONENTTYPE_DST_FIRST + 1)
  1377. #define MIXERLINE_COMPONENTTYPE_DST_LINE (MIXERLINE_COMPONENTTYPE_DST_FIRST + 2)
  1378. #define MIXERLINE_COMPONENTTYPE_DST_MONITOR (MIXERLINE_COMPONENTTYPE_DST_FIRST + 3)
  1379. #define MIXERLINE_COMPONENTTYPE_DST_SPEAKERS (MIXERLINE_COMPONENTTYPE_DST_FIRST + 4)
  1380. #define MIXERLINE_COMPONENTTYPE_DST_HEADPHONES (MIXERLINE_COMPONENTTYPE_DST_FIRST + 5)
  1381. #define MIXERLINE_COMPONENTTYPE_DST_TELEPHONE (MIXERLINE_COMPONENTTYPE_DST_FIRST + 6)
  1382. #define MIXERLINE_COMPONENTTYPE_DST_WAVEIN (MIXERLINE_COMPONENTTYPE_DST_FIRST + 7)
  1383. #define MIXERLINE_COMPONENTTYPE_DST_VOICEIN (MIXERLINE_COMPONENTTYPE_DST_FIRST + 8)
  1384. #define MIXERLINE_COMPONENTTYPE_DST_LAST (MIXERLINE_COMPONENTTYPE_DST_FIRST + 8)
  1385. #define MIXERLINE_COMPONENTTYPE_SRC_FIRST 0x00001000L
  1386. #define MIXERLINE_COMPONENTTYPE_SRC_UNDEFINED (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 0)
  1387. #define MIXERLINE_COMPONENTTYPE_SRC_DIGITAL (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 1)
  1388. #define MIXERLINE_COMPONENTTYPE_SRC_LINE (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 2)
  1389. #define MIXERLINE_COMPONENTTYPE_SRC_MICROPHONE (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 3)
  1390. #define MIXERLINE_COMPONENTTYPE_SRC_SYNTHESIZER (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 4)
  1391. #define MIXERLINE_COMPONENTTYPE_SRC_COMPACTDISC (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 5)
  1392. #define MIXERLINE_COMPONENTTYPE_SRC_TELEPHONE (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 6)
  1393. #define MIXERLINE_COMPONENTTYPE_SRC_PCSPEAKER (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 7)
  1394. #define MIXERLINE_COMPONENTTYPE_SRC_WAVEOUT (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 8)
  1395. #define MIXERLINE_COMPONENTTYPE_SRC_AUXILIARY (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 9)
  1396. #define MIXERLINE_COMPONENTTYPE_SRC_ANALOG (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 10)
  1397. #define MIXERLINE_COMPONENTTYPE_SRC_LAST (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 10)
  1398. /* */
  1399. /* MIXERLINE.Target.dwType */
  1400. /* */
  1401. /* */
  1402. #define MIXERLINE_TARGETTYPE_UNDEFINED 0
  1403. #define MIXERLINE_TARGETTYPE_WAVEOUT 1
  1404. #define MIXERLINE_TARGETTYPE_WAVEIN 2
  1405. #define MIXERLINE_TARGETTYPE_MIDIOUT 3
  1406. #define MIXERLINE_TARGETTYPE_MIDIIN 4
  1407. #define MIXERLINE_TARGETTYPE_AUX 5
  1408. #ifdef _WIN32
  1409. WINMMAPI MMRESULT WINAPI mixerGetLineInfoA(HMIXEROBJ hmxobj, LPMIXERLINEA pmxl, DWORD fdwInfo);
  1410. WINMMAPI MMRESULT WINAPI mixerGetLineInfoW(HMIXEROBJ hmxobj, LPMIXERLINEW pmxl, DWORD fdwInfo);
  1411. #ifdef UNICODE
  1412. #define mixerGetLineInfo mixerGetLineInfoW
  1413. #else
  1414. #define mixerGetLineInfo mixerGetLineInfoA
  1415. #endif // !UNICODE
  1416. #else
  1417. MMRESULT WINAPI mixerGetLineInfo(HMIXEROBJ hmxobj, LPMIXERLINE pmxl, DWORD fdwInfo);
  1418. #endif
  1419. #define MIXER_GETLINEINFOF_DESTINATION 0x00000000L
  1420. #define MIXER_GETLINEINFOF_SOURCE 0x00000001L
  1421. #define MIXER_GETLINEINFOF_LINEID 0x00000002L
  1422. #define MIXER_GETLINEINFOF_COMPONENTTYPE 0x00000003L
  1423. #define MIXER_GETLINEINFOF_TARGETTYPE 0x00000004L
  1424. #define MIXER_GETLINEINFOF_QUERYMASK 0x0000000FL
  1425. #define MIXER_GETLINEINFOF_VALID (MIXER_OBJECTF_TYPEMASK | MIXER_GETLINEINFOF_QUERYMASK) // ;internal
  1426. WINMMAPI MMRESULT WINAPI mixerGetID(HMIXEROBJ hmxobj, UINT FAR *puMxId, DWORD fdwId);
  1427. #define MIXER_GETIDF_VALID (MIXER_OBJECTF_TYPEMASK) // ;internal
  1428. /* */
  1429. /* MIXERCONTROL */
  1430. /* */
  1431. /* */
  1432. #ifdef _WIN32
  1433. typedef struct tagMIXERCONTROLA {
  1434. DWORD cbStruct; /* size in bytes of MIXERCONTROL */
  1435. DWORD dwControlID; /* unique control id for mixer device */
  1436. DWORD dwControlType; /* MIXERCONTROL_CONTROLTYPE_xxx */
  1437. DWORD fdwControl; /* MIXERCONTROL_CONTROLF_xxx */
  1438. DWORD cMultipleItems; /* if MIXERCONTROL_CONTROLF_MULTIPLE set */
  1439. CHAR szShortName[MIXER_SHORT_NAME_CHARS];
  1440. CHAR szName[MIXER_LONG_NAME_CHARS];
  1441. union {
  1442. struct {
  1443. LONG lMinimum; /* signed minimum for this control */
  1444. LONG lMaximum; /* signed maximum for this control */
  1445. };
  1446. struct {
  1447. DWORD dwMinimum; /* unsigned minimum for this control */
  1448. DWORD dwMaximum; /* unsigned maximum for this control */
  1449. };
  1450. DWORD dwReserved[6];
  1451. } Bounds;
  1452. union {
  1453. DWORD cSteps; /* # of steps between min & max */
  1454. DWORD cbCustomData; /* size in bytes of custom data */
  1455. DWORD dwReserved[6]; /* !!! needed? we have cbStruct.... */
  1456. } Metrics;
  1457. } MIXERCONTROLA, *PMIXERCONTROLA, *LPMIXERCONTROLA;
  1458. typedef struct tagMIXERCONTROLW {
  1459. DWORD cbStruct; /* size in bytes of MIXERCONTROL */
  1460. DWORD dwControlID; /* unique control id for mixer device */
  1461. DWORD dwControlType; /* MIXERCONTROL_CONTROLTYPE_xxx */
  1462. DWORD fdwControl; /* MIXERCONTROL_CONTROLF_xxx */
  1463. DWORD cMultipleItems; /* if MIXERCONTROL_CONTROLF_MULTIPLE set */
  1464. WCHAR szShortName[MIXER_SHORT_NAME_CHARS];
  1465. WCHAR szName[MIXER_LONG_NAME_CHARS];
  1466. union {
  1467. struct {
  1468. LONG lMinimum; /* signed minimum for this control */
  1469. LONG lMaximum; /* signed maximum for this control */
  1470. };
  1471. struct {
  1472. DWORD dwMinimum; /* unsigned minimum for this control */
  1473. DWORD dwMaximum; /* unsigned maximum for this control */
  1474. };
  1475. DWORD dwReserved[6];
  1476. } Bounds;
  1477. union {
  1478. DWORD cSteps; /* # of steps between min & max */
  1479. DWORD cbCustomData; /* size in bytes of custom data */
  1480. DWORD dwReserved[6]; /* !!! needed? we have cbStruct.... */
  1481. } Metrics;
  1482. } MIXERCONTROLW, *PMIXERCONTROLW, *LPMIXERCONTROLW;
  1483. #ifdef UNICODE
  1484. typedef MIXERCONTROLW MIXERCONTROL;
  1485. typedef PMIXERCONTROLW PMIXERCONTROL;
  1486. typedef LPMIXERCONTROLW LPMIXERCONTROL;
  1487. #else
  1488. typedef MIXERCONTROLA MIXERCONTROL;
  1489. typedef PMIXERCONTROLA PMIXERCONTROL;
  1490. typedef LPMIXERCONTROLA LPMIXERCONTROL;
  1491. #endif // UNICODE
  1492. #else
  1493. typedef struct tMIXERCONTROL {
  1494. DWORD cbStruct; /* size in bytes of MIXERCONTROL */
  1495. DWORD dwControlID; /* unique control id for mixer device */
  1496. DWORD dwControlType; /* MIXERCONTROL_CONTROLTYPE_xxx */
  1497. DWORD fdwControl; /* MIXERCONTROL_CONTROLF_xxx */
  1498. DWORD cMultipleItems; /* if MIXERCONTROL_CONTROLF_MULTIPLE set */
  1499. char szShortName[MIXER_SHORT_NAME_CHARS];
  1500. char szName[MIXER_LONG_NAME_CHARS];
  1501. union {
  1502. struct {
  1503. LONG lMinimum; /* signed minimum for this control */
  1504. LONG lMaximum; /* signed maximum for this control */
  1505. };
  1506. struct {
  1507. DWORD dwMinimum; /* unsigned minimum for this control */
  1508. DWORD dwMaximum; /* unsigned maximum for this control */
  1509. };
  1510. DWORD dwReserved[6];
  1511. } Bounds;
  1512. union {
  1513. DWORD cSteps; /* # of steps between min & max */
  1514. DWORD cbCustomData; /* size in bytes of custom data */
  1515. DWORD dwReserved[6]; /* !!! needed? we have cbStruct.... */
  1516. } Metrics;
  1517. } MIXERCONTROL, *PMIXERCONTROL, FAR *LPMIXERCONTROL;
  1518. #endif
  1519. /* */
  1520. /* MIXERCONTROL.fdwControl */
  1521. /* */
  1522. /* */
  1523. #define MIXERCONTROL_CONTROLF_UNIFORM 0x00000001L
  1524. #define MIXERCONTROL_CONTROLF_MULTIPLE 0x00000002L
  1525. #define MIXERCONTROL_CONTROLF_DISABLED 0x80000000L
  1526. #define MIXERCONTROL_CONTROLF_VALID 0x80000003L // ;internal
  1527. /* */
  1528. /* MIXERCONTROL_CONTROLTYPE_xxx building block defines */
  1529. /* */
  1530. /* */
  1531. #define MIXERCONTROL_CT_CLASS_MASK 0xF0000000L
  1532. #define MIXERCONTROL_CT_CLASS_CUSTOM 0x00000000L
  1533. #define MIXERCONTROL_CT_CLASS_METER 0x10000000L
  1534. #define MIXERCONTROL_CT_CLASS_SWITCH 0x20000000L
  1535. #define MIXERCONTROL_CT_CLASS_NUMBER 0x30000000L
  1536. #define MIXERCONTROL_CT_CLASS_SLIDER 0x40000000L
  1537. #define MIXERCONTROL_CT_CLASS_FADER 0x50000000L
  1538. #define MIXERCONTROL_CT_CLASS_TIME 0x60000000L
  1539. #define MIXERCONTROL_CT_CLASS_LIST 0x70000000L
  1540. #define MIXERCONTROL_CT_SUBCLASS_MASK 0x0F000000L
  1541. #define MIXERCONTROL_CT_SC_SWITCH_BOOLEAN 0x00000000L
  1542. #define MIXERCONTROL_CT_SC_SWITCH_BUTTON 0x01000000L
  1543. #define MIXERCONTROL_CT_SC_METER_POLLED 0x00000000L
  1544. #define MIXERCONTROL_CT_SC_TIME_MICROSECS 0x00000000L
  1545. #define MIXERCONTROL_CT_SC_TIME_MILLISECS 0x01000000L
  1546. #define MIXERCONTROL_CT_SC_LIST_SINGLE 0x00000000L
  1547. #define MIXERCONTROL_CT_SC_LIST_MULTIPLE 0x01000000L
  1548. #define MIXERCONTROL_CT_UNITS_MASK 0x00FF0000L
  1549. #define MIXERCONTROL_CT_UNITS_CUSTOM 0x00000000L
  1550. #define MIXERCONTROL_CT_UNITS_BOOLEAN 0x00010000L
  1551. #define MIXERCONTROL_CT_UNITS_SIGNED 0x00020000L
  1552. #define MIXERCONTROL_CT_UNITS_UNSIGNED 0x00030000L
  1553. #define MIXERCONTROL_CT_UNITS_DECIBELS 0x00040000L /* in 10ths */
  1554. #define MIXERCONTROL_CT_UNITS_PERCENT 0x00050000L /* in 10ths */
  1555. /* */
  1556. /* Commonly used control types for specifying MIXERCONTROL.dwControlType */
  1557. /* */
  1558. #define MIXERCONTROL_CONTROLTYPE_CUSTOM (MIXERCONTROL_CT_CLASS_CUSTOM | MIXERCONTROL_CT_UNITS_CUSTOM)
  1559. #define MIXERCONTROL_CONTROLTYPE_BOOLEANMETER (MIXERCONTROL_CT_CLASS_METER | MIXERCONTROL_CT_SC_METER_POLLED | MIXERCONTROL_CT_UNITS_BOOLEAN)
  1560. #define MIXERCONTROL_CONTROLTYPE_SIGNEDMETER (MIXERCONTROL_CT_CLASS_METER | MIXERCONTROL_CT_SC_METER_POLLED | MIXERCONTROL_CT_UNITS_SIGNED)
  1561. #define MIXERCONTROL_CONTROLTYPE_PEAKMETER (MIXERCONTROL_CONTROLTYPE_SIGNEDMETER + 1)
  1562. #define MIXERCONTROL_CONTROLTYPE_UNSIGNEDMETER (MIXERCONTROL_CT_CLASS_METER | MIXERCONTROL_CT_SC_METER_POLLED | MIXERCONTROL_CT_UNITS_UNSIGNED)
  1563. #define MIXERCONTROL_CONTROLTYPE_BOOLEAN (MIXERCONTROL_CT_CLASS_SWITCH | MIXERCONTROL_CT_SC_SWITCH_BOOLEAN | MIXERCONTROL_CT_UNITS_BOOLEAN)
  1564. #define MIXERCONTROL_CONTROLTYPE_ONOFF (MIXERCONTROL_CONTROLTYPE_BOOLEAN + 1)
  1565. #define MIXERCONTROL_CONTROLTYPE_MUTE (MIXERCONTROL_CONTROLTYPE_BOOLEAN + 2)
  1566. #define MIXERCONTROL_CONTROLTYPE_MONO (MIXERCONTROL_CONTROLTYPE_BOOLEAN + 3)
  1567. #define MIXERCONTROL_CONTROLTYPE_LOUDNESS (MIXERCONTROL_CONTROLTYPE_BOOLEAN + 4)
  1568. #define MIXERCONTROL_CONTROLTYPE_STEREOENH (MIXERCONTROL_CONTROLTYPE_BOOLEAN + 5)
  1569. #define MIXERCONTROL_CONTROLTYPE_BUTTON (MIXERCONTROL_CT_CLASS_SWITCH | MIXERCONTROL_CT_SC_SWITCH_BUTTON | MIXERCONTROL_CT_UNITS_BOOLEAN)
  1570. #define MIXERCONTROL_CONTROLTYPE_DECIBELS (MIXERCONTROL_CT_CLASS_NUMBER | MIXERCONTROL_CT_UNITS_DECIBELS)
  1571. #define MIXERCONTROL_CONTROLTYPE_SIGNED (MIXERCONTROL_CT_CLASS_NUMBER | MIXERCONTROL_CT_UNITS_SIGNED)
  1572. #define MIXERCONTROL_CONTROLTYPE_UNSIGNED (MIXERCONTROL_CT_CLASS_NUMBER | MIXERCONTROL_CT_UNITS_UNSIGNED)
  1573. #define MIXERCONTROL_CONTROLTYPE_PERCENT (MIXERCONTROL_CT_CLASS_NUMBER | MIXERCONTROL_CT_UNITS_PERCENT)
  1574. #define MIXERCONTROL_CONTROLTYPE_SLIDER (MIXERCONTROL_CT_CLASS_SLIDER | MIXERCONTROL_CT_UNITS_SIGNED)
  1575. #define MIXERCONTROL_CONTROLTYPE_PAN (MIXERCONTROL_CONTROLTYPE_SLIDER + 1)
  1576. #define MIXERCONTROL_CONTROLTYPE_QSOUNDPAN (MIXERCONTROL_CONTROLTYPE_SLIDER + 2)
  1577. #define MIXERCONTROL_CONTROLTYPE_FADER (MIXERCONTROL_CT_CLASS_FADER | MIXERCONTROL_CT_UNITS_UNSIGNED)
  1578. #define MIXERCONTROL_CONTROLTYPE_VOLUME (MIXERCONTROL_CONTROLTYPE_FADER + 1)
  1579. #define MIXERCONTROL_CONTROLTYPE_BASS (MIXERCONTROL_CONTROLTYPE_FADER + 2)
  1580. #define MIXERCONTROL_CONTROLTYPE_TREBLE (MIXERCONTROL_CONTROLTYPE_FADER + 3)
  1581. #define MIXERCONTROL_CONTROLTYPE_EQUALIZER (MIXERCONTROL_CONTROLTYPE_FADER + 4)
  1582. #define MIXERCONTROL_CONTROLTYPE_SINGLESELECT (MIXERCONTROL_CT_CLASS_LIST | MIXERCONTROL_CT_SC_LIST_SINGLE | MIXERCONTROL_CT_UNITS_BOOLEAN)
  1583. #define MIXERCONTROL_CONTROLTYPE_MUX (MIXERCONTROL_CONTROLTYPE_SINGLESELECT + 1)
  1584. #define MIXERCONTROL_CONTROLTYPE_MULTIPLESELECT (MIXERCONTROL_CT_CLASS_LIST | MIXERCONTROL_CT_SC_LIST_MULTIPLE | MIXERCONTROL_CT_UNITS_BOOLEAN)
  1585. #define MIXERCONTROL_CONTROLTYPE_MIXER (MIXERCONTROL_CONTROLTYPE_MULTIPLESELECT + 1)
  1586. #define MIXERCONTROL_CONTROLTYPE_MICROTIME (MIXERCONTROL_CT_CLASS_TIME | MIXERCONTROL_CT_SC_TIME_MICROSECS | MIXERCONTROL_CT_UNITS_UNSIGNED)
  1587. #define MIXERCONTROL_CONTROLTYPE_MILLITIME (MIXERCONTROL_CT_CLASS_TIME | MIXERCONTROL_CT_SC_TIME_MILLISECS | MIXERCONTROL_CT_UNITS_UNSIGNED)
  1588. /* */
  1589. /* MIXERLINECONTROLS */
  1590. /* */
  1591. #ifdef _WIN32
  1592. typedef struct tagMIXERLINECONTROLSA {
  1593. DWORD cbStruct; /* size in bytes of MIXERLINECONTROLS */
  1594. DWORD dwLineID; /* line id (from MIXERLINE.dwLineID) */
  1595. union {
  1596. DWORD dwControlID; /* MIXER_GETLINECONTROLSF_ONEBYID */
  1597. DWORD dwControlType; /* MIXER_GETLINECONTROLSF_ONEBYTYPE */
  1598. };
  1599. DWORD cControls; /* count of controls pmxctrl points to */
  1600. DWORD cbmxctrl; /* size in bytes of _one_ MIXERCONTROL */
  1601. LPMIXERCONTROLA pamxctrl; /* pointer to first MIXERCONTROL array */
  1602. } MIXERLINECONTROLSA, *PMIXERLINECONTROLSA, *LPMIXERLINECONTROLSA;
  1603. typedef struct tagMIXERLINECONTROLSW {
  1604. DWORD cbStruct; /* size in bytes of MIXERLINECONTROLS */
  1605. DWORD dwLineID; /* line id (from MIXERLINE.dwLineID) */
  1606. union {
  1607. DWORD dwControlID; /* MIXER_GETLINECONTROLSF_ONEBYID */
  1608. DWORD dwControlType; /* MIXER_GETLINECONTROLSF_ONEBYTYPE */
  1609. };
  1610. DWORD cControls; /* count of controls pmxctrl points to */
  1611. DWORD cbmxctrl; /* size in bytes of _one_ MIXERCONTROL */
  1612. LPMIXERCONTROLW pamxctrl; /* pointer to first MIXERCONTROL array */
  1613. } MIXERLINECONTROLSW, *PMIXERLINECONTROLSW, *LPMIXERLINECONTROLSW;
  1614. #ifdef UNICODE
  1615. typedef MIXERLINECONTROLSW MIXERLINECONTROLS;
  1616. typedef PMIXERLINECONTROLSW PMIXERLINECONTROLS;
  1617. typedef LPMIXERLINECONTROLSW LPMIXERLINECONTROLS;
  1618. #else
  1619. typedef MIXERLINECONTROLSA MIXERLINECONTROLS;
  1620. typedef PMIXERLINECONTROLSA PMIXERLINECONTROLS;
  1621. typedef LPMIXERLINECONTROLSA LPMIXERLINECONTROLS;
  1622. #endif // UNICODE
  1623. #else
  1624. typedef struct tMIXERLINECONTROLS {
  1625. DWORD cbStruct; /* size in bytes of MIXERLINECONTROLS */
  1626. DWORD dwLineID; /* line id (from MIXERLINE.dwLineID) */
  1627. union {
  1628. DWORD dwControlID; /* MIXER_GETLINECONTROLSF_ONEBYID */
  1629. DWORD dwControlType; /* MIXER_GETLINECONTROLSF_ONEBYTYPE */
  1630. };
  1631. DWORD cControls; /* count of controls pmxctrl points to */
  1632. DWORD cbmxctrl; /* size in bytes of _one_ MIXERCONTROL */
  1633. LPMIXERCONTROL pamxctrl; /* pointer to first MIXERCONTROL array */
  1634. } MIXERLINECONTROLS, *PMIXERLINECONTROLS, FAR *LPMIXERLINECONTROLS;
  1635. #endif
  1636. /* */
  1637. /* */
  1638. /* */
  1639. #ifdef _WIN32
  1640. WINMMAPI MMRESULT WINAPI mixerGetLineControlsA(HMIXEROBJ hmxobj, LPMIXERLINECONTROLSA pmxlc, DWORD fdwControls);
  1641. WINMMAPI MMRESULT WINAPI mixerGetLineControlsW(HMIXEROBJ hmxobj, LPMIXERLINECONTROLSW pmxlc, DWORD fdwControls);
  1642. #ifdef UNICODE
  1643. #define mixerGetLineControls mixerGetLineControlsW
  1644. #else
  1645. #define mixerGetLineControls mixerGetLineControlsA
  1646. #endif // !UNICODE
  1647. #else
  1648. MMRESULT WINAPI mixerGetLineControls(HMIXEROBJ hmxobj, LPMIXERLINECONTROLS pmxlc, DWORD fdwControls);
  1649. #endif
  1650. #define MIXER_GETLINECONTROLSF_ALL 0x00000000L
  1651. #define MIXER_GETLINECONTROLSF_ONEBYID 0x00000001L
  1652. #define MIXER_GETLINECONTROLSF_ONEBYTYPE 0x00000002L
  1653. #define MIXER_GETLINECONTROLSF_QUERYMASK 0x0000000FL
  1654. #define MIXER_GETLINECONTROLSF_VALID (MIXER_OBJECTF_TYPEMASK | MIXER_GETLINECONTROLSF_QUERYMASK) // ;internal
  1655. typedef struct tMIXERCONTROLDETAILS {
  1656. DWORD cbStruct; /* size in bytes of MIXERCONTROLDETAILS */
  1657. DWORD dwControlID; /* control id to get/set details on */
  1658. DWORD cChannels; /* number of channels in paDetails array */
  1659. union {
  1660. HWND hwndOwner; /* for MIXER_SETCONTROLDETAILSF_CUSTOM */
  1661. DWORD cMultipleItems; /* if _MULTIPLE, the number of items per channel */
  1662. };
  1663. DWORD cbDetails; /* size of _one_ details_XX struct */
  1664. LPVOID paDetails; /* pointer to array of details_XX structs */
  1665. } MIXERCONTROLDETAILS, *PMIXERCONTROLDETAILS, FAR *LPMIXERCONTROLDETAILS;
  1666. /* */
  1667. /* MIXER_GETCONTROLDETAILSF_LISTTEXT */
  1668. /* */
  1669. /* */
  1670. #ifdef _WIN32
  1671. typedef struct tagMIXERCONTROLDETAILS_LISTTEXTA {
  1672. DWORD dwParam1;
  1673. DWORD dwParam2;
  1674. CHAR szName[MIXER_LONG_NAME_CHARS];
  1675. } MIXERCONTROLDETAILS_LISTTEXTA, *PMIXERCONTROLDETAILS_LISTTEXTA, *LPMIXERCONTROLDETAILS_LISTTEXTA;
  1676. typedef struct tagMIXERCONTROLDETAILS_LISTTEXTW {
  1677. DWORD dwParam1;
  1678. DWORD dwParam2;
  1679. WCHAR szName[MIXER_LONG_NAME_CHARS];
  1680. } MIXERCONTROLDETAILS_LISTTEXTW, *PMIXERCONTROLDETAILS_LISTTEXTW, *LPMIXERCONTROLDETAILS_LISTTEXTW;
  1681. #ifdef UNICODE
  1682. typedef MIXERCONTROLDETAILS_LISTTEXTW MIXERCONTROLDETAILS_LISTTEXT;
  1683. typedef PMIXERCONTROLDETAILS_LISTTEXTW PMIXERCONTROLDETAILS_LISTTEXT;
  1684. typedef LPMIXERCONTROLDETAILS_LISTTEXTW LPMIXERCONTROLDETAILS_LISTTEXT;
  1685. #else
  1686. typedef MIXERCONTROLDETAILS_LISTTEXTA MIXERCONTROLDETAILS_LISTTEXT;
  1687. typedef PMIXERCONTROLDETAILS_LISTTEXTA PMIXERCONTROLDETAILS_LISTTEXT;
  1688. typedef LPMIXERCONTROLDETAILS_LISTTEXTA LPMIXERCONTROLDETAILS_LISTTEXT;
  1689. #endif // UNICODE
  1690. #else
  1691. typedef struct tMIXERCONTROLDETAILS_LISTTEXT {
  1692. DWORD dwParam1;
  1693. DWORD dwParam2;
  1694. char szName[MIXER_LONG_NAME_CHARS];
  1695. } MIXERCONTROLDETAILS_LISTTEXT, *PMIXERCONTROLDETAILS_LISTTEXT, FAR *LPMIXERCONTROLDETAILS_LISTTEXT;
  1696. #endif
  1697. /* */
  1698. /* MIXER_GETCONTROLDETAILSF_VALUE */
  1699. /* */
  1700. /* */
  1701. typedef struct tMIXERCONTROLDETAILS_BOOLEAN {
  1702. LONG fValue;
  1703. } MIXERCONTROLDETAILS_BOOLEAN,
  1704. *PMIXERCONTROLDETAILS_BOOLEAN,
  1705. FAR *LPMIXERCONTROLDETAILS_BOOLEAN;
  1706. typedef struct tMIXERCONTROLDETAILS_SIGNED {
  1707. LONG lValue;
  1708. } MIXERCONTROLDETAILS_SIGNED,
  1709. *PMIXERCONTROLDETAILS_SIGNED,
  1710. FAR *LPMIXERCONTROLDETAILS_SIGNED;
  1711. typedef struct tMIXERCONTROLDETAILS_UNSIGNED {
  1712. DWORD dwValue;
  1713. } MIXERCONTROLDETAILS_UNSIGNED,
  1714. *PMIXERCONTROLDETAILS_UNSIGNED,
  1715. FAR *LPMIXERCONTROLDETAILS_UNSIGNED;
  1716. #ifdef _WIN32
  1717. WINMMAPI MMRESULT WINAPI mixerGetControlDetailsA(HMIXEROBJ hmxobj, LPMIXERCONTROLDETAILS pmxcd, DWORD fdwDetails);
  1718. WINMMAPI MMRESULT WINAPI mixerGetControlDetailsW(HMIXEROBJ hmxobj, LPMIXERCONTROLDETAILS pmxcd, DWORD fdwDetails);
  1719. #ifdef UNICODE
  1720. #define mixerGetControlDetails mixerGetControlDetailsW
  1721. #else
  1722. #define mixerGetControlDetails mixerGetControlDetailsA
  1723. #endif // !UNICODE
  1724. #else
  1725. MMRESULT WINAPI mixerGetControlDetails(HMIXEROBJ hmxobj, LPMIXERCONTROLDETAILS pmxcd, DWORD fdwDetails);
  1726. #endif
  1727. #define MIXER_GETCONTROLDETAILSF_VALUE 0x00000000L
  1728. #define MIXER_GETCONTROLDETAILSF_LISTTEXT 0x00000001L
  1729. #define MIXER_GETCONTROLDETAILSF_QUERYMASK 0x0000000FL
  1730. #define MIXER_GETCONTROLDETAILSF_VALID (MIXER_OBJECTF_TYPEMASK | MIXER_GETCONTROLDETAILSF_QUERYMASK) // ;internal
  1731. WINMMAPI MMRESULT WINAPI mixerSetControlDetails(HMIXEROBJ hmxobj, LPMIXERCONTROLDETAILS pmxcd, DWORD fdwDetails);
  1732. #define MIXER_SETCONTROLDETAILSF_VALUE 0x00000000L
  1733. #define MIXER_SETCONTROLDETAILSF_CUSTOM 0x00000001L
  1734. #define MIXER_SETCONTROLDETAILSF_QUERYMASK 0x0000000FL
  1735. #define MIXER_SETCONTROLDETAILSF_VALID (MIXER_OBJECTF_TYPEMASK | MIXER_SETCONTROLDETAILSF_QUERYMASK) // ;internal
  1736. #endif /* ifndef _WIN32_VXD */
  1737. #endif /* ifndef MMNOMIXER */
  1738. #ifndef MMNOTIMER
  1739. #ifndef _WIN32_VXD
  1740. /****************************************************************************
  1741. Timer support
  1742. ****************************************************************************/
  1743. /* timer error return values */
  1744. #define TIMERR_NOERROR (0) /* no error */
  1745. #define TIMERR_NOCANDO (TIMERR_BASE+1) /* request not completed */
  1746. #define TIMERR_STRUCT (TIMERR_BASE+33) /* time struct size */
  1747. /* timer data types */
  1748. #ifdef BUILDDLL // ;internal
  1749. typedef void (FAR PASCAL TIMECALLBACK)(UINT uTimerID, UINT uMsg, DWORD dwUser, DWORD dw1, DWORD dw2); // ;internal
  1750. #else /* ifdef BUILDDLL */ // ;internal
  1751. typedef void (CALLBACK TIMECALLBACK)(UINT uTimerID, UINT uMsg, DWORD dwUser, DWORD dw1, DWORD dw2);
  1752. #endif /* ifdef BUILDDLL */ // ;internal
  1753. typedef TIMECALLBACK FAR *LPTIMECALLBACK;
  1754. /* flags for fuEvent parameter of timeSetEvent() function */
  1755. #define TIME_ONESHOT 0x0000 /* program timer for single event */
  1756. #define TIME_PERIODIC 0x0001 /* program for continuous periodic event */
  1757. #ifdef _WIN32
  1758. #define TIME_CALLBACK_FUNCTION 0x0000 /* callback is function */
  1759. #define TIME_CALLBACK_EVENT_SET 0x0010 /* callback is event - use SetEvent */
  1760. #define TIME_CALLBACK_EVENT_PULSE 0x0020 /* callback is event - use PulseEvent */
  1761. #define TIME_CALLBACK_TYPEMASK 0x00F0 // ;internal
  1762. #endif
  1763. /* timer device capabilities data structure */
  1764. typedef struct timecaps_tag {
  1765. UINT wPeriodMin; /* minimum period supported */
  1766. UINT wPeriodMax; /* maximum period supported */
  1767. } TIMECAPS, *PTIMECAPS, NEAR *NPTIMECAPS, FAR *LPTIMECAPS;
  1768. /* timer function prototypes */
  1769. WINMMAPI MMRESULT WINAPI timeGetSystemTime(LPMMTIME pmmt, UINT cbmmt);
  1770. WINMMAPI DWORD WINAPI timeGetTime(void);
  1771. WINMMAPI MMRESULT WINAPI timeSetEvent(UINT uDelay, UINT uResolution,
  1772. LPTIMECALLBACK fptc, DWORD dwUser, UINT fuEvent);
  1773. WINMMAPI MMRESULT WINAPI timeKillEvent(UINT uTimerID);
  1774. WINMMAPI MMRESULT WINAPI timeGetDevCaps(LPTIMECAPS ptc, UINT cbtc);
  1775. WINMMAPI MMRESULT WINAPI timeBeginPeriod(UINT uPeriod);
  1776. WINMMAPI MMRESULT WINAPI timeEndPeriod(UINT uPeriod);
  1777. #endif /* ifndef _WIN32_VXD */
  1778. #endif /* ifndef MMNOTIMER */
  1779. #ifndef MMNOJOY
  1780. /****************************************************************************
  1781. Joystick support
  1782. ****************************************************************************/
  1783. /* joystick error return values */
  1784. #define JOYERR_NOERROR (0) /* no error */
  1785. #define JOYERR_PARMS (JOYERR_BASE+5) /* bad parameters */
  1786. #define JOYERR_NOCANDO (JOYERR_BASE+6) /* request not completed */
  1787. #define JOYERR_UNPLUGGED (JOYERR_BASE+7) /* joystick is unplugged */
  1788. /* constants used with JOYINFO and JOYINFOEX structures and MM_JOY* messages */
  1789. #define JOY_BUTTON1 0x0001
  1790. #define JOY_BUTTON2 0x0002
  1791. #define JOY_BUTTON3 0x0004
  1792. #define JOY_BUTTON4 0x0008
  1793. #define JOY_BUTTON1CHG 0x0100
  1794. #define JOY_BUTTON2CHG 0x0200
  1795. #define JOY_BUTTON3CHG 0x0400
  1796. #define JOY_BUTTON4CHG 0x0800
  1797. /* constants used with JOYINFOEX */
  1798. #define JOY_BUTTON5 0x00000010l
  1799. #define JOY_BUTTON6 0x00000020l
  1800. #define JOY_BUTTON7 0x00000040l
  1801. #define JOY_BUTTON8 0x00000080l
  1802. #define JOY_BUTTON9 0x00000100l
  1803. #define JOY_BUTTON10 0x00000200l
  1804. #define JOY_BUTTON11 0x00000400l
  1805. #define JOY_BUTTON12 0x00000800l
  1806. #define JOY_BUTTON13 0x00001000l
  1807. #define JOY_BUTTON14 0x00002000l
  1808. #define JOY_BUTTON15 0x00004000l
  1809. #define JOY_BUTTON16 0x00008000l
  1810. #define JOY_BUTTON17 0x00010000l
  1811. #define JOY_BUTTON18 0x00020000l
  1812. #define JOY_BUTTON19 0x00040000l
  1813. #define JOY_BUTTON20 0x00080000l
  1814. #define JOY_BUTTON21 0x00100000l
  1815. #define JOY_BUTTON22 0x00200000l
  1816. #define JOY_BUTTON23 0x00400000l
  1817. #define JOY_BUTTON24 0x00800000l
  1818. #define JOY_BUTTON25 0x01000000l
  1819. #define JOY_BUTTON26 0x02000000l
  1820. #define JOY_BUTTON27 0x04000000l
  1821. #define JOY_BUTTON28 0x08000000l
  1822. #define JOY_BUTTON29 0x10000000l
  1823. #define JOY_BUTTON30 0x20000000l
  1824. #define JOY_BUTTON31 0x40000000l
  1825. #define JOY_BUTTON32 0x80000000l
  1826. /* constants used with JOYINFOEX structure */
  1827. #define JOY_POVCENTERED (WORD) -1
  1828. #define JOY_POVFORWARD 0
  1829. #define JOY_POVRIGHT 9000
  1830. #define JOY_POVBACKWARD 18000
  1831. #define JOY_POVLEFT 27000
  1832. #define JOY_RETURNX 0x00000001l
  1833. #define JOY_RETURNY 0x00000002l
  1834. #define JOY_RETURNZ 0x00000004l
  1835. #define JOY_RETURNR 0x00000008l
  1836. #define JOY_RETURNU 0x00000010l /* axis 5 */
  1837. #define JOY_RETURNV 0x00000020l /* axis 6 */
  1838. #define JOY_RETURNPOV 0x00000040l
  1839. #define JOY_RETURNBUTTONS 0x00000080l
  1840. #define JOY_RETURNRAWDATA 0x00000100l
  1841. #define JOY_RETURNPOVCTS 0x00000200l
  1842. #define JOY_RETURNCENTERED 0x00000400l
  1843. #define JOY_USEDEADZONE 0x00000800l
  1844. #define JOY_RETURNALL (JOY_RETURNX | JOY_RETURNY | JOY_RETURNZ | \
  1845. JOY_RETURNR | JOY_RETURNU | JOY_RETURNV | \
  1846. JOY_RETURNPOV | JOY_RETURNBUTTONS)
  1847. #define JOY_CAL_READALWAYS 0x00010000l
  1848. #define JOY_CAL_READXYONLY 0x00020000l
  1849. #define JOY_CAL_READ3 0x00040000l
  1850. #define JOY_CAL_READ4 0x00080000l
  1851. #define JOY_CAL_READXONLY 0x00100000l
  1852. #define JOY_CAL_READYONLY 0x00200000l
  1853. #define JOY_CAL_READ5 0x00400000l
  1854. #define JOY_CAL_READ6 0x00800000l
  1855. #define JOY_CAL_READZONLY 0x01000000l
  1856. #define JOY_CAL_READRONLY 0x02000000l
  1857. #define JOY_CAL_READUONLY 0x04000000l
  1858. #define JOY_CAL_READVONLY 0x08000000l
  1859. /* joystick ID constants */
  1860. #define JOYSTICKID1 0
  1861. #define JOYSTICKID2 1
  1862. /* joystick driver capabilites */
  1863. #define JOYCAPS_HASZ 0x0001
  1864. #define JOYCAPS_HASR 0x0002
  1865. #define JOYCAPS_HASU 0x0004
  1866. #define JOYCAPS_HASV 0x0008
  1867. #define JOYCAPS_HASPOV 0x0010
  1868. #define JOYCAPS_POV4DIR 0x0020
  1869. #define JOYCAPS_POVCTS 0x0040
  1870. /* joystick device capabilities data structure */
  1871. #ifdef _WIN32
  1872. typedef struct tagJOYCAPSA {
  1873. WORD wMid; /* manufacturer ID */
  1874. WORD wPid; /* product ID */
  1875. CHAR szPname[MAXPNAMELEN];/* product name (NULL terminated string) */
  1876. UINT wXmin; /* minimum x position value */
  1877. UINT wXmax; /* maximum x position value */
  1878. UINT wYmin; /* minimum y position value */
  1879. UINT wYmax; /* maximum y position value */
  1880. UINT wZmin; /* minimum z position value */
  1881. UINT wZmax; /* maximum z position value */
  1882. UINT wNumButtons; /* number of buttons */
  1883. UINT wPeriodMin; /* minimum message period when captured */
  1884. UINT wPeriodMax; /* maximum message period when captured */
  1885. #if (WINVER >= 0x0400)
  1886. UINT wRmin; /* minimum r position value */
  1887. UINT wRmax; /* maximum r position value */
  1888. UINT wUmin; /* minimum u (5th axis) position value */
  1889. UINT wUmax; /* maximum u (5th axis) position value */
  1890. UINT wVmin; /* minimum v (6th axis) position value */
  1891. UINT wVmax; /* maximum v (6th axis) position value */
  1892. UINT wCaps; /* joystick capabilites */
  1893. UINT wMaxAxes; /* maximum number of axes supported */
  1894. UINT wNumAxes; /* number of axes in use */
  1895. UINT wMaxButtons; /* maximum number of buttons supported */
  1896. CHAR szRegKey[MAXPNAMELEN];/* registry key */
  1897. CHAR szOEMVxD[MAX_JOYSTICKOEMVXDNAME]; /* OEM VxD in use */
  1898. #endif
  1899. } JOYCAPSA, *PJOYCAPSA, *NPJOYCAPSA, *LPJOYCAPSA;
  1900. typedef struct tagJOYCAPSW {
  1901. WORD wMid; /* manufacturer ID */
  1902. WORD wPid; /* product ID */
  1903. WCHAR szPname[MAXPNAMELEN];/* product name (NULL terminated string) */
  1904. UINT wXmin; /* minimum x position value */
  1905. UINT wXmax; /* maximum x position value */
  1906. UINT wYmin; /* minimum y position value */
  1907. UINT wYmax; /* maximum y position value */
  1908. UINT wZmin; /* minimum z position value */
  1909. UINT wZmax; /* maximum z position value */
  1910. UINT wNumButtons; /* number of buttons */
  1911. UINT wPeriodMin; /* minimum message period when captured */
  1912. UINT wPeriodMax; /* maximum message period when captured */
  1913. #if (WINVER >= 0x0400)
  1914. UINT wRmin; /* minimum r position value */
  1915. UINT wRmax; /* maximum r position value */
  1916. UINT wUmin; /* minimum u (5th axis) position value */
  1917. UINT wUmax; /* maximum u (5th axis) position value */
  1918. UINT wVmin; /* minimum v (6th axis) position value */
  1919. UINT wVmax; /* maximum v (6th axis) position value */
  1920. UINT wCaps; /* joystick capabilites */
  1921. UINT wMaxAxes; /* maximum number of axes supported */
  1922. UINT wNumAxes; /* number of axes in use */
  1923. UINT wMaxButtons; /* maximum number of buttons supported */
  1924. WCHAR szRegKey[MAXPNAMELEN];/* registry key */
  1925. WCHAR szOEMVxD[MAX_JOYSTICKOEMVXDNAME]; /* OEM VxD in use */
  1926. #endif
  1927. } JOYCAPSW, *PJOYCAPSW, *NPJOYCAPSW, *LPJOYCAPSW;
  1928. #ifdef UNICODE
  1929. typedef JOYCAPSW JOYCAPS;
  1930. typedef PJOYCAPSW PJOYCAPS;
  1931. typedef NPJOYCAPSW NPJOYCAPS;
  1932. typedef LPJOYCAPSW LPJOYCAPS;
  1933. #else
  1934. typedef JOYCAPSA JOYCAPS;
  1935. typedef PJOYCAPSA PJOYCAPS;
  1936. typedef NPJOYCAPSA NPJOYCAPS;
  1937. typedef LPJOYCAPSA LPJOYCAPS;
  1938. #endif // UNICODE
  1939. #else
  1940. typedef struct joycaps_tag {
  1941. WORD wMid; /* manufacturer ID */
  1942. WORD wPid; /* product ID */
  1943. char szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
  1944. UINT wXmin; /* minimum x position value */
  1945. UINT wXmax; /* maximum x position value */
  1946. UINT wYmin; /* minimum y position value */
  1947. UINT wYmax; /* maximum y position value */
  1948. UINT wZmin; /* minimum z position value */
  1949. UINT wZmax; /* maximum z position value */
  1950. UINT wNumButtons; /* number of buttons */
  1951. UINT wPeriodMin; /* minimum message period when captured */
  1952. UINT wPeriodMax; /* maximum message period when captured */
  1953. #if (WINVER >= 0x0400)
  1954. UINT wRmin; /* minimum r position value */
  1955. UINT wRmax; /* maximum r position value */
  1956. UINT wUmin; /* minimum u (5th axis) position value */
  1957. UINT wUmax; /* maximum u (5th axis) position value */
  1958. UINT wVmin; /* minimum v (6th axis) position value */
  1959. UINT wVmax; /* maximum v (6th axis) position value */
  1960. UINT wCaps; /* joystick capabilites */
  1961. UINT wMaxAxes; /* maximum number of axes supported */
  1962. UINT wNumAxes; /* number of axes in use */
  1963. UINT wMaxButtons; /* maximum number of buttons supported */
  1964. char szRegKey[MAXPNAMELEN]; /* registry key */
  1965. char szOEMVxD[MAX_JOYSTICKOEMVXDNAME]; /* OEM VxD in use */
  1966. #endif
  1967. } JOYCAPS, *PJOYCAPS, NEAR *NPJOYCAPS, FAR *LPJOYCAPS;
  1968. #endif
  1969. /* joystick information data structure */
  1970. typedef struct joyinfo_tag {
  1971. UINT wXpos; /* x position */
  1972. UINT wYpos; /* y position */
  1973. UINT wZpos; /* z position */
  1974. UINT wButtons; /* button states */
  1975. } JOYINFO, *PJOYINFO, NEAR *NPJOYINFO, FAR *LPJOYINFO;
  1976. #if(WINVER >= 0x0400)
  1977. typedef struct joyinfoex_tag {
  1978. DWORD dwSize; /* size of structure */
  1979. DWORD dwFlags; /* flags to indicate what to return */
  1980. DWORD dwXpos; /* x position */
  1981. DWORD dwYpos; /* y position */
  1982. DWORD dwZpos; /* z position */
  1983. DWORD dwRpos; /* rudder/4th axis position */
  1984. DWORD dwUpos; /* 5th axis position */
  1985. DWORD dwVpos; /* 6th axis position */
  1986. DWORD dwButtons; /* button states */
  1987. DWORD dwButtonNumber; /* current button number pressed */
  1988. DWORD dwPOV; /* point of view state */
  1989. DWORD dwReserved1; /* reserved for communication between winmm & driver */
  1990. DWORD dwReserved2; /* reserved for future expansion */
  1991. } JOYINFOEX, *PJOYINFOEX, NEAR *NPJOYINFOEX, FAR *LPJOYINFOEX;
  1992. #endif /* WINVER >= 0x0400 */
  1993. #ifndef _WIN32_VXD
  1994. /* joystick function prototypes */
  1995. WINMMAPI UINT WINAPI joyGetNumDevs(void);
  1996. #ifdef _WIN32
  1997. WINMMAPI MMRESULT WINAPI joyGetDevCapsA(UINT uJoyID, LPJOYCAPSA pjc, UINT cbjc);
  1998. WINMMAPI MMRESULT WINAPI joyGetDevCapsW(UINT uJoyID, LPJOYCAPSW pjc, UINT cbjc);
  1999. #ifdef UNICODE
  2000. #define joyGetDevCaps joyGetDevCapsW
  2001. #else
  2002. #define joyGetDevCaps joyGetDevCapsA
  2003. #endif // !UNICODE
  2004. #else
  2005. MMRESULT WINAPI joyGetDevCaps(UINT uJoyID, LPJOYCAPS pjc, UINT cbjc);
  2006. #endif
  2007. WINMMAPI MMRESULT WINAPI joyGetPos(UINT uJoyID, LPJOYINFO pji);
  2008. #if(WINVER >= 0x0400)
  2009. WINMMAPI MMRESULT WINAPI joyGetPosEx(UINT uJoyID, LPJOYINFOEX pji);
  2010. #endif /* WINVER >= 0x0400 */
  2011. WINMMAPI MMRESULT WINAPI joyGetThreshold(UINT uJoyID, LPUINT puThreshold);
  2012. WINMMAPI MMRESULT WINAPI joyReleaseCapture(UINT uJoyID);
  2013. WINMMAPI MMRESULT WINAPI joySetCapture(HWND hwnd, UINT uJoyID, UINT uPeriod,
  2014. BOOL fChanged);
  2015. WINMMAPI MMRESULT WINAPI joySetThreshold(UINT uJoyID, UINT uThreshold);
  2016. UINT WINAPI joySetCalibration(UINT uJoyID, LPUINT puXbase, // ;internal
  2017. LPUINT puXdelta, LPUINT puYbase, LPUINT puYdelta, // ;internal
  2018. LPUINT puZbase, LPUINT puZdelta); // ;internal
  2019. #if (WINVER >= 0x0400) // ;internal
  2020. WINMMAPI MMRESULT WINAPI joyConfigChanged( DWORD dwFlags ); // ;internal
  2021. #endif // ;internal
  2022. #endif /* ifndef _WIN32_VXD */
  2023. #endif /* ifndef MMNOJOY */
  2024. #ifndef MMNOMMIO
  2025. #ifndef _WIN32_VXD
  2026. /****************************************************************************
  2027. Multimedia File I/O support
  2028. ****************************************************************************/
  2029. /* MMIO error return values */
  2030. #define MMIOERR_BASE 256
  2031. #define MMIOERR_FILENOTFOUND (MMIOERR_BASE + 1) /* file not found */
  2032. #define MMIOERR_OUTOFMEMORY (MMIOERR_BASE + 2) /* out of memory */
  2033. #define MMIOERR_CANNOTOPEN (MMIOERR_BASE + 3) /* cannot open */
  2034. #define MMIOERR_CANNOTCLOSE (MMIOERR_BASE + 4) /* cannot close */
  2035. #define MMIOERR_CANNOTREAD (MMIOERR_BASE + 5) /* cannot read */
  2036. #define MMIOERR_CANNOTWRITE (MMIOERR_BASE + 6) /* cannot write */
  2037. #define MMIOERR_CANNOTSEEK (MMIOERR_BASE + 7) /* cannot seek */
  2038. #define MMIOERR_CANNOTEXPAND (MMIOERR_BASE + 8) /* cannot expand file */
  2039. #define MMIOERR_CHUNKNOTFOUND (MMIOERR_BASE + 9) /* chunk not found */
  2040. #define MMIOERR_UNBUFFERED (MMIOERR_BASE + 10) /* */
  2041. #define MMIOERR_PATHNOTFOUND (MMIOERR_BASE + 11) /* path incorrect */
  2042. #define MMIOERR_ACCESSDENIED (MMIOERR_BASE + 12) /* file was protected */
  2043. #define MMIOERR_SHARINGVIOLATION (MMIOERR_BASE + 13) /* file in use */
  2044. #define MMIOERR_NETWORKERROR (MMIOERR_BASE + 14) /* network not responding */
  2045. #define MMIOERR_TOOMANYOPENFILES (MMIOERR_BASE + 15) /* no more file handles */
  2046. #define MMIOERR_INVALIDFILE (MMIOERR_BASE + 16) /* default error file error */
  2047. /* MMIO constants */
  2048. #define CFSEPCHAR '+' /* compound file name separator char. */
  2049. /* MMIO data types */
  2050. typedef DWORD FOURCC; /* a four character code */
  2051. typedef char _huge * HPSTR; /* a huge version of LPSTR */
  2052. DECLARE_HANDLE(HMMIO); /* a handle to an open file */
  2053. typedef LRESULT (CALLBACK MMIOPROC)(LPSTR lpmmioinfo, UINT uMsg,
  2054. LPARAM lParam1, LPARAM lParam2);
  2055. typedef MMIOPROC FAR *LPMMIOPROC;
  2056. /* general MMIO information data structure */
  2057. typedef struct _MMIOINFO
  2058. {
  2059. /* general fields */
  2060. DWORD dwFlags; /* general status flags */
  2061. FOURCC fccIOProc; /* pointer to I/O procedure */
  2062. LPMMIOPROC pIOProc; /* pointer to I/O procedure */
  2063. UINT wErrorRet; /* place for error to be returned */
  2064. HTASK htask; /* alternate local task */
  2065. /* fields maintained by MMIO functions during buffered I/O */
  2066. LONG cchBuffer; /* size of I/O buffer (or 0L) */
  2067. HPSTR pchBuffer; /* start of I/O buffer (or NULL) */
  2068. HPSTR pchNext; /* pointer to next byte to read/write */
  2069. HPSTR pchEndRead; /* pointer to last valid byte to read */
  2070. HPSTR pchEndWrite; /* pointer to last byte to write */
  2071. LONG lBufOffset; /* disk offset of start of buffer */
  2072. /* fields maintained by I/O procedure */
  2073. LONG lDiskOffset; /* disk offset of next read or write */
  2074. DWORD adwInfo[3]; /* data specific to type of MMIOPROC */
  2075. /* other fields maintained by MMIO */
  2076. DWORD dwReserved1; /* reserved for MMIO use */
  2077. DWORD dwReserved2; /* reserved for MMIO use */
  2078. HMMIO hmmio; /* handle to open file */
  2079. } MMIOINFO, *PMMIOINFO, NEAR *NPMMIOINFO, FAR *LPMMIOINFO;
  2080. typedef const MMIOINFO FAR *LPCMMIOINFO;
  2081. /* RIFF chunk information data structure */
  2082. typedef struct _MMCKINFO
  2083. {
  2084. FOURCC ckid; /* chunk ID */
  2085. DWORD cksize; /* chunk size */
  2086. FOURCC fccType; /* form type or list type */
  2087. DWORD dwDataOffset; /* offset of data portion of chunk */
  2088. DWORD dwFlags; /* flags used by MMIO functions */
  2089. } MMCKINFO, *PMMCKINFO, NEAR *NPMMCKINFO, FAR *LPMMCKINFO;
  2090. typedef const MMCKINFO *LPCMMCKINFO;
  2091. /* bit field masks */
  2092. #define MMIO_RWMODE 0x00000003 /* open file for reading/writing/both */
  2093. #define MMIO_SHAREMODE 0x00000070 /* file sharing mode number */
  2094. /* constants for dwFlags field of MMIOINFO */
  2095. #define MMIO_CREATE 0x00001000 /* create new file (or truncate file) */
  2096. #define MMIO_PARSE 0x00000100 /* parse new file returning path */
  2097. #define MMIO_DELETE 0x00000200 /* create new file (or truncate file) */
  2098. #define MMIO_EXIST 0x00004000 /* checks for existence of file */
  2099. #define MMIO_ALLOCBUF 0x00010000 /* mmioOpen() should allocate a buffer */
  2100. #define MMIO_GETTEMP 0x00020000 /* mmioOpen() should retrieve temp name */
  2101. #define MMIO_DIRTY 0x10000000 /* I/O buffer is dirty */
  2102. #define MMIO_OPEN_VALID 0x0003FFFF /* valid flags for mmioOpen */ // ;internal
  2103. #define MMIO_FLUSH_VALID MMIO_EMPTYBUF /* valid flags for mmioFlush */ // ;internal
  2104. #define MMIO_ADVANCE_VALID (MMIO_WRITE | MMIO_READ) /* valid flags for mmioAdvance */ // ;internal
  2105. #define MMIO_FOURCC_VALID MMIO_TOUPPER /* valid flags for mmioStringToFOURCC */ // ;internal
  2106. #define MMIO_DESCEND_VALID (MMIO_FINDCHUNK | MMIO_FINDRIFF | MMIO_FINDLIST) // ;internal
  2107. #define MMIO_CREATE_VALID (MMIO_CREATERIFF | MMIO_CREATELIST) // ;internal
  2108. #define MMIO_WIN31_TASK 0x80000000 // ;internal
  2109. /* read/write mode numbers (bit field MMIO_RWMODE) */
  2110. #define MMIO_READ 0x00000000 /* open file for reading only */
  2111. #define MMIO_WRITE 0x00000001 /* open file for writing only */
  2112. #define MMIO_READWRITE 0x00000002 /* open file for reading and writing */
  2113. /* share mode numbers (bit field MMIO_SHAREMODE) */
  2114. #define MMIO_COMPAT 0x00000000 /* compatibility mode */
  2115. #define MMIO_EXCLUSIVE 0x00000010 /* exclusive-access mode */
  2116. #define MMIO_DENYWRITE 0x00000020 /* deny writing to other processes */
  2117. #define MMIO_DENYREAD 0x00000030 /* deny reading to other processes */
  2118. #define MMIO_DENYNONE 0x00000040 /* deny nothing to other processes */
  2119. /* various MMIO flags */
  2120. #define MMIO_FHOPEN 0x0010 /* mmioClose: keep file handle open */
  2121. #define MMIO_EMPTYBUF 0x0010 /* mmioFlush: empty the I/O buffer */
  2122. #define MMIO_TOUPPER 0x0010 /* mmioStringToFOURCC: to u-case */
  2123. #define MMIO_INSTALLPROC 0x00010000 /* mmioInstallIOProc: install MMIOProc */
  2124. #define MMIO_GLOBALPROC 0x10000000 /* mmioInstallIOProc: install globally */
  2125. #define MMIO_REMOVEPROC 0x00020000 /* mmioInstallIOProc: remove MMIOProc */
  2126. #define MMIO_UNICODEPROC 0x01000000 /* mmioInstallIOProc: Unicode MMIOProc */
  2127. #define MMIO_FINDPROC 0x00040000 /* mmioInstallIOProc: find an MMIOProc */
  2128. #define MMIO_FINDCHUNK 0x0010 /* mmioDescend: find a chunk by ID */
  2129. #define MMIO_FINDRIFF 0x0020 /* mmioDescend: find a LIST chunk */
  2130. #define MMIO_FINDLIST 0x0040 /* mmioDescend: find a RIFF chunk */
  2131. #define MMIO_CREATERIFF 0x0020 /* mmioCreateChunk: make a LIST chunk */
  2132. #define MMIO_CREATELIST 0x0040 /* mmioCreateChunk: make a RIFF chunk */
  2133. #define MMIO_VALIDPROC 0x10070000 /* valid for mmioInstallIOProc */ // ;internal
  2134. /* message numbers for MMIOPROC I/O procedure functions */
  2135. #define MMIOM_READ MMIO_READ /* read */
  2136. #define MMIOM_WRITE MMIO_WRITE /* write */
  2137. #define MMIOM_SEEK 2 /* seek to a new position in file */
  2138. #define MMIOM_OPEN 3 /* open file */
  2139. #define MMIOM_CLOSE 4 /* close file */
  2140. #define MMIOM_WRITEFLUSH 5 /* write and flush */
  2141. #if (WINVER >= 0x030a)
  2142. #define MMIOM_RENAME 6 /* rename specified file */
  2143. #endif /* ifdef WINVER >= 0x030a */
  2144. #define MMIOM_USER 0x8000 /* beginning of user-defined messages */
  2145. /* standard four character codes */
  2146. #define FOURCC_RIFF mmioFOURCC('R', 'I', 'F', 'F')
  2147. #define FOURCC_LIST mmioFOURCC('L', 'I', 'S', 'T')
  2148. /* four character codes used to identify standard built-in I/O procedures */
  2149. #define FOURCC_DOS mmioFOURCC('D', 'O', 'S', ' ')
  2150. #define FOURCC_MEM mmioFOURCC('M', 'E', 'M', ' ')
  2151. /* flags for mmioSeek() */
  2152. #ifndef SEEK_SET
  2153. #define SEEK_SET 0 /* seek to an absolute position */
  2154. #define SEEK_CUR 1 /* seek relative to current position */
  2155. #define SEEK_END 2 /* seek relative to end of file */
  2156. #endif /* ifndef SEEK_SET */
  2157. /* other constants */
  2158. #define MMIO_DEFAULTBUFFER 8192 /* default buffer size */
  2159. /* MMIO macros */
  2160. #define mmioFOURCC(ch0, ch1, ch2, ch3) MAKEFOURCC(ch0, ch1, ch2, ch3)
  2161. /* MMIO function prototypes */
  2162. #ifdef _WIN32
  2163. WINMMAPI FOURCC WINAPI mmioStringToFOURCCA(LPCSTR sz, UINT uFlags);
  2164. WINMMAPI FOURCC WINAPI mmioStringToFOURCCW(LPCWSTR sz, UINT uFlags);
  2165. #ifdef UNICODE
  2166. #define mmioStringToFOURCC mmioStringToFOURCCW
  2167. #else
  2168. #define mmioStringToFOURCC mmioStringToFOURCCA
  2169. #endif // !UNICODE
  2170. WINMMAPI LPMMIOPROC WINAPI mmioInstallIOProcA(FOURCC fccIOProc, LPMMIOPROC pIOProc, DWORD dwFlags);
  2171. WINMMAPI LPMMIOPROC WINAPI mmioInstallIOProcW(FOURCC fccIOProc, LPMMIOPROC pIOProc, DWORD dwFlags);
  2172. #ifdef UNICODE
  2173. #define mmioInstallIOProc mmioInstallIOProcW
  2174. #else
  2175. #define mmioInstallIOProc mmioInstallIOProcA
  2176. #endif // !UNICODE
  2177. WINMMAPI HMMIO WINAPI mmioOpenA(LPSTR pszFileName, LPMMIOINFO pmmioinfo, DWORD fdwOpen);
  2178. WINMMAPI HMMIO WINAPI mmioOpenW(LPWSTR pszFileName, LPMMIOINFO pmmioinfo, DWORD fdwOpen);
  2179. #ifdef UNICODE
  2180. #define mmioOpen mmioOpenW
  2181. #else
  2182. #define mmioOpen mmioOpenA
  2183. #endif // !UNICODE
  2184. WINMMAPI MMRESULT WINAPI mmioRenameA(LPCSTR pszFileName, LPCSTR pszNewFileName, LPCMMIOINFO pmmioinfo, DWORD fdwRename);
  2185. WINMMAPI MMRESULT WINAPI mmioRenameW(LPCWSTR pszFileName, LPCWSTR pszNewFileName, LPCMMIOINFO pmmioinfo, DWORD fdwRename);
  2186. #ifdef UNICODE
  2187. #define mmioRename mmioRenameW
  2188. #else
  2189. #define mmioRename mmioRenameA
  2190. #endif // !UNICODE
  2191. #else
  2192. FOURCC WINAPI mmioStringToFOURCC(LPCSTR sz, UINT uFlags);
  2193. LPMMIOPROC WINAPI mmioInstallIOProc(FOURCC fccIOProc, LPMMIOPROC pIOProc, DWORD dwFlags);
  2194. HMMIO WINAPI mmioOpen(LPSTR pszFileName, LPMMIOINFO pmmioinfo, DWORD fdwOpen);
  2195. #if (WINVER >= 0x030a)
  2196. MMRESULT WINAPI mmioRename(LPCSTR pszFileName, LPCSTR pszNewFileName, const MMIOINFO FAR* pmmioinfo, DWORD fdwRename);
  2197. #endif /* ifdef WINVER >= 0x030a */
  2198. #endif
  2199. WINMMAPI MMRESULT WINAPI mmioClose(HMMIO hmmio, UINT fuClose);
  2200. WINMMAPI LONG WINAPI mmioRead(HMMIO hmmio, HPSTR pch, LONG cch);
  2201. WINMMAPI LONG WINAPI mmioWrite(HMMIO hmmio, const char _huge* pch, LONG cch);
  2202. WINMMAPI LONG WINAPI mmioSeek(HMMIO hmmio, LONG lOffset, int iOrigin);
  2203. WINMMAPI MMRESULT WINAPI mmioGetInfo(HMMIO hmmio, LPMMIOINFO pmmioinfo, UINT fuInfo);
  2204. WINMMAPI MMRESULT WINAPI mmioSetInfo(HMMIO hmmio, LPCMMIOINFO pmmioinfo, UINT fuInfo);
  2205. WINMMAPI MMRESULT WINAPI mmioSetBuffer(HMMIO hmmio, LPSTR pchBuffer, LONG cchBuffer,
  2206. UINT fuBuffer);
  2207. WINMMAPI MMRESULT WINAPI mmioFlush(HMMIO hmmio, UINT fuFlush);
  2208. WINMMAPI MMRESULT WINAPI mmioAdvance(HMMIO hmmio, LPMMIOINFO pmmioinfo, UINT fuAdvance);
  2209. WINMMAPI LRESULT WINAPI mmioSendMessage(HMMIO hmmio, UINT uMsg,
  2210. LPARAM lParam1, LPARAM lParam2);
  2211. WINMMAPI MMRESULT WINAPI mmioDescend(HMMIO hmmio, LPMMCKINFO pmmcki,
  2212. const MMCKINFO FAR* pmmckiParent, UINT fuDescend);
  2213. WINMMAPI MMRESULT WINAPI mmioAscend(HMMIO hmmio, LPMMCKINFO pmmcki, UINT fuAscend);
  2214. WINMMAPI MMRESULT WINAPI mmioCreateChunk(HMMIO hmmio, LPMMCKINFO pmmcki, UINT fuCreate);
  2215. #endif /* ifndef _WIN32_VXD */
  2216. #endif /* ifndef MMNOMMIO */
  2217. #ifndef MMNOMCI
  2218. #ifndef _WIN32_VXD
  2219. /****************************************************************************
  2220. MCI support
  2221. ****************************************************************************/
  2222. #ifndef _MCIERROR_ /* MCIERROR is defined in some post 3.1 apps */
  2223. #define _MCIERROR_
  2224. typedef DWORD MCIERROR; /* error return code, 0 means no error */
  2225. #endif
  2226. #ifndef _MCIDEVICEID_ /* Same with MCIDEVICEID */
  2227. #define _MCIDEVICEID_
  2228. typedef UINT MCIDEVICEID; /* MCI device ID type */
  2229. #endif
  2230. typedef UINT (CALLBACK *YIELDPROC)(MCIDEVICEID mciId, DWORD dwYieldData);
  2231. /* MCI function prototypes */
  2232. #ifdef _WIN32
  2233. WINMMAPI MCIERROR WINAPI mciSendCommandA(MCIDEVICEID mciId, UINT uMsg, DWORD dwParam1, DWORD dwParam2);
  2234. WINMMAPI MCIERROR WINAPI mciSendCommandW(MCIDEVICEID mciId, UINT uMsg, DWORD dwParam1, DWORD dwParam2);
  2235. #ifdef UNICODE
  2236. #define mciSendCommand mciSendCommandW
  2237. #else
  2238. #define mciSendCommand mciSendCommandA
  2239. #endif // !UNICODE
  2240. WINMMAPI MCIERROR WINAPI mciSendStringA(LPCSTR lpstrCommand, LPSTR lpstrReturnString, UINT uReturnLength, HWND hwndCallback);
  2241. WINMMAPI MCIERROR WINAPI mciSendStringW(LPCWSTR lpstrCommand, LPWSTR lpstrReturnString, UINT uReturnLength, HWND hwndCallback);
  2242. #ifdef UNICODE
  2243. #define mciSendString mciSendStringW
  2244. #else
  2245. #define mciSendString mciSendStringA
  2246. #endif // !UNICODE
  2247. WINMMAPI MCIDEVICEID WINAPI mciGetDeviceIDA(LPCSTR pszDevice);
  2248. WINMMAPI MCIDEVICEID WINAPI mciGetDeviceIDW(LPCWSTR pszDevice);
  2249. #ifdef UNICODE
  2250. #define mciGetDeviceID mciGetDeviceIDW
  2251. #else
  2252. #define mciGetDeviceID mciGetDeviceIDA
  2253. #endif // !UNICODE
  2254. WINMMAPI MCIDEVICEID WINAPI mciGetDeviceIDFromElementIDA(DWORD dwElementID, LPCSTR lpstrType );
  2255. WINMMAPI MCIDEVICEID WINAPI mciGetDeviceIDFromElementIDW(DWORD dwElementID, LPCWSTR lpstrType );
  2256. #ifdef UNICODE
  2257. #define mciGetDeviceIDFromElementID mciGetDeviceIDFromElementIDW
  2258. #else
  2259. #define mciGetDeviceIDFromElementID mciGetDeviceIDFromElementIDA
  2260. #endif // !UNICODE
  2261. WINMMAPI BOOL WINAPI mciGetErrorStringA(MCIERROR mcierr, LPSTR pszText, UINT cchText);
  2262. WINMMAPI BOOL WINAPI mciGetErrorStringW(MCIERROR mcierr, LPWSTR pszText, UINT cchText);
  2263. #ifdef UNICODE
  2264. #define mciGetErrorString mciGetErrorStringW
  2265. #else
  2266. #define mciGetErrorString mciGetErrorStringA
  2267. #endif // !UNICODE
  2268. #else
  2269. MCIERROR WINAPI mciSendCommand(MCIDEVICEID mciId, UINT uMsg, DWORD dwParam1, DWORD dwParam2);
  2270. MCIERROR WINAPI mciSendString(LPCSTR lpstrCommand, LPSTR lpstrReturnString, UINT uReturnLength, HWND hwndCallback);
  2271. MCIDEVICEID WINAPI mciGetDeviceID(LPCSTR pszDevice);
  2272. BOOL WINAPI mciGetErrorString(MCIERROR mcierr, LPSTR pszText, UINT cchText);
  2273. #endif
  2274. WINMMAPI BOOL WINAPI mciSetYieldProc(MCIDEVICEID mciId, YIELDPROC fpYieldProc,
  2275. DWORD dwYieldData);
  2276. #if (WINVER >= 0x030a)
  2277. WINMMAPI HTASK WINAPI mciGetCreatorTask(MCIDEVICEID mciId);
  2278. WINMMAPI YIELDPROC WINAPI mciGetYieldProc(MCIDEVICEID mciId, LPDWORD pdwYieldData);
  2279. #endif /* ifdef WINVER >= 0x030a */
  2280. #if (WINVER < 0x030a)
  2281. WINMMAPI BOOL WINAPI mciExecute(LPCSTR pszCommand);
  2282. #endif /* ifdef WINVER < 0x030a */
  2283. /* MCI error return values */
  2284. #define MCIERR_INVALID_DEVICE_ID (MCIERR_BASE + 1)
  2285. #define MCIERR_UNRECOGNIZED_KEYWORD (MCIERR_BASE + 3)
  2286. #define MCIERR_UNRECOGNIZED_COMMAND (MCIERR_BASE + 5)
  2287. #define MCIERR_HARDWARE (MCIERR_BASE + 6)
  2288. #define MCIERR_INVALID_DEVICE_NAME (MCIERR_BASE + 7)
  2289. #define MCIERR_OUT_OF_MEMORY (MCIERR_BASE + 8)
  2290. #define MCIERR_DEVICE_OPEN (MCIERR_BASE + 9)
  2291. #define MCIERR_CANNOT_LOAD_DRIVER (MCIERR_BASE + 10)
  2292. #define MCIERR_MISSING_COMMAND_STRING (MCIERR_BASE + 11)
  2293. #define MCIERR_PARAM_OVERFLOW (MCIERR_BASE + 12)
  2294. #define MCIERR_MISSING_STRING_ARGUMENT (MCIERR_BASE + 13)
  2295. #define MCIERR_BAD_INTEGER (MCIERR_BASE + 14)
  2296. #define MCIERR_PARSER_INTERNAL (MCIERR_BASE + 15)
  2297. #define MCIERR_DRIVER_INTERNAL (MCIERR_BASE + 16)
  2298. #define MCIERR_MISSING_PARAMETER (MCIERR_BASE + 17)
  2299. #define MCIERR_UNSUPPORTED_FUNCTION (MCIERR_BASE + 18)
  2300. #define MCIERR_FILE_NOT_FOUND (MCIERR_BASE + 19)
  2301. #define MCIERR_DEVICE_NOT_READY (MCIERR_BASE + 20)
  2302. #define MCIERR_INTERNAL (MCIERR_BASE + 21)
  2303. #define MCIERR_DRIVER (MCIERR_BASE + 22)
  2304. #define MCIERR_CANNOT_USE_ALL (MCIERR_BASE + 23)
  2305. #define MCIERR_MULTIPLE (MCIERR_BASE + 24)
  2306. #define MCIERR_EXTENSION_NOT_FOUND (MCIERR_BASE + 25)
  2307. #define MCIERR_OUTOFRANGE (MCIERR_BASE + 26)
  2308. #define MCIERR_FLAGS_NOT_COMPATIBLE (MCIERR_BASE + 28)
  2309. #define MCIERR_FILE_NOT_SAVED (MCIERR_BASE + 30)
  2310. #define MCIERR_DEVICE_TYPE_REQUIRED (MCIERR_BASE + 31)
  2311. #define MCIERR_DEVICE_LOCKED (MCIERR_BASE + 32)
  2312. #define MCIERR_DUPLICATE_ALIAS (MCIERR_BASE + 33)
  2313. #define MCIERR_BAD_CONSTANT (MCIERR_BASE + 34)
  2314. #define MCIERR_MUST_USE_SHAREABLE (MCIERR_BASE + 35)
  2315. #define MCIERR_MISSING_DEVICE_NAME (MCIERR_BASE + 36)
  2316. #define MCIERR_BAD_TIME_FORMAT (MCIERR_BASE + 37)
  2317. #define MCIERR_NO_CLOSING_QUOTE (MCIERR_BASE + 38)
  2318. #define MCIERR_DUPLICATE_FLAGS (MCIERR_BASE + 39)
  2319. #define MCIERR_INVALID_FILE (MCIERR_BASE + 40)
  2320. #define MCIERR_NULL_PARAMETER_BLOCK (MCIERR_BASE + 41)
  2321. #define MCIERR_UNNAMED_RESOURCE (MCIERR_BASE + 42)
  2322. #define MCIERR_NEW_REQUIRES_ALIAS (MCIERR_BASE + 43)
  2323. #define MCIERR_NOTIFY_ON_AUTO_OPEN (MCIERR_BASE + 44)
  2324. #define MCIERR_NO_ELEMENT_ALLOWED (MCIERR_BASE + 45)
  2325. #define MCIERR_NONAPPLICABLE_FUNCTION (MCIERR_BASE + 46)
  2326. #define MCIERR_ILLEGAL_FOR_AUTO_OPEN (MCIERR_BASE + 47)
  2327. #define MCIERR_FILENAME_REQUIRED (MCIERR_BASE + 48)
  2328. #define MCIERR_EXTRA_CHARACTERS (MCIERR_BASE + 49)
  2329. #define MCIERR_DEVICE_NOT_INSTALLED (MCIERR_BASE + 50)
  2330. #define MCIERR_GET_CD (MCIERR_BASE + 51)
  2331. #define MCIERR_SET_CD (MCIERR_BASE + 52)
  2332. #define MCIERR_SET_DRIVE (MCIERR_BASE + 53)
  2333. #define MCIERR_DEVICE_LENGTH (MCIERR_BASE + 54)
  2334. #define MCIERR_DEVICE_ORD_LENGTH (MCIERR_BASE + 55)
  2335. #define MCIERR_NO_INTEGER (MCIERR_BASE + 56)
  2336. #define MCIERR_WAVE_OUTPUTSINUSE (MCIERR_BASE + 64)
  2337. #define MCIERR_WAVE_SETOUTPUTINUSE (MCIERR_BASE + 65)
  2338. #define MCIERR_WAVE_INPUTSINUSE (MCIERR_BASE + 66)
  2339. #define MCIERR_WAVE_SETINPUTINUSE (MCIERR_BASE + 67)
  2340. #define MCIERR_WAVE_OUTPUTUNSPECIFIED (MCIERR_BASE + 68)
  2341. #define MCIERR_WAVE_INPUTUNSPECIFIED (MCIERR_BASE + 69)
  2342. #define MCIERR_WAVE_OUTPUTSUNSUITABLE (MCIERR_BASE + 70)
  2343. #define MCIERR_WAVE_SETOUTPUTUNSUITABLE (MCIERR_BASE + 71)
  2344. #define MCIERR_WAVE_INPUTSUNSUITABLE (MCIERR_BASE + 72)
  2345. #define MCIERR_WAVE_SETINPUTUNSUITABLE (MCIERR_BASE + 73)
  2346. #define MCIERR_SEQ_DIV_INCOMPATIBLE (MCIERR_BASE + 80)
  2347. #define MCIERR_SEQ_PORT_INUSE (MCIERR_BASE + 81)
  2348. #define MCIERR_SEQ_PORT_NONEXISTENT (MCIERR_BASE + 82)
  2349. #define MCIERR_SEQ_PORT_MAPNODEVICE (MCIERR_BASE + 83)
  2350. #define MCIERR_SEQ_PORT_MISCERROR (MCIERR_BASE + 84)
  2351. #define MCIERR_SEQ_TIMER (MCIERR_BASE + 85)
  2352. #define MCIERR_SEQ_PORTUNSPECIFIED (MCIERR_BASE + 86)
  2353. #define MCIERR_SEQ_NOMIDIPRESENT (MCIERR_BASE + 87)
  2354. #define MCIERR_NO_WINDOW (MCIERR_BASE + 90)
  2355. #define MCIERR_CREATEWINDOW (MCIERR_BASE + 91)
  2356. #define MCIERR_FILE_READ (MCIERR_BASE + 92)
  2357. #define MCIERR_FILE_WRITE (MCIERR_BASE + 93)
  2358. #define MCIERR_NO_IDENTITY (MCIERR_BASE + 94)
  2359. /* all custom device driver errors must be >= than this value */
  2360. #define MCIERR_CUSTOM_DRIVER_BASE (MCIERR_BASE + 256)
  2361. #define MCI_FIRST DRV_MCI_FIRST /* 0x0800 */
  2362. /* MCI command message identifiers */
  2363. #define MCI_OPEN 0x0803
  2364. #define MCI_CLOSE 0x0804
  2365. #define MCI_ESCAPE 0x0805
  2366. #define MCI_PLAY 0x0806
  2367. #define MCI_SEEK 0x0807
  2368. #define MCI_STOP 0x0808
  2369. #define MCI_PAUSE 0x0809
  2370. #define MCI_INFO 0x080A
  2371. #define MCI_GETDEVCAPS 0x080B
  2372. #define MCI_SPIN 0x080C
  2373. #define MCI_SET 0x080D
  2374. #define MCI_STEP 0x080E
  2375. #define MCI_RECORD 0x080F
  2376. #define MCI_SYSINFO 0x0810
  2377. #define MCI_BREAK 0x0811
  2378. #define MCI_SOUND 0x0812 // ;internal
  2379. #define MCI_SAVE 0x0813
  2380. #define MCI_STATUS 0x0814
  2381. #define MCI_CUE 0x0830
  2382. #define MCI_REALIZE 0x0840
  2383. #define MCI_WINDOW 0x0841
  2384. #define MCI_PUT 0x0842
  2385. #define MCI_WHERE 0x0843
  2386. #define MCI_FREEZE 0x0844
  2387. #define MCI_UNFREEZE 0x0845
  2388. #define MCI_LOAD 0x0850
  2389. #define MCI_CUT 0x0851
  2390. #define MCI_COPY 0x0852
  2391. #define MCI_PASTE 0x0853
  2392. #define MCI_UPDATE 0x0854
  2393. #define MCI_RESUME 0x0855
  2394. #define MCI_DELETE 0x0856
  2395. #define MCI_WIN32CLIENT 0x0857 // ;internal
  2396. /* all custom MCI command messages must be >= than this value */
  2397. #define MCI_USER_MESSAGES (DRV_MCI_FIRST + 0x400)
  2398. #define MCI_LAST 0x0FFF
  2399. /* device ID for "all devices" */
  2400. #define MCI_ALL_DEVICE_ID ((MCIDEVICEID)-1)
  2401. /* constants for predefined MCI device types */
  2402. #define MCI_DEVTYPE_VCR 513 /* (MCI_STRING_OFFSET + 1) */
  2403. #define MCI_DEVTYPE_VIDEODISC 514 /* (MCI_STRING_OFFSET + 2) */
  2404. #define MCI_DEVTYPE_OVERLAY 515 /* (MCI_STRING_OFFSET + 3) */
  2405. #define MCI_DEVTYPE_CD_AUDIO 516 /* (MCI_STRING_OFFSET + 4) */
  2406. #define MCI_DEVTYPE_DAT 517 /* (MCI_STRING_OFFSET + 5) */
  2407. #define MCI_DEVTYPE_SCANNER 518 /* (MCI_STRING_OFFSET + 6) */
  2408. #define MCI_DEVTYPE_ANIMATION 519 /* (MCI_STRING_OFFSET + 7) */
  2409. #define MCI_DEVTYPE_DIGITAL_VIDEO 520 /* (MCI_STRING_OFFSET + 8) */
  2410. #define MCI_DEVTYPE_OTHER 521 /* (MCI_STRING_OFFSET + 9) */
  2411. #define MCI_DEVTYPE_WAVEFORM_AUDIO 522 /* (MCI_STRING_OFFSET + 10) */
  2412. #define MCI_DEVTYPE_SEQUENCER 523 /* (MCI_STRING_OFFSET + 11) */
  2413. #define MCI_DEVTYPE_FIRST MCI_DEVTYPE_VCR
  2414. #define MCI_DEVTYPE_LAST MCI_DEVTYPE_SEQUENCER
  2415. #define MCI_DEVTYPE_FIRST_USER 0x1000
  2416. /* return values for 'status mode' command */
  2417. #define MCI_MODE_NOT_READY (MCI_STRING_OFFSET + 12)
  2418. #define MCI_MODE_STOP (MCI_STRING_OFFSET + 13)
  2419. #define MCI_MODE_PLAY (MCI_STRING_OFFSET + 14)
  2420. #define MCI_MODE_RECORD (MCI_STRING_OFFSET + 15)
  2421. #define MCI_MODE_SEEK (MCI_STRING_OFFSET + 16)
  2422. #define MCI_MODE_PAUSE (MCI_STRING_OFFSET + 17)
  2423. #define MCI_MODE_OPEN (MCI_STRING_OFFSET + 18)
  2424. /* constants used in 'set time format' and 'status time format' commands */
  2425. #define MCI_FORMAT_MILLISECONDS 0
  2426. #define MCI_FORMAT_HMS 1
  2427. #define MCI_FORMAT_MSF 2
  2428. #define MCI_FORMAT_FRAMES 3
  2429. #define MCI_FORMAT_SMPTE_24 4
  2430. #define MCI_FORMAT_SMPTE_25 5
  2431. #define MCI_FORMAT_SMPTE_30 6
  2432. #define MCI_FORMAT_SMPTE_30DROP 7
  2433. #define MCI_FORMAT_BYTES 8
  2434. #define MCI_FORMAT_SAMPLES 9
  2435. #define MCI_FORMAT_TMSF 10
  2436. /* MCI time format conversion macros */
  2437. #define MCI_MSF_MINUTE(msf) ((BYTE)(msf))
  2438. #define MCI_MSF_SECOND(msf) ((BYTE)(((WORD)(msf)) >> 8))
  2439. #define MCI_MSF_FRAME(msf) ((BYTE)((msf)>>16))
  2440. #define MCI_MAKE_MSF(m, s, f) ((DWORD)(((BYTE)(m) | \
  2441. ((WORD)(s)<<8)) | \
  2442. (((DWORD)(BYTE)(f))<<16)))
  2443. #define MCI_TMSF_TRACK(tmsf) ((BYTE)(tmsf))
  2444. #define MCI_TMSF_MINUTE(tmsf) ((BYTE)(((WORD)(tmsf)) >> 8))
  2445. #define MCI_TMSF_SECOND(tmsf) ((BYTE)((tmsf)>>16))
  2446. #define MCI_TMSF_FRAME(tmsf) ((BYTE)((tmsf)>>24))
  2447. #define MCI_MAKE_TMSF(t, m, s, f) ((DWORD)(((BYTE)(t) | \
  2448. ((WORD)(m)<<8)) | \
  2449. (((DWORD)(BYTE)(s) | \
  2450. ((WORD)(f)<<8))<<16)))
  2451. #define MCI_HMS_HOUR(hms) ((BYTE)(hms))
  2452. #define MCI_HMS_MINUTE(hms) ((BYTE)(((WORD)(hms)) >> 8))
  2453. #define MCI_HMS_SECOND(hms) ((BYTE)((hms)>>16))
  2454. #define MCI_MAKE_HMS(h, m, s) ((DWORD)(((BYTE)(h) | \
  2455. ((WORD)(m)<<8)) | \
  2456. (((DWORD)(BYTE)(s))<<16)))
  2457. /* flags for wParam of MM_MCINOTIFY message */
  2458. #define MCI_NOTIFY_SUCCESSFUL 0x0001
  2459. #define MCI_NOTIFY_SUPERSEDED 0x0002
  2460. #define MCI_NOTIFY_ABORTED 0x0004
  2461. #define MCI_NOTIFY_FAILURE 0x0008
  2462. /* common flags for dwFlags parameter of MCI command messages */
  2463. #define MCI_NOTIFY 0x00000001L
  2464. #define MCI_WAIT 0x00000002L
  2465. #define MCI_FROM 0x00000004L
  2466. #define MCI_TO 0x00000008L
  2467. #define MCI_TRACK 0x00000010L
  2468. /* flags for dwFlags parameter of MCI_OPEN command message */
  2469. #define MCI_OPEN_SHAREABLE 0x00000100L
  2470. #define MCI_OPEN_ELEMENT 0x00000200L
  2471. #define MCI_OPEN_ALIAS 0x00000400L
  2472. #define MCI_OPEN_ELEMENT_ID 0x00000800L
  2473. #define MCI_OPEN_TYPE_ID 0x00001000L
  2474. #define MCI_OPEN_TYPE 0x00002000L
  2475. /* flags for dwFlags parameter of MCI_SEEK command message */
  2476. #define MCI_SEEK_TO_START 0x00000100L
  2477. #define MCI_SEEK_TO_END 0x00000200L
  2478. /* flags for dwFlags parameter of MCI_STATUS command message */
  2479. #define MCI_STATUS_ITEM 0x00000100L
  2480. #define MCI_STATUS_START 0x00000200L
  2481. /* flags for dwItem field of the MCI_STATUS_PARMS parameter block */
  2482. #define MCI_STATUS_LENGTH 0x00000001L
  2483. #define MCI_STATUS_POSITION 0x00000002L
  2484. #define MCI_STATUS_NUMBER_OF_TRACKS 0x00000003L
  2485. #define MCI_STATUS_MODE 0x00000004L
  2486. #define MCI_STATUS_MEDIA_PRESENT 0x00000005L
  2487. #define MCI_STATUS_TIME_FORMAT 0x00000006L
  2488. #define MCI_STATUS_READY 0x00000007L
  2489. #define MCI_STATUS_CURRENT_TRACK 0x00000008L
  2490. /* flags for dwFlags parameter of MCI_INFO command message */
  2491. #define MCI_INFO_PRODUCT 0x00000100L
  2492. #define MCI_INFO_FILE 0x00000200L
  2493. #define MCI_INFO_MEDIA_UPC 0x00000400L
  2494. #define MCI_INFO_MEDIA_IDENTITY 0x00000800L
  2495. #define MCI_INFO_NAME 0x00001000L
  2496. #define MCI_INFO_COPYRIGHT 0x00002000L
  2497. /* flags for dwFlags parameter of MCI_GETDEVCAPS command message */
  2498. #define MCI_GETDEVCAPS_ITEM 0x00000100L
  2499. /* flags for dwItem field of the MCI_GETDEVCAPS_PARMS parameter block */
  2500. #define MCI_GETDEVCAPS_CAN_RECORD 0x00000001L
  2501. #define MCI_GETDEVCAPS_HAS_AUDIO 0x00000002L
  2502. #define MCI_GETDEVCAPS_HAS_VIDEO 0x00000003L
  2503. #define MCI_GETDEVCAPS_DEVICE_TYPE 0x00000004L
  2504. #define MCI_GETDEVCAPS_USES_FILES 0x00000005L
  2505. #define MCI_GETDEVCAPS_COMPOUND_DEVICE 0x00000006L
  2506. #define MCI_GETDEVCAPS_CAN_EJECT 0x00000007L
  2507. #define MCI_GETDEVCAPS_CAN_PLAY 0x00000008L
  2508. #define MCI_GETDEVCAPS_CAN_SAVE 0x00000009L
  2509. /* flags for dwFlags parameter of MCI_SYSINFO command message */
  2510. #define MCI_SYSINFO_QUANTITY 0x00000100L
  2511. #define MCI_SYSINFO_OPEN 0x00000200L
  2512. #define MCI_SYSINFO_NAME 0x00000400L
  2513. #define MCI_SYSINFO_INSTALLNAME 0x00000800L
  2514. /* flags for dwFlags parameter of MCI_SET command message */
  2515. #define MCI_SET_DOOR_OPEN 0x00000100L
  2516. #define MCI_SET_DOOR_CLOSED 0x00000200L
  2517. #define MCI_SET_TIME_FORMAT 0x00000400L
  2518. #define MCI_SET_AUDIO 0x00000800L
  2519. #define MCI_SET_VIDEO 0x00001000L
  2520. #define MCI_SET_ON 0x00002000L
  2521. #define MCI_SET_OFF 0x00004000L
  2522. /* flags for dwAudio field of MCI_SET_PARMS or MCI_SEQ_SET_PARMS */
  2523. #define MCI_SET_AUDIO_ALL 0x00000000L
  2524. #define MCI_SET_AUDIO_LEFT 0x00000001L
  2525. #define MCI_SET_AUDIO_RIGHT 0x00000002L
  2526. /* flags for dwFlags parameter of MCI_BREAK command message */
  2527. #define MCI_BREAK_KEY 0x00000100L
  2528. #define MCI_BREAK_HWND 0x00000200L
  2529. #define MCI_BREAK_OFF 0x00000400L
  2530. /* flags for dwFlags parameter of MCI_RECORD command message */
  2531. #define MCI_RECORD_INSERT 0x00000100L
  2532. #define MCI_RECORD_OVERWRITE 0x00000200L
  2533. /* flags for dwFlags parameter of MCI_SOUND command message */ // ;internal
  2534. #define MCI_SOUND_NAME 0x00000100L // ;internal
  2535. // ;internal
  2536. /* flags for dwFlags parameter of MCI_SAVE command message */
  2537. #define MCI_SAVE_FILE 0x00000100L
  2538. /* flags for dwFlags parameter of MCI_LOAD command message */
  2539. #define MCI_LOAD_FILE 0x00000100L
  2540. /* generic parameter block for MCI command messages with no special parameters */
  2541. typedef struct tagMCI_GENERIC_PARMS {
  2542. DWORD dwCallback;
  2543. } MCI_GENERIC_PARMS, *PMCI_GENERIC_PARMS, FAR *LPMCI_GENERIC_PARMS;
  2544. /* parameter block for MCI_OPEN command message */
  2545. #ifdef _WIN32
  2546. typedef struct tagMCI_OPEN_PARMSA {
  2547. DWORD dwCallback;
  2548. MCIDEVICEID wDeviceID;
  2549. LPCSTR lpstrDeviceType;
  2550. LPCSTR lpstrElementName;
  2551. LPCSTR lpstrAlias;
  2552. } MCI_OPEN_PARMSA, *PMCI_OPEN_PARMSA, *LPMCI_OPEN_PARMSA;
  2553. typedef struct tagMCI_OPEN_PARMSW {
  2554. DWORD dwCallback;
  2555. MCIDEVICEID wDeviceID;
  2556. LPCWSTR lpstrDeviceType;
  2557. LPCWSTR lpstrElementName;
  2558. LPCWSTR lpstrAlias;
  2559. } MCI_OPEN_PARMSW, *PMCI_OPEN_PARMSW, *LPMCI_OPEN_PARMSW;
  2560. #ifdef UNICODE
  2561. typedef MCI_OPEN_PARMSW MCI_OPEN_PARMS;
  2562. typedef PMCI_OPEN_PARMSW PMCI_OPEN_PARMS;
  2563. typedef LPMCI_OPEN_PARMSW LPMCI_OPEN_PARMS;
  2564. #else
  2565. typedef MCI_OPEN_PARMSA MCI_OPEN_PARMS;
  2566. typedef PMCI_OPEN_PARMSA PMCI_OPEN_PARMS;
  2567. typedef LPMCI_OPEN_PARMSA LPMCI_OPEN_PARMS;
  2568. #endif // UNICODE
  2569. #else
  2570. typedef struct tagMCI_OPEN_PARMS {
  2571. DWORD dwCallback;
  2572. MCIDEVICEID wDeviceID;
  2573. WORD wReserved0;
  2574. LPCSTR lpstrDeviceType;
  2575. LPCSTR lpstrElementName;
  2576. LPCSTR lpstrAlias;
  2577. } MCI_OPEN_PARMS, FAR *LPMCI_OPEN_PARMS;
  2578. #endif
  2579. /* parameter block for MCI_PLAY command message */
  2580. typedef struct tagMCI_PLAY_PARMS {
  2581. DWORD dwCallback;
  2582. DWORD dwFrom;
  2583. DWORD dwTo;
  2584. } MCI_PLAY_PARMS, *PMCI_PLAY_PARMS, FAR *LPMCI_PLAY_PARMS;
  2585. /* parameter block for MCI_SEEK command message */
  2586. typedef struct tagMCI_SEEK_PARMS {
  2587. DWORD dwCallback;
  2588. DWORD dwTo;
  2589. } MCI_SEEK_PARMS, *PMCI_SEEK_PARMS, FAR *LPMCI_SEEK_PARMS;
  2590. /* parameter block for MCI_STATUS command message */
  2591. typedef struct tagMCI_STATUS_PARMS {
  2592. DWORD dwCallback;
  2593. DWORD dwReturn;
  2594. DWORD dwItem;
  2595. DWORD dwTrack;
  2596. } MCI_STATUS_PARMS, *PMCI_STATUS_PARMS, FAR * LPMCI_STATUS_PARMS;
  2597. /* parameter block for MCI_INFO command message */
  2598. #ifdef _WIN32
  2599. typedef struct tagMCI_INFO_PARMSA {
  2600. DWORD dwCallback;
  2601. LPSTR lpstrReturn;
  2602. DWORD dwRetSize;
  2603. } MCI_INFO_PARMSA, * LPMCI_INFO_PARMSA;
  2604. typedef struct tagMCI_INFO_PARMSW {
  2605. DWORD dwCallback;
  2606. LPWSTR lpstrReturn;
  2607. DWORD dwRetSize;
  2608. } MCI_INFO_PARMSW, * LPMCI_INFO_PARMSW;
  2609. #ifdef UNICODE
  2610. typedef MCI_INFO_PARMSW MCI_INFO_PARMS;
  2611. typedef LPMCI_INFO_PARMSW LPMCI_INFO_PARMS;
  2612. #else
  2613. typedef MCI_INFO_PARMSA MCI_INFO_PARMS;
  2614. typedef LPMCI_INFO_PARMSA LPMCI_INFO_PARMS;
  2615. #endif // UNICODE
  2616. #else
  2617. typedef struct tagMCI_INFO_PARMS {
  2618. DWORD dwCallback;
  2619. LPSTR lpstrReturn;
  2620. DWORD dwRetSize;
  2621. } MCI_INFO_PARMS, FAR * LPMCI_INFO_PARMS;
  2622. #endif
  2623. /* parameter block for MCI_GETDEVCAPS command message */
  2624. typedef struct tagMCI_GETDEVCAPS_PARMS {
  2625. DWORD dwCallback;
  2626. DWORD dwReturn;
  2627. DWORD dwItem;
  2628. } MCI_GETDEVCAPS_PARMS, *PMCI_GETDEVCAPS_PARMS, FAR * LPMCI_GETDEVCAPS_PARMS;
  2629. /* parameter block for MCI_SYSINFO command message */
  2630. #ifdef _WIN32
  2631. typedef struct tagMCI_SYSINFO_PARMSA {
  2632. DWORD dwCallback;
  2633. LPSTR lpstrReturn;
  2634. DWORD dwRetSize;
  2635. DWORD dwNumber;
  2636. UINT wDeviceType;
  2637. } MCI_SYSINFO_PARMSA, *PMCI_SYSINFO_PARMSA, * LPMCI_SYSINFO_PARMSA;
  2638. typedef struct tagMCI_SYSINFO_PARMSW {
  2639. DWORD dwCallback;
  2640. LPWSTR lpstrReturn;
  2641. DWORD dwRetSize;
  2642. DWORD dwNumber;
  2643. UINT wDeviceType;
  2644. } MCI_SYSINFO_PARMSW, *PMCI_SYSINFO_PARMSW, * LPMCI_SYSINFO_PARMSW;
  2645. #ifdef UNICODE
  2646. typedef MCI_SYSINFO_PARMSW MCI_SYSINFO_PARMS;
  2647. typedef PMCI_SYSINFO_PARMSW PMCI_SYSINFO_PARMS;
  2648. typedef LPMCI_SYSINFO_PARMSW LPMCI_SYSINFO_PARMS;
  2649. #else
  2650. typedef MCI_SYSINFO_PARMSA MCI_SYSINFO_PARMS;
  2651. typedef PMCI_SYSINFO_PARMSA PMCI_SYSINFO_PARMS;
  2652. typedef LPMCI_SYSINFO_PARMSA LPMCI_SYSINFO_PARMS;
  2653. #endif // UNICODE
  2654. #else
  2655. typedef struct tagMCI_SYSINFO_PARMS {
  2656. DWORD dwCallback;
  2657. LPSTR lpstrReturn;
  2658. DWORD dwRetSize;
  2659. DWORD dwNumber;
  2660. WORD wDeviceType;
  2661. WORD wReserved0;
  2662. } MCI_SYSINFO_PARMS, FAR * LPMCI_SYSINFO_PARMS;
  2663. #endif
  2664. /* parameter block for MCI_SET command message */
  2665. typedef struct tagMCI_SET_PARMS {
  2666. DWORD dwCallback;
  2667. DWORD dwTimeFormat;
  2668. DWORD dwAudio;
  2669. } MCI_SET_PARMS, *PMCI_SET_PARMS, FAR *LPMCI_SET_PARMS;
  2670. /* parameter block for MCI_BREAK command message */
  2671. typedef struct tagMCI_BREAK_PARMS {
  2672. DWORD dwCallback;
  2673. #ifdef _WIN32
  2674. int nVirtKey;
  2675. HWND hwndBreak;
  2676. #else
  2677. short nVirtKey;
  2678. WORD wReserved0; /* padding for Win 16 */
  2679. HWND hwndBreak;
  2680. WORD wReserved1; /* padding for Win 16 */
  2681. #endif
  2682. } MCI_BREAK_PARMS, *PMCI_BREAK_PARMS, FAR * LPMCI_BREAK_PARMS;
  2683. /* parameter block for MCI_SOUND command message */ // ;internal
  2684. #ifdef _WIN32 // ;internal
  2685. typedef struct tagMCI_SOUND_PARMSA { // ;internal
  2686. DWORD dwCallback; // ;internal
  2687. LPCSTR lpstrSoundName; // ;internal
  2688. } MCI_SOUND_PARMSA, *PMCI_SOUND_PARMSA, *LPMCI_SOUND_PARMSA; // ;internal
  2689. typedef struct tagMCI_SOUND_PARMSW { // ;internal
  2690. DWORD dwCallback; // ;internal
  2691. LPCWSTR lpstrSoundName; // ;internal
  2692. } MCI_SOUND_PARMSW, *PMCI_SOUND_PARMSW, *LPMCI_SOUND_PARMSW; // ;internal
  2693. #ifdef UNICODE // ;internal
  2694. typedef MCI_SOUND_PARMSW MCI_SOUND_PARMS; // ;internal
  2695. typedef PMCI_SOUND_PARMSW PMCI_SOUND_PARMS; // ;internal
  2696. typedef LPMCI_SOUND_PARMSW LPMCI_SOUND_PARMS; // ;internal
  2697. #else // ;internal
  2698. typedef MCI_SOUND_PARMSA MCI_SOUND_PARMS; // ;internal
  2699. typedef PMCI_SOUND_PARMSA PMCI_SOUND_PARMS; // ;internal
  2700. typedef LPMCI_SOUND_PARMSA LPMCI_SOUND_PARMS; // ;internal
  2701. #endif // UNICODE // ;internal
  2702. #else // ;internal
  2703. typedef struct tagMCI_SOUND_PARMS { // ;internal
  2704. DWORD dwCallback; // ;internal
  2705. LPCSTR lpstrSoundName; // ;internal
  2706. } MCI_SOUND_PARMS; // ;internal
  2707. typedef MCI_SOUND_PARMS FAR * LPMCI_SOUND_PARMS; // ;internal
  2708. #endif // ;internal
  2709. /* parameter block for MCI_SAVE command message */
  2710. #ifdef _WIN32
  2711. typedef struct tagMCI_SAVE_PARMSA {
  2712. DWORD dwCallback;
  2713. LPCSTR lpfilename;
  2714. } MCI_SAVE_PARMSA, *PMCI_SAVE_PARMSA, * LPMCI_SAVE_PARMSA;
  2715. typedef struct tagMCI_SAVE_PARMSW {
  2716. DWORD dwCallback;
  2717. LPCWSTR lpfilename;
  2718. } MCI_SAVE_PARMSW, *PMCI_SAVE_PARMSW, * LPMCI_SAVE_PARMSW;
  2719. #ifdef UNICODE
  2720. typedef MCI_SAVE_PARMSW MCI_SAVE_PARMS;
  2721. typedef PMCI_SAVE_PARMSW PMCI_SAVE_PARMS;
  2722. typedef LPMCI_SAVE_PARMSW LPMCI_SAVE_PARMS;
  2723. #else
  2724. typedef MCI_SAVE_PARMSA MCI_SAVE_PARMS;
  2725. typedef PMCI_SAVE_PARMSA PMCI_SAVE_PARMS;
  2726. typedef LPMCI_SAVE_PARMSA LPMCI_SAVE_PARMS;
  2727. #endif // UNICODE
  2728. #else
  2729. typedef struct tagMCI_SAVE_PARMS {
  2730. DWORD dwCallback;
  2731. LPCSTR lpfilename;
  2732. } MCI_SAVE_PARMS, FAR * LPMCI_SAVE_PARMS;
  2733. #endif
  2734. /* parameter block for MCI_LOAD command message */
  2735. #ifdef _WIN32
  2736. typedef struct tagMCI_LOAD_PARMSA {
  2737. DWORD dwCallback;
  2738. LPCSTR lpfilename;
  2739. } MCI_LOAD_PARMSA, *PMCI_LOAD_PARMSA, * LPMCI_LOAD_PARMSA;
  2740. typedef struct tagMCI_LOAD_PARMSW {
  2741. DWORD dwCallback;
  2742. LPCWSTR lpfilename;
  2743. } MCI_LOAD_PARMSW, *PMCI_LOAD_PARMSW, * LPMCI_LOAD_PARMSW;
  2744. #ifdef UNICODE
  2745. typedef MCI_LOAD_PARMSW MCI_LOAD_PARMS;
  2746. typedef PMCI_LOAD_PARMSW PMCI_LOAD_PARMS;
  2747. typedef LPMCI_LOAD_PARMSW LPMCI_LOAD_PARMS;
  2748. #else
  2749. typedef MCI_LOAD_PARMSA MCI_LOAD_PARMS;
  2750. typedef PMCI_LOAD_PARMSA PMCI_LOAD_PARMS;
  2751. typedef LPMCI_LOAD_PARMSA LPMCI_LOAD_PARMS;
  2752. #endif // UNICODE
  2753. #else
  2754. typedef struct tagMCI_LOAD_PARMS {
  2755. DWORD dwCallback;
  2756. LPCSTR lpfilename;
  2757. } MCI_LOAD_PARMS, FAR * LPMCI_LOAD_PARMS;
  2758. #endif
  2759. /* parameter block for MCI_RECORD command message */
  2760. typedef struct tagMCI_RECORD_PARMS {
  2761. DWORD dwCallback;
  2762. DWORD dwFrom;
  2763. DWORD dwTo;
  2764. } MCI_RECORD_PARMS, FAR *LPMCI_RECORD_PARMS;
  2765. /* MCI extensions for videodisc devices */
  2766. /* flag for dwReturn field of MCI_STATUS_PARMS */
  2767. /* MCI_STATUS command, (dwItem == MCI_STATUS_MODE) */
  2768. #define MCI_VD_MODE_PARK (MCI_VD_OFFSET + 1)
  2769. /* flag for dwReturn field of MCI_STATUS_PARMS */
  2770. /* MCI_STATUS command, (dwItem == MCI_VD_STATUS_MEDIA_TYPE) */
  2771. #define MCI_VD_MEDIA_CLV (MCI_VD_OFFSET + 2)
  2772. #define MCI_VD_MEDIA_CAV (MCI_VD_OFFSET + 3)
  2773. #define MCI_VD_MEDIA_OTHER (MCI_VD_OFFSET + 4)
  2774. #define MCI_VD_FORMAT_TRACK 0x4001
  2775. /* flags for dwFlags parameter of MCI_PLAY command message */
  2776. #define MCI_VD_PLAY_REVERSE 0x00010000L
  2777. #define MCI_VD_PLAY_FAST 0x00020000L
  2778. #define MCI_VD_PLAY_SPEED 0x00040000L
  2779. #define MCI_VD_PLAY_SCAN 0x00080000L
  2780. #define MCI_VD_PLAY_SLOW 0x00100000L
  2781. /* flag for dwFlags parameter of MCI_SEEK command message */
  2782. #define MCI_VD_SEEK_REVERSE 0x00010000L
  2783. /* flags for dwItem field of MCI_STATUS_PARMS parameter block */
  2784. #define MCI_VD_STATUS_SPEED 0x00004002L
  2785. #define MCI_VD_STATUS_FORWARD 0x00004003L
  2786. #define MCI_VD_STATUS_MEDIA_TYPE 0x00004004L
  2787. #define MCI_VD_STATUS_SIDE 0x00004005L
  2788. #define MCI_VD_STATUS_DISC_SIZE 0x00004006L
  2789. /* flags for dwFlags parameter of MCI_GETDEVCAPS command message */
  2790. #define MCI_VD_GETDEVCAPS_CLV 0x00010000L
  2791. #define MCI_VD_GETDEVCAPS_CAV 0x00020000L
  2792. #define MCI_VD_SPIN_UP 0x00010000L
  2793. #define MCI_VD_SPIN_DOWN 0x00020000L
  2794. /* flags for dwItem field of MCI_GETDEVCAPS_PARMS parameter block */
  2795. #define MCI_VD_GETDEVCAPS_CAN_REVERSE 0x00004002L
  2796. #define MCI_VD_GETDEVCAPS_FAST_RATE 0x00004003L
  2797. #define MCI_VD_GETDEVCAPS_SLOW_RATE 0x00004004L
  2798. #define MCI_VD_GETDEVCAPS_NORMAL_RATE 0x00004005L
  2799. /* flags for the dwFlags parameter of MCI_STEP command message */
  2800. #define MCI_VD_STEP_FRAMES 0x00010000L
  2801. #define MCI_VD_STEP_REVERSE 0x00020000L
  2802. /* flag for the MCI_ESCAPE command message */
  2803. #define MCI_VD_ESCAPE_STRING 0x00000100L
  2804. /* parameter block for MCI_PLAY command message */
  2805. typedef struct tagMCI_VD_PLAY_PARMS {
  2806. DWORD dwCallback;
  2807. DWORD dwFrom;
  2808. DWORD dwTo;
  2809. DWORD dwSpeed;
  2810. } MCI_VD_PLAY_PARMS, *PMCI_VD_PLAY_PARMS, FAR *LPMCI_VD_PLAY_PARMS;
  2811. /* parameter block for MCI_STEP command message */
  2812. typedef struct tagMCI_VD_STEP_PARMS {
  2813. DWORD dwCallback;
  2814. DWORD dwFrames;
  2815. } MCI_VD_STEP_PARMS, *PMCI_VD_STEP_PARMS, FAR *LPMCI_VD_STEP_PARMS;
  2816. /* parameter block for MCI_ESCAPE command message */
  2817. #ifdef _WIN32
  2818. typedef struct tagMCI_VD_ESCAPE_PARMSA {
  2819. DWORD dwCallback;
  2820. LPCSTR lpstrCommand;
  2821. } MCI_VD_ESCAPE_PARMSA, *PMCI_VD_ESCAPE_PARMSA, *LPMCI_VD_ESCAPE_PARMSA;
  2822. typedef struct tagMCI_VD_ESCAPE_PARMSW {
  2823. DWORD dwCallback;
  2824. LPCWSTR lpstrCommand;
  2825. } MCI_VD_ESCAPE_PARMSW, *PMCI_VD_ESCAPE_PARMSW, *LPMCI_VD_ESCAPE_PARMSW;
  2826. #ifdef UNICODE
  2827. typedef MCI_VD_ESCAPE_PARMSW MCI_VD_ESCAPE_PARMS;
  2828. typedef PMCI_VD_ESCAPE_PARMSW PMCI_VD_ESCAPE_PARMS;
  2829. typedef LPMCI_VD_ESCAPE_PARMSW LPMCI_VD_ESCAPE_PARMS;
  2830. #else
  2831. typedef MCI_VD_ESCAPE_PARMSA MCI_VD_ESCAPE_PARMS;
  2832. typedef PMCI_VD_ESCAPE_PARMSA PMCI_VD_ESCAPE_PARMS;
  2833. typedef LPMCI_VD_ESCAPE_PARMSA LPMCI_VD_ESCAPE_PARMS;
  2834. #endif // UNICODE
  2835. #else
  2836. typedef struct tagMCI_VD_ESCAPE_PARMS {
  2837. DWORD dwCallback;
  2838. LPCSTR lpstrCommand;
  2839. } MCI_VD_ESCAPE_PARMS, FAR *LPMCI_VD_ESCAPE_PARMS;
  2840. #endif
  2841. /* MCI extensions for CD audio devices */
  2842. /* flags for the dwItem field of the MCI_STATUS_PARMS parameter block */
  2843. #define MCI_CDA_STATUS_TYPE_TRACK 0x00004001L
  2844. /* flags for the dwReturn field of MCI_STATUS_PARMS parameter block */
  2845. /* MCI_STATUS command, (dwItem == MCI_CDA_STATUS_TYPE_TRACK) */
  2846. #define MCI_CDA_TRACK_AUDIO (MCI_CD_OFFSET + 0)
  2847. #define MCI_CDA_TRACK_OTHER (MCI_CD_OFFSET + 1)
  2848. /* MCI extensions for waveform audio devices */
  2849. #define MCI_WAVE_PCM (MCI_WAVE_OFFSET + 0)
  2850. #define MCI_WAVE_MAPPER (MCI_WAVE_OFFSET + 1)
  2851. /* flags for the dwFlags parameter of MCI_OPEN command message */
  2852. #define MCI_WAVE_OPEN_BUFFER 0x00010000L
  2853. /* flags for the dwFlags parameter of MCI_SET command message */
  2854. #define MCI_WAVE_SET_FORMATTAG 0x00010000L
  2855. #define MCI_WAVE_SET_CHANNELS 0x00020000L
  2856. #define MCI_WAVE_SET_SAMPLESPERSEC 0x00040000L
  2857. #define MCI_WAVE_SET_AVGBYTESPERSEC 0x00080000L
  2858. #define MCI_WAVE_SET_BLOCKALIGN 0x00100000L
  2859. #define MCI_WAVE_SET_BITSPERSAMPLE 0x00200000L
  2860. /* flags for the dwFlags parameter of MCI_STATUS, MCI_SET command messages */
  2861. #define MCI_WAVE_INPUT 0x00400000L
  2862. #define MCI_WAVE_OUTPUT 0x00800000L
  2863. /* flags for the dwItem field of MCI_STATUS_PARMS parameter block */
  2864. #define MCI_WAVE_STATUS_FORMATTAG 0x00004001L
  2865. #define MCI_WAVE_STATUS_CHANNELS 0x00004002L
  2866. #define MCI_WAVE_STATUS_SAMPLESPERSEC 0x00004003L
  2867. #define MCI_WAVE_STATUS_AVGBYTESPERSEC 0x00004004L
  2868. #define MCI_WAVE_STATUS_BLOCKALIGN 0x00004005L
  2869. #define MCI_WAVE_STATUS_BITSPERSAMPLE 0x00004006L
  2870. #define MCI_WAVE_STATUS_LEVEL 0x00004007L
  2871. /* flags for the dwFlags parameter of MCI_SET command message */
  2872. #define MCI_WAVE_SET_ANYINPUT 0x04000000L
  2873. #define MCI_WAVE_SET_ANYOUTPUT 0x08000000L
  2874. /* flags for the dwFlags parameter of MCI_GETDEVCAPS command message */
  2875. #define MCI_WAVE_GETDEVCAPS_INPUTS 0x00004001L
  2876. #define MCI_WAVE_GETDEVCAPS_OUTPUTS 0x00004002L
  2877. /* parameter block for MCI_OPEN command message */
  2878. #ifdef _WIN32
  2879. typedef struct tagMCI_WAVE_OPEN_PARMSA {
  2880. DWORD dwCallback;
  2881. MCIDEVICEID wDeviceID;
  2882. LPCSTR lpstrDeviceType;
  2883. LPCSTR lpstrElementName;
  2884. LPCSTR lpstrAlias;
  2885. DWORD dwBufferSeconds;
  2886. } MCI_WAVE_OPEN_PARMSA, *PMCI_WAVE_OPEN_PARMSA, *LPMCI_WAVE_OPEN_PARMSA;
  2887. typedef struct tagMCI_WAVE_OPEN_PARMSW {
  2888. DWORD dwCallback;
  2889. MCIDEVICEID wDeviceID;
  2890. LPCWSTR lpstrDeviceType;
  2891. LPCWSTR lpstrElementName;
  2892. LPCWSTR lpstrAlias;
  2893. DWORD dwBufferSeconds;
  2894. } MCI_WAVE_OPEN_PARMSW, *PMCI_WAVE_OPEN_PARMSW, *LPMCI_WAVE_OPEN_PARMSW;
  2895. #ifdef UNICODE
  2896. typedef MCI_WAVE_OPEN_PARMSW MCI_WAVE_OPEN_PARMS;
  2897. typedef PMCI_WAVE_OPEN_PARMSW PMCI_WAVE_OPEN_PARMS;
  2898. typedef LPMCI_WAVE_OPEN_PARMSW LPMCI_WAVE_OPEN_PARMS;
  2899. #else
  2900. typedef MCI_WAVE_OPEN_PARMSA MCI_WAVE_OPEN_PARMS;
  2901. typedef PMCI_WAVE_OPEN_PARMSA PMCI_WAVE_OPEN_PARMS;
  2902. typedef LPMCI_WAVE_OPEN_PARMSA LPMCI_WAVE_OPEN_PARMS;
  2903. #endif // UNICODE
  2904. #else
  2905. typedef struct tagMCI_WAVE_OPEN_PARMS {
  2906. DWORD dwCallback;
  2907. MCIDEVICEID wDeviceID;
  2908. WORD wReserved0;
  2909. LPCSTR lpstrDeviceType;
  2910. LPCSTR lpstrElementName;
  2911. LPCSTR lpstrAlias;
  2912. DWORD dwBufferSeconds;
  2913. } MCI_WAVE_OPEN_PARMS, FAR *LPMCI_WAVE_OPEN_PARMS;
  2914. #endif
  2915. /* parameter block for MCI_DELETE command message */
  2916. typedef struct tagMCI_WAVE_DELETE_PARMS {
  2917. DWORD dwCallback;
  2918. DWORD dwFrom;
  2919. DWORD dwTo;
  2920. } MCI_WAVE_DELETE_PARMS, *PMCI_WAVE_DELETE_PARMS, FAR *LPMCI_WAVE_DELETE_PARMS;
  2921. /* parameter block for MCI_SET command message */
  2922. typedef struct tagMCI_WAVE_SET_PARMS {
  2923. DWORD dwCallback;
  2924. DWORD dwTimeFormat;
  2925. DWORD dwAudio;
  2926. #ifdef _WIN32
  2927. UINT wInput;
  2928. UINT wOutput;
  2929. #else
  2930. WORD wInput;
  2931. WORD wReserved0;
  2932. WORD wOutput;
  2933. WORD wReserved1;
  2934. #endif
  2935. WORD wFormatTag;
  2936. WORD wReserved2;
  2937. WORD nChannels;
  2938. WORD wReserved3;
  2939. DWORD nSamplesPerSec;
  2940. DWORD nAvgBytesPerSec;
  2941. WORD nBlockAlign;
  2942. WORD wReserved4;
  2943. WORD wBitsPerSample;
  2944. WORD wReserved5;
  2945. } MCI_WAVE_SET_PARMS, *PMCI_WAVE_SET_PARMS, FAR * LPMCI_WAVE_SET_PARMS;
  2946. /* MCI extensions for MIDI sequencer devices */
  2947. /* flags for the dwReturn field of MCI_STATUS_PARMS parameter block */
  2948. /* MCI_STATUS command, (dwItem == MCI_SEQ_STATUS_DIVTYPE) */
  2949. #define MCI_SEQ_DIV_PPQN (0 + MCI_SEQ_OFFSET)
  2950. #define MCI_SEQ_DIV_SMPTE_24 (1 + MCI_SEQ_OFFSET)
  2951. #define MCI_SEQ_DIV_SMPTE_25 (2 + MCI_SEQ_OFFSET)
  2952. #define MCI_SEQ_DIV_SMPTE_30DROP (3 + MCI_SEQ_OFFSET)
  2953. #define MCI_SEQ_DIV_SMPTE_30 (4 + MCI_SEQ_OFFSET)
  2954. /* flags for the dwMaster field of MCI_SEQ_SET_PARMS parameter block */
  2955. /* MCI_SET command, (dwFlags == MCI_SEQ_SET_MASTER) */
  2956. #define MCI_SEQ_FORMAT_SONGPTR 0x4001
  2957. #define MCI_SEQ_FILE 0x4002
  2958. #define MCI_SEQ_MIDI 0x4003
  2959. #define MCI_SEQ_SMPTE 0x4004
  2960. #define MCI_SEQ_NONE 65533
  2961. #define MCI_SEQ_MAPPER 65535
  2962. /* flags for the dwItem field of MCI_STATUS_PARMS parameter block */
  2963. #define MCI_SEQ_STATUS_TEMPO 0x00004002L
  2964. #define MCI_SEQ_STATUS_PORT 0x00004003L
  2965. #define MCI_SEQ_STATUS_SLAVE 0x00004007L
  2966. #define MCI_SEQ_STATUS_MASTER 0x00004008L
  2967. #define MCI_SEQ_STATUS_OFFSET 0x00004009L
  2968. #define MCI_SEQ_STATUS_DIVTYPE 0x0000400AL
  2969. #define MCI_SEQ_STATUS_NAME 0x0000400BL
  2970. #define MCI_SEQ_STATUS_COPYRIGHT 0x0000400CL
  2971. /* flags for the dwFlags parameter of MCI_SET command message */
  2972. #define MCI_SEQ_SET_TEMPO 0x00010000L
  2973. #define MCI_SEQ_SET_PORT 0x00020000L
  2974. #define MCI_SEQ_SET_SLAVE 0x00040000L
  2975. #define MCI_SEQ_SET_MASTER 0x00080000L
  2976. #define MCI_SEQ_SET_OFFSET 0x01000000L
  2977. /* parameter block for MCI_SET command message */
  2978. typedef struct tagMCI_SEQ_SET_PARMS {
  2979. DWORD dwCallback;
  2980. DWORD dwTimeFormat;
  2981. DWORD dwAudio;
  2982. DWORD dwTempo;
  2983. DWORD dwPort;
  2984. DWORD dwSlave;
  2985. DWORD dwMaster;
  2986. DWORD dwOffset;
  2987. } MCI_SEQ_SET_PARMS, *PMCI_SEQ_SET_PARMS, FAR * LPMCI_SEQ_SET_PARMS;
  2988. /* MCI extensions for animation devices */
  2989. /* flags for dwFlags parameter of MCI_OPEN command message */
  2990. #define MCI_ANIM_OPEN_WS 0x00010000L
  2991. #define MCI_ANIM_OPEN_PARENT 0x00020000L
  2992. #define MCI_ANIM_OPEN_NOSTATIC 0x00040000L
  2993. /* flags for dwFlags parameter of MCI_PLAY command message */
  2994. #define MCI_ANIM_PLAY_SPEED 0x00010000L
  2995. #define MCI_ANIM_PLAY_REVERSE 0x00020000L
  2996. #define MCI_ANIM_PLAY_FAST 0x00040000L
  2997. #define MCI_ANIM_PLAY_SLOW 0x00080000L
  2998. #define MCI_ANIM_PLAY_SCAN 0x00100000L
  2999. /* flags for dwFlags parameter of MCI_STEP command message */
  3000. #define MCI_ANIM_STEP_REVERSE 0x00010000L
  3001. #define MCI_ANIM_STEP_FRAMES 0x00020000L
  3002. /* flags for dwItem field of MCI_STATUS_PARMS parameter block */
  3003. #define MCI_ANIM_STATUS_SPEED 0x00004001L
  3004. #define MCI_ANIM_STATUS_FORWARD 0x00004002L
  3005. #define MCI_ANIM_STATUS_HWND 0x00004003L
  3006. #define MCI_ANIM_STATUS_HPAL 0x00004004L
  3007. #define MCI_ANIM_STATUS_STRETCH 0x00004005L
  3008. /* flags for the dwFlags parameter of MCI_INFO command message */
  3009. #define MCI_ANIM_INFO_TEXT 0x00010000L
  3010. /* flags for dwItem field of MCI_GETDEVCAPS_PARMS parameter block */
  3011. #define MCI_ANIM_GETDEVCAPS_CAN_REVERSE 0x00004001L
  3012. #define MCI_ANIM_GETDEVCAPS_FAST_RATE 0x00004002L
  3013. #define MCI_ANIM_GETDEVCAPS_SLOW_RATE 0x00004003L
  3014. #define MCI_ANIM_GETDEVCAPS_NORMAL_RATE 0x00004004L
  3015. #define MCI_ANIM_GETDEVCAPS_PALETTES 0x00004006L
  3016. #define MCI_ANIM_GETDEVCAPS_CAN_STRETCH 0x00004007L
  3017. #define MCI_ANIM_GETDEVCAPS_MAX_WINDOWS 0x00004008L
  3018. /* flags for the MCI_REALIZE command message */
  3019. #define MCI_ANIM_REALIZE_NORM 0x00010000L
  3020. #define MCI_ANIM_REALIZE_BKGD 0x00020000L
  3021. /* flags for dwFlags parameter of MCI_WINDOW command message */
  3022. #define MCI_ANIM_WINDOW_HWND 0x00010000L
  3023. #define MCI_ANIM_WINDOW_STATE 0x00040000L
  3024. #define MCI_ANIM_WINDOW_TEXT 0x00080000L
  3025. #define MCI_ANIM_WINDOW_ENABLE_STRETCH 0x00100000L
  3026. #define MCI_ANIM_WINDOW_DISABLE_STRETCH 0x00200000L
  3027. /* flags for hWnd field of MCI_ANIM_WINDOW_PARMS parameter block */
  3028. /* MCI_WINDOW command message, (dwFlags == MCI_ANIM_WINDOW_HWND) */
  3029. #define MCI_ANIM_WINDOW_DEFAULT 0x00000000L
  3030. /* flags for dwFlags parameter of MCI_PUT command message */
  3031. #define MCI_ANIM_RECT 0x00010000L
  3032. #define MCI_ANIM_PUT_SOURCE 0x00020000L
  3033. #define MCI_ANIM_PUT_DESTINATION 0x00040000L
  3034. /* flags for dwFlags parameter of MCI_WHERE command message */
  3035. #define MCI_ANIM_WHERE_SOURCE 0x00020000L
  3036. #define MCI_ANIM_WHERE_DESTINATION 0x00040000L
  3037. /* flags for dwFlags parameter of MCI_UPDATE command message */
  3038. #define MCI_ANIM_UPDATE_HDC 0x00020000L
  3039. /* parameter block for MCI_OPEN command message */
  3040. #ifdef _WIN32
  3041. typedef struct tagMCI_ANIM_OPEN_PARMSA {
  3042. DWORD dwCallback;
  3043. MCIDEVICEID wDeviceID;
  3044. LPCSTR lpstrDeviceType;
  3045. LPCSTR lpstrElementName;
  3046. LPCSTR lpstrAlias;
  3047. DWORD dwStyle;
  3048. HWND hWndParent;
  3049. } MCI_ANIM_OPEN_PARMSA, *PMCI_ANIM_OPEN_PARMSA, *LPMCI_ANIM_OPEN_PARMSA;
  3050. typedef struct tagMCI_ANIM_OPEN_PARMSW {
  3051. DWORD dwCallback;
  3052. MCIDEVICEID wDeviceID;
  3053. LPCWSTR lpstrDeviceType;
  3054. LPCWSTR lpstrElementName;
  3055. LPCWSTR lpstrAlias;
  3056. DWORD dwStyle;
  3057. HWND hWndParent;
  3058. } MCI_ANIM_OPEN_PARMSW, *PMCI_ANIM_OPEN_PARMSW, *LPMCI_ANIM_OPEN_PARMSW;
  3059. #ifdef UNICODE
  3060. typedef MCI_ANIM_OPEN_PARMSW MCI_ANIM_OPEN_PARMS;
  3061. typedef PMCI_ANIM_OPEN_PARMSW PMCI_ANIM_OPEN_PARMS;
  3062. typedef LPMCI_ANIM_OPEN_PARMSW LPMCI_ANIM_OPEN_PARMS;
  3063. #else
  3064. typedef MCI_ANIM_OPEN_PARMSA MCI_ANIM_OPEN_PARMS;
  3065. typedef PMCI_ANIM_OPEN_PARMSA PMCI_ANIM_OPEN_PARMS;
  3066. typedef LPMCI_ANIM_OPEN_PARMSA LPMCI_ANIM_OPEN_PARMS;
  3067. #endif // UNICODE
  3068. #else
  3069. typedef struct tagMCI_ANIM_OPEN_PARMS {
  3070. DWORD dwCallback;
  3071. MCIDEVICEID wDeviceID;
  3072. WORD wReserved0;
  3073. LPCSTR lpstrDeviceType;
  3074. LPCSTR lpstrElementName;
  3075. LPCSTR lpstrAlias;
  3076. DWORD dwStyle;
  3077. HWND hWndParent;
  3078. WORD wReserved1;
  3079. } MCI_ANIM_OPEN_PARMS, FAR *LPMCI_ANIM_OPEN_PARMS;
  3080. #endif
  3081. /* parameter block for MCI_PLAY command message */
  3082. typedef struct tagMCI_ANIM_PLAY_PARMS {
  3083. DWORD dwCallback;
  3084. DWORD dwFrom;
  3085. DWORD dwTo;
  3086. DWORD dwSpeed;
  3087. } MCI_ANIM_PLAY_PARMS, *PMCI_ANIM_PLAY_PARMS, FAR *LPMCI_ANIM_PLAY_PARMS;
  3088. /* parameter block for MCI_STEP command message */
  3089. typedef struct tagMCI_ANIM_STEP_PARMS {
  3090. DWORD dwCallback;
  3091. DWORD dwFrames;
  3092. } MCI_ANIM_STEP_PARMS, *PMCI_ANIM_STEP_PARMS, FAR *LPMCI_ANIM_STEP_PARMS;
  3093. /* parameter block for MCI_WINDOW command message */
  3094. #ifdef _WIN32
  3095. typedef struct tagMCI_ANIM_WINDOW_PARMSA {
  3096. DWORD dwCallback;
  3097. HWND hWnd;
  3098. UINT nCmdShow;
  3099. LPCSTR lpstrText;
  3100. } MCI_ANIM_WINDOW_PARMSA, *PMCI_ANIM_WINDOW_PARMSA, * LPMCI_ANIM_WINDOW_PARMSA;
  3101. typedef struct tagMCI_ANIM_WINDOW_PARMSW {
  3102. DWORD dwCallback;
  3103. HWND hWnd;
  3104. UINT nCmdShow;
  3105. LPCWSTR lpstrText;
  3106. } MCI_ANIM_WINDOW_PARMSW, *PMCI_ANIM_WINDOW_PARMSW, * LPMCI_ANIM_WINDOW_PARMSW;
  3107. #ifdef UNICODE
  3108. typedef MCI_ANIM_WINDOW_PARMSW MCI_ANIM_WINDOW_PARMS;
  3109. typedef PMCI_ANIM_WINDOW_PARMSW PMCI_ANIM_WINDOW_PARMS;
  3110. typedef LPMCI_ANIM_WINDOW_PARMSW LPMCI_ANIM_WINDOW_PARMS;
  3111. #else
  3112. typedef MCI_ANIM_WINDOW_PARMSA MCI_ANIM_WINDOW_PARMS;
  3113. typedef PMCI_ANIM_WINDOW_PARMSA PMCI_ANIM_WINDOW_PARMS;
  3114. typedef LPMCI_ANIM_WINDOW_PARMSA LPMCI_ANIM_WINDOW_PARMS;
  3115. #endif // UNICODE
  3116. #else
  3117. typedef struct tagMCI_ANIM_WINDOW_PARMS {
  3118. DWORD dwCallback;
  3119. HWND hWnd;
  3120. WORD wReserved1;
  3121. WORD nCmdShow;
  3122. WORD wReserved2;
  3123. LPCSTR lpstrText;
  3124. } MCI_ANIM_WINDOW_PARMS, FAR * LPMCI_ANIM_WINDOW_PARMS;
  3125. #endif
  3126. /* parameter block for MCI_PUT, MCI_UPDATE, MCI_WHERE command messages */
  3127. typedef struct tagMCI_ANIM_RECT_PARMS {
  3128. DWORD dwCallback;
  3129. #ifdef MCI_USE_OFFEXT
  3130. POINT ptOffset;
  3131. POINT ptExtent;
  3132. #else /* ifdef MCI_USE_OFFEXT */
  3133. RECT rc;
  3134. #endif /* ifdef MCI_USE_OFFEXT */
  3135. } MCI_ANIM_RECT_PARMS;
  3136. typedef MCI_ANIM_RECT_PARMS * PMCI_ANIM_RECT_PARMS;
  3137. typedef MCI_ANIM_RECT_PARMS FAR * LPMCI_ANIM_RECT_PARMS;
  3138. /* parameter block for MCI_UPDATE PARMS */
  3139. typedef struct tagMCI_ANIM_UPDATE_PARMS {
  3140. DWORD dwCallback;
  3141. RECT rc;
  3142. HDC hDC;
  3143. } MCI_ANIM_UPDATE_PARMS, *PMCI_ANIM_UPDATE_PARMS, FAR * LPMCI_ANIM_UPDATE_PARMS;
  3144. /* MCI extensions for video overlay devices */
  3145. /* flags for dwFlags parameter of MCI_OPEN command message */
  3146. #define MCI_OVLY_OPEN_WS 0x00010000L
  3147. #define MCI_OVLY_OPEN_PARENT 0x00020000L
  3148. /* flags for dwFlags parameter of MCI_STATUS command message */
  3149. #define MCI_OVLY_STATUS_HWND 0x00004001L
  3150. #define MCI_OVLY_STATUS_STRETCH 0x00004002L
  3151. /* flags for dwFlags parameter of MCI_INFO command message */
  3152. #define MCI_OVLY_INFO_TEXT 0x00010000L
  3153. /* flags for dwItem field of MCI_GETDEVCAPS_PARMS parameter block */
  3154. #define MCI_OVLY_GETDEVCAPS_CAN_STRETCH 0x00004001L
  3155. #define MCI_OVLY_GETDEVCAPS_CAN_FREEZE 0x00004002L
  3156. #define MCI_OVLY_GETDEVCAPS_MAX_WINDOWS 0x00004003L
  3157. /* flags for dwFlags parameter of MCI_WINDOW command message */
  3158. #define MCI_OVLY_WINDOW_HWND 0x00010000L
  3159. #define MCI_OVLY_WINDOW_STATE 0x00040000L
  3160. #define MCI_OVLY_WINDOW_TEXT 0x00080000L
  3161. #define MCI_OVLY_WINDOW_ENABLE_STRETCH 0x00100000L
  3162. #define MCI_OVLY_WINDOW_DISABLE_STRETCH 0x00200000L
  3163. /* flags for hWnd parameter of MCI_OVLY_WINDOW_PARMS parameter block */
  3164. #define MCI_OVLY_WINDOW_DEFAULT 0x00000000L
  3165. /* flags for dwFlags parameter of MCI_PUT command message */
  3166. #define MCI_OVLY_RECT 0x00010000L
  3167. #define MCI_OVLY_PUT_SOURCE 0x00020000L
  3168. #define MCI_OVLY_PUT_DESTINATION 0x00040000L
  3169. #define MCI_OVLY_PUT_FRAME 0x00080000L
  3170. #define MCI_OVLY_PUT_VIDEO 0x00100000L
  3171. /* flags for dwFlags parameter of MCI_WHERE command message */
  3172. #define MCI_OVLY_WHERE_SOURCE 0x00020000L
  3173. #define MCI_OVLY_WHERE_DESTINATION 0x00040000L
  3174. #define MCI_OVLY_WHERE_FRAME 0x00080000L
  3175. #define MCI_OVLY_WHERE_VIDEO 0x00100000L
  3176. /* parameter block for MCI_OPEN command message */
  3177. #ifdef _WIN32
  3178. typedef struct tagMCI_OVLY_OPEN_PARMSA {
  3179. DWORD dwCallback;
  3180. MCIDEVICEID wDeviceID;
  3181. LPCSTR lpstrDeviceType;
  3182. LPCSTR lpstrElementName;
  3183. LPCSTR lpstrAlias;
  3184. DWORD dwStyle;
  3185. HWND hWndParent;
  3186. } MCI_OVLY_OPEN_PARMSA, *PMCI_OVLY_OPEN_PARMSA, *LPMCI_OVLY_OPEN_PARMSA;
  3187. typedef struct tagMCI_OVLY_OPEN_PARMSW {
  3188. DWORD dwCallback;
  3189. MCIDEVICEID wDeviceID;
  3190. LPCWSTR lpstrDeviceType;
  3191. LPCWSTR lpstrElementName;
  3192. LPCWSTR lpstrAlias;
  3193. DWORD dwStyle;
  3194. HWND hWndParent;
  3195. } MCI_OVLY_OPEN_PARMSW, *PMCI_OVLY_OPEN_PARMSW, *LPMCI_OVLY_OPEN_PARMSW;
  3196. #ifdef UNICODE
  3197. typedef MCI_OVLY_OPEN_PARMSW MCI_OVLY_OPEN_PARMS;
  3198. typedef PMCI_OVLY_OPEN_PARMSW PMCI_OVLY_OPEN_PARMS;
  3199. typedef LPMCI_OVLY_OPEN_PARMSW LPMCI_OVLY_OPEN_PARMS;
  3200. #else
  3201. typedef MCI_OVLY_OPEN_PARMSA MCI_OVLY_OPEN_PARMS;
  3202. typedef PMCI_OVLY_OPEN_PARMSA PMCI_OVLY_OPEN_PARMS;
  3203. typedef LPMCI_OVLY_OPEN_PARMSA LPMCI_OVLY_OPEN_PARMS;
  3204. #endif // UNICODE
  3205. #else
  3206. typedef struct tagMCI_OVLY_OPEN_PARMS {
  3207. DWORD dwCallback;
  3208. MCIDEVICEID wDeviceID;
  3209. WORD wReserved0;
  3210. LPCSTR lpstrDeviceType;
  3211. LPCSTR lpstrElementName;
  3212. LPCSTR lpstrAlias;
  3213. DWORD dwStyle;
  3214. HWND hWndParent;
  3215. WORD wReserved1;
  3216. } MCI_OVLY_OPEN_PARMS, FAR *LPMCI_OVLY_OPEN_PARMS;
  3217. #endif
  3218. /* parameter block for MCI_WINDOW command message */
  3219. #ifdef _WIN32
  3220. typedef struct tagMCI_OVLY_WINDOW_PARMSA {
  3221. DWORD dwCallback;
  3222. HWND hWnd;
  3223. UINT nCmdShow;
  3224. LPCSTR lpstrText;
  3225. } MCI_OVLY_WINDOW_PARMSA, *PMCI_OVLY_WINDOW_PARMSA, * LPMCI_OVLY_WINDOW_PARMSA;
  3226. typedef struct tagMCI_OVLY_WINDOW_PARMSW {
  3227. DWORD dwCallback;
  3228. HWND hWnd;
  3229. UINT nCmdShow;
  3230. LPCWSTR lpstrText;
  3231. } MCI_OVLY_WINDOW_PARMSW, *PMCI_OVLY_WINDOW_PARMSW, * LPMCI_OVLY_WINDOW_PARMSW;
  3232. #ifdef UNICODE
  3233. typedef MCI_OVLY_WINDOW_PARMSW MCI_OVLY_WINDOW_PARMS;
  3234. typedef PMCI_OVLY_WINDOW_PARMSW PMCI_OVLY_WINDOW_PARMS;
  3235. typedef LPMCI_OVLY_WINDOW_PARMSW LPMCI_OVLY_WINDOW_PARMS;
  3236. #else
  3237. typedef MCI_OVLY_WINDOW_PARMSA MCI_OVLY_WINDOW_PARMS;
  3238. typedef PMCI_OVLY_WINDOW_PARMSA PMCI_OVLY_WINDOW_PARMS;
  3239. typedef LPMCI_OVLY_WINDOW_PARMSA LPMCI_OVLY_WINDOW_PARMS;
  3240. #endif // UNICODE
  3241. #else
  3242. typedef struct tagMCI_OVLY_WINDOW_PARMS {
  3243. DWORD dwCallback;
  3244. HWND hWnd;
  3245. WORD wReserved1;
  3246. UINT nCmdShow;
  3247. WORD wReserved2;
  3248. LPCSTR lpstrText;
  3249. } MCI_OVLY_WINDOW_PARMS, FAR * LPMCI_OVLY_WINDOW_PARMS;
  3250. #endif
  3251. /* parameter block for MCI_PUT, MCI_UPDATE, and MCI_WHERE command messages */
  3252. typedef struct tagMCI_OVLY_RECT_PARMS {
  3253. DWORD dwCallback;
  3254. #ifdef MCI_USE_OFFEXT
  3255. POINT ptOffset;
  3256. POINT ptExtent;
  3257. #else /* ifdef MCI_USE_OFFEXT */
  3258. RECT rc;
  3259. #endif /* ifdef MCI_USE_OFFEXT */
  3260. } MCI_OVLY_RECT_PARMS, *PMCI_OVLY_RECT_PARMS, FAR * LPMCI_OVLY_RECT_PARMS;
  3261. /* parameter block for MCI_SAVE command message */
  3262. #ifdef _WIN32
  3263. typedef struct tagMCI_OVLY_SAVE_PARMSA {
  3264. DWORD dwCallback;
  3265. LPCSTR lpfilename;
  3266. RECT rc;
  3267. } MCI_OVLY_SAVE_PARMSA, *PMCI_OVLY_SAVE_PARMSA, * LPMCI_OVLY_SAVE_PARMSA;
  3268. typedef struct tagMCI_OVLY_SAVE_PARMSW {
  3269. DWORD dwCallback;
  3270. LPCWSTR lpfilename;
  3271. RECT rc;
  3272. } MCI_OVLY_SAVE_PARMSW, *PMCI_OVLY_SAVE_PARMSW, * LPMCI_OVLY_SAVE_PARMSW;
  3273. #ifdef UNICODE
  3274. typedef MCI_OVLY_SAVE_PARMSW MCI_OVLY_SAVE_PARMS;
  3275. typedef PMCI_OVLY_SAVE_PARMSW PMCI_OVLY_SAVE_PARMS;
  3276. typedef LPMCI_OVLY_SAVE_PARMSW LPMCI_OVLY_SAVE_PARMS;
  3277. #else
  3278. typedef MCI_OVLY_SAVE_PARMSA MCI_OVLY_SAVE_PARMS;
  3279. typedef PMCI_OVLY_SAVE_PARMSA PMCI_OVLY_SAVE_PARMS;
  3280. typedef LPMCI_OVLY_SAVE_PARMSA LPMCI_OVLY_SAVE_PARMS;
  3281. #endif // UNICODE
  3282. #else
  3283. typedef struct tagMCI_OVLY_SAVE_PARMS {
  3284. DWORD dwCallback;
  3285. LPCSTR lpfilename;
  3286. RECT rc;
  3287. } MCI_OVLY_SAVE_PARMS, FAR * LPMCI_OVLY_SAVE_PARMS;
  3288. #endif
  3289. /* parameter block for MCI_LOAD command message */
  3290. #ifdef _WIN32
  3291. typedef struct tagMCI_OVLY_LOAD_PARMSA {
  3292. DWORD dwCallback;
  3293. LPCSTR lpfilename;
  3294. RECT rc;
  3295. } MCI_OVLY_LOAD_PARMSA, *PMCI_OVLY_LOAD_PARMSA, * LPMCI_OVLY_LOAD_PARMSA;
  3296. typedef struct tagMCI_OVLY_LOAD_PARMSW {
  3297. DWORD dwCallback;
  3298. LPCWSTR lpfilename;
  3299. RECT rc;
  3300. } MCI_OVLY_LOAD_PARMSW, *PMCI_OVLY_LOAD_PARMSW, * LPMCI_OVLY_LOAD_PARMSW;
  3301. #ifdef UNICODE
  3302. typedef MCI_OVLY_LOAD_PARMSW MCI_OVLY_LOAD_PARMS;
  3303. typedef PMCI_OVLY_LOAD_PARMSW PMCI_OVLY_LOAD_PARMS;
  3304. typedef LPMCI_OVLY_LOAD_PARMSW LPMCI_OVLY_LOAD_PARMS;
  3305. #else
  3306. typedef MCI_OVLY_LOAD_PARMSA MCI_OVLY_LOAD_PARMS;
  3307. typedef PMCI_OVLY_LOAD_PARMSA PMCI_OVLY_LOAD_PARMS;
  3308. typedef LPMCI_OVLY_LOAD_PARMSA LPMCI_OVLY_LOAD_PARMS;
  3309. #endif // UNICODE
  3310. #else
  3311. typedef struct tagMCI_OVLY_LOAD_PARMS {
  3312. DWORD dwCallback;
  3313. LPCSTR lpfilename;
  3314. RECT rc;
  3315. } MCI_OVLY_LOAD_PARMS, FAR * LPMCI_OVLY_LOAD_PARMS;
  3316. #endif
  3317. #endif /* ifndef _WIN32_VXD */
  3318. #endif /* ifndef MMNOMCI */
  3319. /****************************************************************************
  3320. DISPLAY Driver extensions
  3321. ****************************************************************************/
  3322. #ifndef NEWTRANSPARENT
  3323. #define NEWTRANSPARENT 3 /* use with SetBkMode() */
  3324. #define QUERYROPSUPPORT 40 /* use to determine ROP support */
  3325. #endif /* ifndef NEWTRANSPARENT */
  3326. /****************************************************************************
  3327. DIB Driver extensions
  3328. ****************************************************************************/
  3329. #define SELECTDIB 41 /* DIB.DRV select dib escape */
  3330. #define DIBINDEX(n) MAKELONG((n),0x10FF)
  3331. /****************************************************************************
  3332. ScreenSaver support
  3333. The current application will receive a syscommand of SC_SCREENSAVE just
  3334. before the screen saver is invoked. If the app wishes to prevent a
  3335. screen save, return non-zero value, otherwise call DefWindowProc().
  3336. ****************************************************************************/
  3337. #ifndef SC_SCREENSAVE
  3338. #define SC_SCREENSAVE 0xF140
  3339. #endif /* ifndef SC_SCREENSAVE */
  3340. #ifdef __cplusplus
  3341. } /* End of extern "C" { */
  3342. #endif /* __cplusplus */
  3343. #ifdef _WIN32
  3344. #include <poppack.h>
  3345. #else
  3346. #ifndef RC_INVOKED
  3347. #pragma pack()
  3348. #endif
  3349. #endif
  3350. #endif /* _INC_MMSYSP */ // ;internal
  3351. #endif /* _INC_MMSYSTEM */