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.

4228 lines
164 KiB

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