Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

3456 lines
137 KiB

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