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.

4084 lines
171 KiB

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