Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1954 lines
79 KiB

  1. /****************************************************************************/
  2. /* */
  3. /* MMSYSTEM.H - Include file for Multimedia APIs */
  4. /* */
  5. /* Note: You must include WINDOWS.H before including this file. */
  6. /* */
  7. /* Copyright (c) 1990-1992, Microsoft Corp. All rights reserved. */
  8. /* */
  9. /****************************************************************************/
  10. #define BUILDDLL
  11. /* If defined, the following flags inhibit inclusion
  12. * of the indicated items:
  13. *
  14. * MMNODRV - Installable driver support
  15. * MMNOSOUND - Sound support
  16. * MMNOWAVE - Waveform support
  17. * MMNOMIDI - MIDI support
  18. * MMNOAUX - Auxiliary audio support
  19. * MMNOTIMER - Timer support
  20. * MMNOJOY - Joystick support
  21. * MMNOMCI - MCI support
  22. * MMNOMMIO - Multimedia file I/O support
  23. * MMNOMMSYSTEM - General MMSYSTEM functions
  24. */
  25. #ifndef _INC_MMSYSTEM
  26. #define _INC_MMSYSTEM /* #defined if mmsystem.h has been included */
  27. #ifndef RC_INVOKED
  28. #pragma pack(1) /* Assume byte packing throughout */
  29. #endif
  30. #ifdef __cplusplus
  31. extern "C" { /* Assume C declarations for C++ */
  32. #endif /* __cplusplus */
  33. #ifdef BUILDDLL /* ;Internal */
  34. #undef WINAPI /* ;Internal */
  35. #define WINAPI _loadds _far _pascal /* ;Internal */
  36. #undef CALLBACK /* ;Internal */
  37. #define CALLBACK _loadds _far _pascal /* ;Internal */
  38. #endif /* ifdef BUILDDLL */ /* ;Internal */
  39. /****************************************************************************
  40. General constants and data types
  41. ****************************************************************************/
  42. /* general constants */
  43. #define MAXPNAMELEN 32 /* max product name length (including NULL) */
  44. #define MAXERRORLENGTH 128 /* max error text length (including NULL) */
  45. /* general data types */
  46. typedef WORD VERSION; /* major (high byte), minor (low byte) */
  47. /* MMTIME data structure */
  48. typedef struct mmtime_tag {
  49. UINT wType; /* indicates the contents of the union */
  50. union {
  51. DWORD ms; /* milliseconds */
  52. DWORD sample; /* samples */
  53. DWORD cb; /* byte count */
  54. struct { /* SMPTE */
  55. BYTE hour; /* hours */
  56. BYTE min; /* minutes */
  57. BYTE sec; /* seconds */
  58. BYTE frame; /* frames */
  59. BYTE fps; /* frames per second */
  60. BYTE dummy; /* pad */
  61. } smpte;
  62. struct { /* MIDI */
  63. DWORD songptrpos; /* song pointer position */
  64. } midi;
  65. } u;
  66. } MMTIME;
  67. typedef MMTIME *PMMTIME;
  68. typedef MMTIME NEAR *NPMMTIME;
  69. typedef MMTIME FAR *LPMMTIME;
  70. /* types for wType field in MMTIME struct */
  71. #define TIME_MS 0x0001 /* time in milliseconds */
  72. #define TIME_SAMPLES 0x0002 /* number of wave samples */
  73. #define TIME_BYTES 0x0004 /* current byte offset */
  74. #define TIME_SMPTE 0x0008 /* SMPTE time */
  75. #define TIME_MIDI 0x0010 /* MIDI time */
  76. /****************************************************************************
  77. Multimedia Extensions Window Messages
  78. ****************************************************************************/
  79. #define MM_JOY1MOVE 0x3A0 /* joystick */
  80. #define MM_JOY2MOVE 0x3A1
  81. #define MM_JOY1ZMOVE 0x3A2
  82. #define MM_JOY2ZMOVE 0x3A3
  83. #define MM_JOY1BUTTONDOWN 0x3B5
  84. #define MM_JOY2BUTTONDOWN 0x3B6
  85. #define MM_JOY1BUTTONUP 0x3B7
  86. #define MM_JOY2BUTTONUP 0x3B8
  87. #define MM_MCINOTIFY 0x3B9 /* MCI */
  88. #define MM_MCISYSTEM_STRING 0x3CA /* ;Internal */
  89. #define MM_WOM_OPEN 0x3BB /* waveform output */
  90. #define MM_WOM_CLOSE 0x3BC
  91. #define MM_WOM_DONE 0x3BD
  92. #define MM_WIM_OPEN 0x3BE /* waveform input */
  93. #define MM_WIM_CLOSE 0x3BF
  94. #define MM_WIM_DATA 0x3C0
  95. #define MM_MIM_OPEN 0x3C1 /* MIDI input */
  96. #define MM_MIM_CLOSE 0x3C2
  97. #define MM_MIM_DATA 0x3C3
  98. #define MM_MIM_LONGDATA 0x3C4
  99. #define MM_MIM_ERROR 0x3C5
  100. #define MM_MIM_LONGERROR 0x3C6
  101. #define MM_MOM_OPEN 0x3C7 /* MIDI output */
  102. #define MM_MOM_CLOSE 0x3C8
  103. #define MM_MOM_DONE 0x3C9
  104. /****************************************************************************
  105. String resource number bases (internal use)
  106. ****************************************************************************/
  107. #define MMSYSERR_BASE 0
  108. #define WAVERR_BASE 32
  109. #define MIDIERR_BASE 64
  110. #define TIMERR_BASE 96
  111. #define JOYERR_BASE 160
  112. #define MCIERR_BASE 256
  113. #define MCI_STRING_OFFSET 512
  114. #define MCI_VD_OFFSET 1024
  115. #define MCI_CD_OFFSET 1088
  116. #define MCI_WAVE_OFFSET 1152
  117. #define MCI_SEQ_OFFSET 1216
  118. /****************************************************************************
  119. General error return values
  120. ****************************************************************************/
  121. /* general error return values */
  122. #define MMSYSERR_NOERROR 0 /* no error */
  123. #define MMSYSERR_ERROR (MMSYSERR_BASE + 1) /* unspecified error */
  124. #define MMSYSERR_BADDEVICEID (MMSYSERR_BASE + 2) /* device ID out of range */
  125. #define MMSYSERR_NOTENABLED (MMSYSERR_BASE + 3) /* driver failed enable */
  126. #define MMSYSERR_ALLOCATED (MMSYSERR_BASE + 4) /* device already allocated */
  127. #define MMSYSERR_INVALHANDLE (MMSYSERR_BASE + 5) /* device handle is invalid */
  128. #define MMSYSERR_NODRIVER (MMSYSERR_BASE + 6) /* no device driver present */
  129. #define MMSYSERR_NOMEM (MMSYSERR_BASE + 7) /* memory allocation error */
  130. #define MMSYSERR_NOTSUPPORTED (MMSYSERR_BASE + 8) /* function isn't supported */
  131. #define MMSYSERR_BADERRNUM (MMSYSERR_BASE + 9) /* error value out of range */
  132. #define MMSYSERR_INVALFLAG (MMSYSERR_BASE + 10) /* invalid flag passed */
  133. #define MMSYSERR_INVALPARAM (MMSYSERR_BASE + 11) /* invalid parameter passed */
  134. #define MMSYSERR_LASTERROR (MMSYSERR_BASE + 11) /* last error in range */
  135. #if (WINVER < 0x030a)
  136. DECLARE_HANDLE(HDRVR);
  137. #endif /* ifdef WINVER < 0x030a */
  138. #ifndef MMNODRV
  139. /****************************************************************************
  140. Installable driver support
  141. ****************************************************************************/
  142. #if (WINVER < 0x030a)
  143. /* return values from DriverProc() function */
  144. #define DRV_CANCEL 0x0000
  145. #define DRV_OK 0x0001
  146. #define DRV_RESTART 0x0002
  147. /* Driver messages */
  148. #define DRV_LOAD 0x0001
  149. #define DRV_ENABLE 0x0002
  150. #define DRV_OPEN 0x0003
  151. #define DRV_CLOSE 0x0004
  152. #define DRV_DISABLE 0x0005
  153. #define DRV_FREE 0x0006
  154. #define DRV_CONFIGURE 0x0007
  155. #define DRV_QUERYCONFIGURE 0x0008
  156. #define DRV_INSTALL 0x0009
  157. #define DRV_REMOVE 0x000A
  158. #define DRV_RESERVED 0x0800
  159. #define DRV_USER 0x4000
  160. /* LPARAM of DRV_CONFIGURE message */
  161. typedef struct tagDRVCONFIGINFO {
  162. DWORD dwDCISize;
  163. LPCSTR lpszDCISectionName;
  164. LPCSTR lpszDCIAliasName;
  165. } DRVCONFIGINFO;
  166. typedef DRVCONFIGINFO *PDRVCONFIGINFO;
  167. typedef DRVCONFIGINFO NEAR *NPDRVCONFIGINFO;
  168. typedef DRVCONFIGINFO FAR *LPDRVCONFIGINFO;
  169. /* installable driver function prototypes */
  170. LRESULT WINAPI DrvClose(HDRVR hDriver, LPARAM lParam1, LPARAM lParam2);
  171. HDRVR WINAPI DrvOpen(LPCSTR szDriverName, LPCSTR szSectionName,
  172. LPARAM lParam2);
  173. LRESULT WINAPI DrvSendMessage(HDRVR hDriver, UINT uMessage,
  174. LPARAM lParam1, LPARAM lParam2);
  175. HINSTANCE WINAPI DrvGetModuleHandle(HDRVR hDriver);
  176. LRESULT WINAPI DrvDefDriverProc(DWORD dwDriverIdentifier, HDRVR driverID,
  177. UINT uMessage, LPARAM lParam1, LPARAM lParam2);
  178. #define DefDriverProc DrvDefDriverProc
  179. #endif /* ifdef WINVER < 0x030a */
  180. #if (WINVER >= 0x030a)
  181. #ifdef DEBUG /* ;Internal */
  182. LRESULT WINAPI DrvClose(HDRVR,LPARAM,LPARAM); /* ;Internal */
  183. HDRVR WINAPI DrvOpen(LPCSTR,LPCSTR,LPARAM); /* ;Internal */
  184. #define OpenDriver DrvOpen /* ;Internal */
  185. #define CloseDriver DrvClose /* ;Internal */
  186. #endif /* ;Internal */
  187. /* return values from DriverProc() function */
  188. #define DRV_CANCEL DRVCNF_CANCEL
  189. #define DRV_OK DRVCNF_OK
  190. #define DRV_RESTART DRVCNF_RESTART
  191. #endif /* ifdef WINVER >= 0x030a */
  192. #define DRV_MCI_FIRST DRV_RESERVED
  193. #define DRV_MCI_LAST (DRV_RESERVED + 0xFFF)
  194. #endif /* ifndef MMNODRV */
  195. /****************************************************************************
  196. Driver callback support
  197. ****************************************************************************/
  198. /* flags used with waveOutOpen(), waveInOpen(), midiInOpen(), and */
  199. /* midiOutOpen() to specify the type of the dwCallback parameter. */
  200. #define CALLBACK_TYPEMASK 0x00070000l /* callback type mask */
  201. #define CALLBACK_NULL 0x00000000l /* no callback */
  202. #define CALLBACK_WINDOW 0x00010000l /* dwCallback is a HWND */
  203. #define CALLBACK_TASK 0x00020000l /* dwCallback is a HTASK */
  204. #define CALLBACK_FUNCTION 0x00030000l /* dwCallback is a FARPROC */
  205. /* driver callback prototypes */
  206. #ifdef BUILDDLL /* ;Internal */
  207. typedef void (FAR PASCAL DRVCALLBACK) (HDRVR h, UINT uMessage, DWORD dwUser, DWORD dw1, DWORD dw2); /* ;Internal */
  208. #else /* ifdef BUILDDLL */ /* ;Internal */
  209. typedef void (CALLBACK DRVCALLBACK) (HDRVR h, UINT uMessage, DWORD dwUser, DWORD dw1, DWORD dw2);
  210. #endif /* ifdef BUILDDLL */ /* ;Internal */
  211. typedef DRVCALLBACK FAR *LPDRVCALLBACK;
  212. /****************************************************************************
  213. Manufacturer and product IDs
  214. Used with wMid and wPid fields in WAVEOUTCAPS, WAVEINCAPS,
  215. MIDIOUTCAPS, MIDIINCAPS, AUXCAPS, JOYCAPS structures.
  216. ****************************************************************************/
  217. /* manufacturer IDs */
  218. #define MM_MICROSOFT 1 /* Microsoft Corp. */
  219. /* product IDs */
  220. #define MM_MIDI_MAPPER 1 /* MIDI Mapper */
  221. #define MM_WAVE_MAPPER 2 /* Wave Mapper */
  222. #define MM_SNDBLST_MIDIOUT 3 /* Sound Blaster MIDI output port */
  223. #define MM_SNDBLST_MIDIIN 4 /* Sound Blaster MIDI input port */
  224. #define MM_SNDBLST_SYNTH 5 /* Sound Blaster internal synthesizer */
  225. #define MM_SNDBLST_WAVEOUT 6 /* Sound Blaster waveform output */
  226. #define MM_SNDBLST_WAVEIN 7 /* Sound Blaster waveform input */
  227. #define MM_ADLIB 9 /* Ad Lib-compatible synthesizer */
  228. #define MM_MPU401_MIDIOUT 10 /* MPU401-compatible MIDI output port */
  229. #define MM_MPU401_MIDIIN 11 /* MPU401-compatible MIDI input port */
  230. #define MM_PC_JOYSTICK 12 /* Joystick adapter */
  231. #ifndef MMNOMMSYSTEM
  232. /****************************************************************************
  233. General MMSYSTEM support
  234. ****************************************************************************/
  235. WORD WINAPI mmsystemGetVersion(void);
  236. void WINAPI OutputDebugStr(LPCSTR);
  237. #endif /* ifndef MMNOMMSYSTEM */
  238. #ifndef MMNOSOUND
  239. /****************************************************************************
  240. Sound support
  241. ****************************************************************************/
  242. BOOL WINAPI sndPlaySound(LPCSTR lpszSoundName, UINT uFlags);
  243. /* flag values for wFlags parameter */
  244. #define SND_SYNC 0x0000 /* play synchronously (default) */
  245. #define SND_ASYNC 0x0001 /* play asynchronously */
  246. #define SND_NODEFAULT 0x0002 /* don't use default sound */
  247. #define SND_MEMORY 0x0004 /* lpszSoundName points to a memory file */
  248. #define SND_LOOP 0x0008 /* loop the sound until next sndPlaySound */
  249. #define SND_NOSTOP 0x0010 /* don't stop any currently playing sound */
  250. #define SND_VALID 0x001F /* valid flags */ /* ;Internal */
  251. #endif /* ifndef MMNOSOUND */
  252. #ifndef MMNOWAVE
  253. /****************************************************************************
  254. Waveform audio support
  255. ****************************************************************************/
  256. /* waveform audio error return values */
  257. #define WAVERR_BADFORMAT (WAVERR_BASE + 0) /* unsupported wave format */
  258. #define WAVERR_STILLPLAYING (WAVERR_BASE + 1) /* still something playing */
  259. #define WAVERR_UNPREPARED (WAVERR_BASE + 2) /* header not prepared */
  260. #define WAVERR_SYNC (WAVERR_BASE + 3) /* device is synchronous */
  261. #define WAVERR_LASTERROR (WAVERR_BASE + 3) /* last error in range */
  262. /* waveform audio data types */
  263. DECLARE_HANDLE(HWAVE);
  264. DECLARE_HANDLE(HWAVEIN);
  265. DECLARE_HANDLE(HWAVEOUT);
  266. typedef HWAVEIN FAR *LPHWAVEIN;
  267. typedef HWAVEOUT FAR *LPHWAVEOUT;
  268. typedef DRVCALLBACK WAVECALLBACK;
  269. typedef WAVECALLBACK FAR *LPWAVECALLBACK;
  270. /* wave callback messages */
  271. #define WOM_OPEN MM_WOM_OPEN
  272. #define WOM_CLOSE MM_WOM_CLOSE
  273. #define WOM_DONE MM_WOM_DONE
  274. #define WIM_OPEN MM_WIM_OPEN
  275. #define WIM_CLOSE MM_WIM_CLOSE
  276. #define WIM_DATA MM_WIM_DATA
  277. /* device ID for wave device mapper */
  278. #define WAVE_MAPPER (-1)
  279. /* flags for dwFlags parameter in waveOutOpen() and waveInOpen() */
  280. #define WAVE_FORMAT_QUERY 0x0001
  281. #define WAVE_ALLOWSYNC 0x0002
  282. #define WAVE_VALID 0x0003 /* ;Internal */
  283. /* wave data block header */
  284. typedef struct wavehdr_tag {
  285. LPSTR lpData; /* pointer to locked data buffer */
  286. DWORD dwBufferLength; /* length of data buffer */
  287. DWORD dwBytesRecorded; /* used for input only */
  288. DWORD dwUser; /* for client's use */
  289. DWORD dwFlags; /* assorted flags (see defines) */
  290. DWORD dwLoops; /* loop control counter */
  291. struct wavehdr_tag far *lpNext; /* reserved for driver */
  292. DWORD reserved; /* reserved for driver */
  293. } WAVEHDR;
  294. typedef WAVEHDR *PWAVEHDR;
  295. typedef WAVEHDR NEAR *NPWAVEHDR;
  296. typedef WAVEHDR FAR *LPWAVEHDR;
  297. /* flags for dwFlags field of WAVEHDR */
  298. #define WHDR_DONE 0x00000001 /* done bit */
  299. #define WHDR_PREPARED 0x00000002 /* set if this header has been prepared */
  300. #define WHDR_BEGINLOOP 0x00000004 /* loop start block */
  301. #define WHDR_ENDLOOP 0x00000008 /* loop end block */
  302. #define WHDR_INQUEUE 0x00000010 /* reserved for driver */
  303. #define WHDR_VALID 0x0000001F /* valid flags */ /* ;Internal */
  304. /* waveform output device capabilities structure */
  305. typedef struct waveoutcaps_tag {
  306. UINT wMid; /* manufacturer ID */
  307. UINT wPid; /* product ID */
  308. VERSION vDriverVersion; /* version of the driver */
  309. char szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
  310. DWORD dwFormats; /* formats supported */
  311. UINT wChannels; /* number of sources supported */
  312. DWORD dwSupport; /* functionality supported by driver */
  313. } WAVEOUTCAPS;
  314. typedef WAVEOUTCAPS *PWAVEOUTCAPS;
  315. typedef WAVEOUTCAPS NEAR *NPWAVEOUTCAPS;
  316. typedef WAVEOUTCAPS FAR *LPWAVEOUTCAPS;
  317. /* flags for dwSupport field of WAVEOUTCAPS */
  318. #define WAVECAPS_PITCH 0x0001 /* supports pitch control */
  319. #define WAVECAPS_PLAYBACKRATE 0x0002 /* supports playback rate control */
  320. #define WAVECAPS_VOLUME 0x0004 /* supports volume control */
  321. #define WAVECAPS_LRVOLUME 0x0008 /* separate left-right volume control */
  322. #define WAVECAPS_SYNC 0x0010
  323. /* waveform input device capabilities structure */
  324. typedef struct waveincaps_tag {
  325. UINT wMid; /* manufacturer ID */
  326. UINT wPid; /* product ID */
  327. VERSION vDriverVersion; /* version of the driver */
  328. char szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
  329. DWORD dwFormats; /* formats supported */
  330. UINT wChannels; /* number of channels supported */
  331. } WAVEINCAPS;
  332. typedef WAVEINCAPS *PWAVEINCAPS;
  333. typedef WAVEINCAPS NEAR *NPWAVEINCAPS;
  334. typedef WAVEINCAPS FAR *LPWAVEINCAPS;
  335. /* defines for dwFormat field of WAVEINCAPS and WAVEOUTCAPS */
  336. #define WAVE_INVALIDFORMAT 0x00000000 /* invalid format */
  337. #define WAVE_FORMAT_1M08 0x00000001 /* 11.025 kHz, Mono, 8-bit */
  338. #define WAVE_FORMAT_1S08 0x00000002 /* 11.025 kHz, Stereo, 8-bit */
  339. #define WAVE_FORMAT_1M16 0x00000004 /* 11.025 kHz, Mono, 16-bit */
  340. #define WAVE_FORMAT_1S16 0x00000008 /* 11.025 kHz, Stereo, 16-bit */
  341. #define WAVE_FORMAT_2M08 0x00000010 /* 22.05 kHz, Mono, 8-bit */
  342. #define WAVE_FORMAT_2S08 0x00000020 /* 22.05 kHz, Stereo, 8-bit */
  343. #define WAVE_FORMAT_2M16 0x00000040 /* 22.05 kHz, Mono, 16-bit */
  344. #define WAVE_FORMAT_2S16 0x00000080 /* 22.05 kHz, Stereo, 16-bit */
  345. #define WAVE_FORMAT_4M08 0x00000100 /* 44.1 kHz, Mono, 8-bit */
  346. #define WAVE_FORMAT_4S08 0x00000200 /* 44.1 kHz, Stereo, 8-bit */
  347. #define WAVE_FORMAT_4M16 0x00000400 /* 44.1 kHz, Mono, 16-bit */
  348. #define WAVE_FORMAT_4S16 0x00000800 /* 44.1 kHz, Stereo, 16-bit */
  349. /* general waveform format structure (information common to all formats) */
  350. typedef struct waveformat_tag {
  351. WORD wFormatTag; /* format type */
  352. WORD nChannels; /* number of channels (i.e. mono, stereo, etc.) */
  353. DWORD nSamplesPerSec; /* sample rate */
  354. DWORD nAvgBytesPerSec; /* for buffer estimation */
  355. WORD nBlockAlign; /* block size of data */
  356. } WAVEFORMAT;
  357. typedef WAVEFORMAT *PWAVEFORMAT;
  358. typedef WAVEFORMAT NEAR *NPWAVEFORMAT;
  359. typedef WAVEFORMAT FAR *LPWAVEFORMAT;
  360. /* flags for wFormatTag field of WAVEFORMAT */
  361. #define WAVE_FORMAT_PCM 1
  362. /* specific waveform format structure for PCM data */
  363. typedef struct pcmwaveformat_tag {
  364. WAVEFORMAT wf;
  365. WORD wBitsPerSample;
  366. } PCMWAVEFORMAT;
  367. typedef PCMWAVEFORMAT *PPCMWAVEFORMAT;
  368. typedef PCMWAVEFORMAT NEAR *NPPCMWAVEFORMAT;
  369. typedef PCMWAVEFORMAT FAR *LPPCMWAVEFORMAT;
  370. /* waveform audio function prototypes */
  371. UINT WINAPI waveOutGetNumDevs(void);
  372. UINT WINAPI waveOutGetDevCaps(UINT uDeviceID, WAVEOUTCAPS FAR* lpCaps,
  373. UINT uSize);
  374. UINT WINAPI waveOutGetVolume(UINT uDeviceID, DWORD FAR* lpdwVolume);
  375. UINT WINAPI waveOutSetVolume(UINT uDeviceID, DWORD dwVolume);
  376. UINT WINAPI waveOutGetErrorText(UINT uError, LPSTR lpText, UINT uSize);
  377. UINT WINAPI waveOutOpen(HWAVEOUT FAR* lphWaveOut, UINT uDeviceID,
  378. const WAVEFORMAT FAR* lpFormat, DWORD dwCallback, DWORD dwInstance, DWORD dwFlags);
  379. UINT WINAPI waveOutClose(HWAVEOUT hWaveOut);
  380. UINT WINAPI waveOutPrepareHeader(HWAVEOUT hWaveOut,
  381. WAVEHDR FAR* lpWaveOutHdr, UINT uSize);
  382. UINT WINAPI waveOutUnprepareHeader(HWAVEOUT hWaveOut,
  383. WAVEHDR FAR* lpWaveOutHdr, UINT uSize);
  384. UINT WINAPI waveOutWrite(HWAVEOUT hWaveOut, WAVEHDR FAR* lpWaveOutHdr,
  385. UINT uSize);
  386. UINT WINAPI waveOutPause(HWAVEOUT hWaveOut);
  387. UINT WINAPI waveOutRestart(HWAVEOUT hWaveOut);
  388. UINT WINAPI waveOutReset(HWAVEOUT hWaveOut);
  389. UINT WINAPI waveOutBreakLoop(HWAVEOUT hWaveOut);
  390. UINT WINAPI waveOutGetPosition(HWAVEOUT hWaveOut, MMTIME FAR* lpInfo,
  391. UINT uSize);
  392. UINT WINAPI waveOutGetPitch(HWAVEOUT hWaveOut, DWORD FAR* lpdwPitch);
  393. UINT WINAPI waveOutSetPitch(HWAVEOUT hWaveOut, DWORD dwPitch);
  394. UINT WINAPI waveOutGetPlaybackRate(HWAVEOUT hWaveOut, DWORD FAR* lpdwRate);
  395. UINT WINAPI waveOutSetPlaybackRate(HWAVEOUT hWaveOut, DWORD dwRate);
  396. UINT WINAPI waveOutGetID(HWAVEOUT hWaveOut, UINT FAR* lpuDeviceID);
  397. #if (WINVER >= 0x030a)
  398. DWORD WINAPI waveOutMessage(HWAVEOUT hWaveOut, UINT uMessage, DWORD dw1, DWORD dw2);
  399. #endif /* ifdef WINVER >= 0x030a */
  400. UINT WINAPI waveInGetNumDevs(void);
  401. UINT WINAPI waveInGetDevCaps(UINT uDeviceID, WAVEINCAPS FAR* lpCaps,
  402. UINT uSize);
  403. UINT WINAPI waveInGetErrorText(UINT uError, LPSTR lpText, UINT uSize);
  404. UINT WINAPI waveInOpen(HWAVEIN FAR* lphWaveIn, UINT uDeviceID,
  405. const WAVEFORMAT FAR* lpFormat, DWORD dwCallback, DWORD dwInstance, DWORD dwFlags);
  406. UINT WINAPI waveInClose(HWAVEIN hWaveIn);
  407. UINT WINAPI waveInPrepareHeader(HWAVEIN hWaveIn,
  408. WAVEHDR FAR* lpWaveInHdr, UINT uSize);
  409. UINT WINAPI waveInUnprepareHeader(HWAVEIN hWaveIn,
  410. WAVEHDR FAR* lpWaveInHdr, UINT uSize);
  411. UINT WINAPI waveInAddBuffer(HWAVEIN hWaveIn,
  412. WAVEHDR FAR* lpWaveInHdr, UINT uSize);
  413. UINT WINAPI waveInStart(HWAVEIN hWaveIn);
  414. UINT WINAPI waveInStop(HWAVEIN hWaveIn);
  415. UINT WINAPI waveInReset(HWAVEIN hWaveIn);
  416. UINT WINAPI waveInGetPosition(HWAVEIN hWaveIn, MMTIME FAR* lpInfo,
  417. UINT uSize);
  418. UINT WINAPI waveInGetID(HWAVEIN hWaveIn, UINT FAR* lpuDeviceID);
  419. #if (WINVER >= 0x030a)
  420. DWORD WINAPI waveInMessage(HWAVEIN hWaveIn, UINT uMessage, DWORD dw1, DWORD dw2);
  421. #endif /* ifdef WINVER >= 0x030a */
  422. #endif /* ifndef MMNOWAVE */
  423. #ifndef MMNOMIDI
  424. /****************************************************************************
  425. MIDI audio support
  426. ****************************************************************************/
  427. /* MIDI error return values */
  428. #define MIDIERR_UNPREPARED (MIDIERR_BASE + 0) /* header not prepared */
  429. #define MIDIERR_STILLPLAYING (MIDIERR_BASE + 1) /* still something playing */
  430. #define MIDIERR_NOMAP (MIDIERR_BASE + 2) /* no current map */
  431. #define MIDIERR_NOTREADY (MIDIERR_BASE + 3) /* hardware is still busy */
  432. #define MIDIERR_NODEVICE (MIDIERR_BASE + 4) /* port no longer connected */
  433. #define MIDIERR_INVALIDSETUP (MIDIERR_BASE + 5) /* invalid setup */
  434. #define MIDIERR_LASTERROR (MIDIERR_BASE + 5) /* last error in range */
  435. /* MIDI audio data types */
  436. DECLARE_HANDLE(HMIDI);
  437. DECLARE_HANDLE(HMIDIIN);
  438. DECLARE_HANDLE(HMIDIOUT);
  439. typedef HMIDIIN FAR *LPHMIDIIN;
  440. typedef HMIDIOUT FAR *LPHMIDIOUT;
  441. typedef DRVCALLBACK MIDICALLBACK;
  442. typedef MIDICALLBACK FAR *LPMIDICALLBACK;
  443. #define MIDIPATCHSIZE 128
  444. typedef WORD PATCHARRAY[MIDIPATCHSIZE];
  445. typedef WORD FAR *LPPATCHARRAY;
  446. typedef WORD KEYARRAY[MIDIPATCHSIZE];
  447. typedef WORD FAR *LPKEYARRAY;
  448. /* MIDI callback messages */
  449. #define MIM_OPEN MM_MIM_OPEN
  450. #define MIM_CLOSE MM_MIM_CLOSE
  451. #define MIM_DATA MM_MIM_DATA
  452. #define MIM_LONGDATA MM_MIM_LONGDATA
  453. #define MIM_ERROR MM_MIM_ERROR
  454. #define MIM_LONGERROR MM_MIM_LONGERROR
  455. #define MOM_OPEN MM_MOM_OPEN
  456. #define MOM_CLOSE MM_MOM_CLOSE
  457. #define MOM_DONE MM_MOM_DONE
  458. /* device ID for MIDI mapper */
  459. #define MIDIMAPPER (-1)
  460. #define MIDI_MAPPER (-1)
  461. /* flags for wFlags parm of midiOutCachePatches(), midiOutCacheDrumPatches() */
  462. #define MIDI_CACHE_ALL 1
  463. #define MIDI_CACHE_BESTFIT 2
  464. #define MIDI_CACHE_QUERY 3
  465. #define MIDI_UNCACHE 4
  466. #define MIDI_CACHE_VALID (MIDI_CACHE_ALL | MIDI_CACHE_BESTFIT | MIDI_CACHE_QUERY | MIDI_UNCACHE) /* ;Internal */
  467. /* MIDI output device capabilities structure */
  468. typedef struct midioutcaps_tag {
  469. UINT wMid; /* manufacturer ID */
  470. UINT wPid; /* product ID */
  471. VERSION vDriverVersion; /* version of the driver */
  472. char szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
  473. UINT wTechnology; /* type of device */
  474. UINT wVoices; /* # of voices (internal synth only) */
  475. UINT wNotes; /* max # of notes (internal synth only) */
  476. UINT wChannelMask; /* channels used (internal synth only) */
  477. DWORD dwSupport; /* functionality supported by driver */
  478. } MIDIOUTCAPS;
  479. typedef MIDIOUTCAPS *PMIDIOUTCAPS;
  480. typedef MIDIOUTCAPS NEAR *NPMIDIOUTCAPS;
  481. typedef MIDIOUTCAPS FAR *LPMIDIOUTCAPS;
  482. /* flags for wTechnology field of MIDIOUTCAPS structure */
  483. #define MOD_MIDIPORT 1 /* output port */
  484. #define MOD_SYNTH 2 /* generic internal synth */
  485. #define MOD_SQSYNTH 3 /* square wave internal synth */
  486. #define MOD_FMSYNTH 4 /* FM internal synth */
  487. #define MOD_MAPPER 5 /* MIDI mapper */
  488. /* flags for dwSupport field of MIDIOUTCAPS structure */
  489. #define MIDICAPS_VOLUME 0x0001 /* supports volume control */
  490. #define MIDICAPS_LRVOLUME 0x0002 /* separate left-right volume control */
  491. #define MIDICAPS_CACHE 0x0004
  492. /* MIDI output device capabilities structure */
  493. typedef struct midiincaps_tag {
  494. UINT wMid; /* manufacturer ID */
  495. UINT wPid; /* product ID */
  496. VERSION vDriverVersion; /* version of the driver */
  497. char szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
  498. } MIDIINCAPS;
  499. typedef MIDIINCAPS *PMIDIINCAPS;
  500. typedef MIDIINCAPS NEAR *NPMIDIINCAPS;
  501. typedef MIDIINCAPS FAR *LPMIDIINCAPS;
  502. /* MIDI data block header */
  503. typedef struct midihdr_tag {
  504. LPSTR lpData; /* pointer to locked data block */
  505. DWORD dwBufferLength; /* length of data in data block */
  506. DWORD dwBytesRecorded; /* used for input only */
  507. DWORD dwUser; /* for client's use */
  508. DWORD dwFlags; /* assorted flags (see defines) */
  509. struct midihdr_tag far *lpNext; /* reserved for driver */
  510. DWORD reserved; /* reserved for driver */
  511. } MIDIHDR;
  512. typedef MIDIHDR *PMIDIHDR;
  513. typedef MIDIHDR NEAR *NPMIDIHDR;
  514. typedef MIDIHDR FAR *LPMIDIHDR;
  515. /* flags for dwFlags field of MIDIHDR structure */
  516. #define MHDR_DONE 0x00000001 /* done bit */
  517. #define MHDR_PREPARED 0x00000002 /* set if header prepared */
  518. #define MHDR_INQUEUE 0x00000004 /* reserved for driver */
  519. #define MHDR_VALID 0x00000007 /* valid flags */ /* ;Internal */
  520. /* MIDI function prototypes */
  521. UINT WINAPI midiOutGetNumDevs(void);
  522. UINT WINAPI midiOutGetDevCaps(UINT uDeviceID,
  523. MIDIOUTCAPS FAR* lpCaps, UINT uSize);
  524. UINT WINAPI midiOutGetVolume(UINT uDeviceID, DWORD FAR* lpdwVolume);
  525. UINT WINAPI midiOutSetVolume(UINT uDeviceID, DWORD dwVolume);
  526. UINT WINAPI midiOutGetErrorText(UINT uError, LPSTR lpText, UINT uSize);
  527. UINT WINAPI midiOutOpen(HMIDIOUT FAR* lphMidiOut, UINT uDeviceID,
  528. DWORD dwCallback, DWORD dwInstance, DWORD dwFlags);
  529. UINT WINAPI midiOutClose(HMIDIOUT hMidiOut);
  530. UINT WINAPI midiOutPrepareHeader(HMIDIOUT hMidiOut,
  531. MIDIHDR FAR* lpMidiOutHdr, UINT uSize);
  532. UINT WINAPI midiOutUnprepareHeader(HMIDIOUT hMidiOut,
  533. MIDIHDR FAR* lpMidiOutHdr, UINT uSize);
  534. UINT WINAPI midiOutShortMsg(HMIDIOUT hMidiOut, DWORD dwMsg);
  535. UINT WINAPI midiOutLongMsg(HMIDIOUT hMidiOut,
  536. MIDIHDR FAR* lpMidiOutHdr, UINT uSize);
  537. UINT WINAPI midiOutReset(HMIDIOUT hMidiOut);
  538. UINT WINAPI midiOutCachePatches(HMIDIOUT hMidiOut,
  539. UINT uBank, WORD FAR* lpwPatchArray, UINT uFlags);
  540. UINT WINAPI midiOutCacheDrumPatches(HMIDIOUT hMidiOut,
  541. UINT uPatch, WORD FAR* lpwKeyArray, UINT uFlags);
  542. UINT WINAPI midiOutGetID(HMIDIOUT hMidiOut, UINT FAR* lpuDeviceID);
  543. #if (WINVER >= 0x030a)
  544. DWORD WINAPI midiOutMessage(HMIDIOUT hMidiOut, UINT uMessage, DWORD dw1, DWORD dw2);
  545. #endif /* ifdef WINVER >= 0x030a */
  546. UINT WINAPI midiInGetNumDevs(void);
  547. UINT WINAPI midiInGetDevCaps(UINT uDeviceID,
  548. LPMIDIINCAPS lpCaps, UINT uSize);
  549. UINT WINAPI midiInGetErrorText(UINT uError, LPSTR lpText, UINT uSize);
  550. UINT WINAPI midiInOpen(HMIDIIN FAR* lphMidiIn, UINT uDeviceID,
  551. DWORD dwCallback, DWORD dwInstance, DWORD dwFlags);
  552. UINT WINAPI midiInClose(HMIDIIN hMidiIn);
  553. UINT WINAPI midiInPrepareHeader(HMIDIIN hMidiIn,
  554. MIDIHDR FAR* lpMidiInHdr, UINT uSize);
  555. UINT WINAPI midiInUnprepareHeader(HMIDIIN hMidiIn,
  556. MIDIHDR FAR* lpMidiInHdr, UINT uSize);
  557. UINT WINAPI midiInAddBuffer(HMIDIIN hMidiIn,
  558. MIDIHDR FAR* lpMidiInHdr, UINT uSize);
  559. UINT WINAPI midiInStart(HMIDIIN hMidiIn);
  560. UINT WINAPI midiInStop(HMIDIIN hMidiIn);
  561. UINT WINAPI midiInReset(HMIDIIN hMidiIn);
  562. UINT WINAPI midiInGetID(HMIDIIN hMidiIn, UINT FAR* lpuDeviceID);
  563. #if (WINVER >= 0x030a)
  564. DWORD WINAPI midiInMessage(HMIDIIN hMidiIn, UINT uMessage, DWORD dw1, DWORD dw2);
  565. #endif /* ifdef WINVER >= 0x030a */
  566. #endif /* ifndef MMNOMIDI */
  567. #ifndef MMNOAUX
  568. /****************************************************************************
  569. Auxiliary audio support
  570. ****************************************************************************/
  571. /* device ID for aux device mapper */
  572. #define AUX_MAPPER (-1)
  573. /* Auxiliary audio device capabilities structure */
  574. typedef struct auxcaps_tag {
  575. UINT wMid; /* manufacturer ID */
  576. UINT wPid; /* product ID */
  577. VERSION vDriverVersion; /* version of the driver */
  578. char szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
  579. UINT wTechnology; /* type of device */
  580. DWORD dwSupport; /* functionality supported by driver */
  581. } AUXCAPS;
  582. typedef AUXCAPS *PAUXCAPS;
  583. typedef AUXCAPS NEAR *NPAUXCAPS;
  584. typedef AUXCAPS FAR *LPAUXCAPS;
  585. /* flags for wTechnology field in AUXCAPS structure */
  586. #define AUXCAPS_CDAUDIO 1 /* audio from internal CD-ROM drive */
  587. #define AUXCAPS_AUXIN 2 /* audio from auxiliary input jacks */
  588. /* flags for dwSupport field in AUXCAPS structure */
  589. #define AUXCAPS_VOLUME 0x0001 /* supports volume control */
  590. #define AUXCAPS_LRVOLUME 0x0002 /* separate left-right volume control */
  591. /* auxiliary audio function prototypes */
  592. UINT WINAPI auxGetNumDevs(void);
  593. UINT WINAPI auxGetDevCaps(UINT uDeviceID, AUXCAPS FAR* lpCaps, UINT uSize);
  594. UINT WINAPI auxSetVolume(UINT uDeviceID, DWORD dwVolume);
  595. UINT WINAPI auxGetVolume(UINT uDeviceID, DWORD FAR* lpdwVolume);
  596. #if (WINVER >= 0x030a)
  597. DWORD WINAPI auxOutMessage(UINT uDeviceID, UINT uMessage, DWORD dw1, DWORD dw2);
  598. #endif /* ifdef WINVER >= 0x030a */
  599. #endif /* ifndef MMNOAUX */
  600. #ifndef MMNOTIMER
  601. /****************************************************************************
  602. Timer support
  603. ****************************************************************************/
  604. /* timer error return values */
  605. #define TIMERR_NOERROR (0) /* no error */
  606. #define TIMERR_NOCANDO (TIMERR_BASE+1) /* request not completed */
  607. #define TIMERR_STRUCT (TIMERR_BASE+33) /* time struct size */
  608. /* timer data types */
  609. #ifdef BUILDDLL /* ;Internal */
  610. typedef void (FAR PASCAL TIMECALLBACK) (UINT uTimerID, UINT uMessage, DWORD dwUser, DWORD dw1, DWORD dw2); /* ;Internal */
  611. #else /* ifdef BUILDDLL */ /* ;Internal */
  612. typedef void (CALLBACK TIMECALLBACK) (UINT uTimerID, UINT uMessage, DWORD dwUser, DWORD dw1, DWORD dw2);
  613. #endif /* ifdef BUILDDLL */ /* ;Internal */
  614. typedef TIMECALLBACK FAR *LPTIMECALLBACK;
  615. /* flags for wFlags parameter of timeSetEvent() function */
  616. #define TIME_ONESHOT 0 /* program timer for single event */
  617. #define TIME_PERIODIC 1 /* program for continuous periodic event */
  618. /* timer device capabilities data structure */
  619. typedef struct timecaps_tag {
  620. UINT wPeriodMin; /* minimum period supported */
  621. UINT wPeriodMax; /* maximum period supported */
  622. } TIMECAPS;
  623. typedef TIMECAPS *PTIMECAPS;
  624. typedef TIMECAPS NEAR *NPTIMECAPS;
  625. typedef TIMECAPS FAR *LPTIMECAPS;
  626. /* timer function prototypes */
  627. UINT WINAPI timeGetSystemTime(MMTIME FAR* lpTime, UINT uSize);
  628. DWORD WINAPI timeGetTime(void);
  629. UINT WINAPI timeSetEvent(UINT uDelay, UINT uResolution,
  630. LPTIMECALLBACK lpFunction, DWORD dwUser, UINT uFlags);
  631. UINT WINAPI timeKillEvent(UINT uTimerID);
  632. UINT WINAPI timeGetDevCaps(TIMECAPS FAR* lpTimeCaps, UINT uSize);
  633. UINT WINAPI timeBeginPeriod(UINT uPeriod);
  634. UINT WINAPI timeEndPeriod(UINT uPeriod);
  635. #endif /* ifndef MMNOTIMER */
  636. #ifndef MMNOJOY
  637. /****************************************************************************
  638. Joystick support
  639. ****************************************************************************/
  640. /* joystick error return values */
  641. #define JOYERR_NOERROR (0) /* no error */
  642. #define JOYERR_PARMS (JOYERR_BASE+5) /* bad parameters */
  643. #define JOYERR_NOCANDO (JOYERR_BASE+6) /* request not completed */
  644. #define JOYERR_UNPLUGGED (JOYERR_BASE+7) /* joystick is unplugged */
  645. /* constants used with JOYINFO structure and MM_JOY* messages */
  646. #define JOY_BUTTON1 0x0001
  647. #define JOY_BUTTON2 0x0002
  648. #define JOY_BUTTON3 0x0004
  649. #define JOY_BUTTON4 0x0008
  650. #define JOY_BUTTON1CHG 0x0100
  651. #define JOY_BUTTON2CHG 0x0200
  652. #define JOY_BUTTON3CHG 0x0400
  653. #define JOY_BUTTON4CHG 0x0800
  654. /* joystick ID constants */
  655. #define JOYSTICKID1 0
  656. #define JOYSTICKID2 1
  657. /* joystick device capabilities data structure */
  658. typedef struct joycaps_tag {
  659. UINT wMid; /* manufacturer ID */
  660. UINT wPid; /* product ID */
  661. char szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
  662. UINT wXmin; /* minimum x position value */
  663. UINT wXmax; /* maximum x position value */
  664. UINT wYmin; /* minimum y position value */
  665. UINT wYmax; /* maximum y position value */
  666. UINT wZmin; /* minimum z position value */
  667. UINT wZmax; /* maximum z position value */
  668. UINT wNumButtons; /* number of buttons */
  669. UINT wPeriodMin; /* minimum message period when captured */
  670. UINT wPeriodMax; /* maximum message period when captured */
  671. } JOYCAPS;
  672. typedef JOYCAPS *PJOYCAPS;
  673. typedef JOYCAPS NEAR *NPJOYCAPS;
  674. typedef JOYCAPS FAR *LPJOYCAPS;
  675. /* joystick information data structure */
  676. typedef struct joyinfo_tag {
  677. UINT wXpos; /* x position */
  678. UINT wYpos; /* y position */
  679. UINT wZpos; /* z position */
  680. UINT wButtons; /* button states */
  681. } JOYINFO;
  682. typedef JOYINFO *PJOYINFO;
  683. typedef JOYINFO NEAR *NPJOYINFO;
  684. typedef JOYINFO FAR *LPJOYINFO;
  685. /* joystick function prototypes */
  686. UINT WINAPI joyGetDevCaps(UINT uJoyID, JOYCAPS FAR* lpCaps, UINT uSize);
  687. UINT WINAPI joyGetNumDevs(void);
  688. UINT WINAPI joyGetPos(UINT uJoyID, JOYINFO FAR* lpInfo);
  689. UINT WINAPI joyGetThreshold(UINT uJoyID, UINT FAR* lpuThreshold);
  690. UINT WINAPI joyReleaseCapture(UINT uJoyID);
  691. UINT WINAPI joySetCapture(HWND hwnd, UINT uJoyID, UINT uPeriod,
  692. BOOL bChanged);
  693. UINT WINAPI joySetThreshold(UINT uJoyID, UINT uThreshold);
  694. UINT WINAPI joySetCalibration(UINT uJoyID, UINT FAR* puXbase, /* ;Internal */
  695. UINT FAR* puXdelta, UINT FAR* puYbase, UINT FAR* puYdelta,/* ;Internal */
  696. UINT FAR* puZbase, UINT FAR* puZdelta); /* ;Internal */
  697. #endif /* ifndef MMNOJOY */
  698. #ifndef MMNOMMIO
  699. /****************************************************************************
  700. Multimedia File I/O support
  701. ****************************************************************************/
  702. /* MMIO error return values */
  703. #define MMIOERR_BASE 256
  704. #define MMIOERR_FILENOTFOUND (MMIOERR_BASE + 1) /* file not found */
  705. #define MMIOERR_OUTOFMEMORY (MMIOERR_BASE + 2) /* out of memory */
  706. #define MMIOERR_CANNOTOPEN (MMIOERR_BASE + 3) /* cannot open */
  707. #define MMIOERR_CANNOTCLOSE (MMIOERR_BASE + 4) /* cannot close */
  708. #define MMIOERR_CANNOTREAD (MMIOERR_BASE + 5) /* cannot read */
  709. #define MMIOERR_CANNOTWRITE (MMIOERR_BASE + 6) /* cannot write */
  710. #define MMIOERR_CANNOTSEEK (MMIOERR_BASE + 7) /* cannot seek */
  711. #define MMIOERR_CANNOTEXPAND (MMIOERR_BASE + 8) /* cannot expand file */
  712. #define MMIOERR_CHUNKNOTFOUND (MMIOERR_BASE + 9) /* chunk not found */
  713. #define MMIOERR_UNBUFFERED (MMIOERR_BASE + 10) /* file is unbuffered */
  714. /* MMIO constants */
  715. #define CFSEPCHAR '+' /* compound file name separator char. */
  716. /* MMIO data types */
  717. typedef DWORD FOURCC; /* a four character code */
  718. typedef char _huge * HPSTR; /* a huge version of LPSTR */
  719. DECLARE_HANDLE(HMMIO); /* a handle to an open file */
  720. typedef LRESULT (CALLBACK MMIOPROC)(LPSTR lpmmioinfo, UINT uMessage,
  721. LPARAM lParam1, LPARAM lParam2);
  722. typedef MMIOPROC FAR *LPMMIOPROC;
  723. /* general MMIO information data structure */
  724. typedef struct _MMIOINFO
  725. {
  726. /* general fields */
  727. DWORD dwFlags; /* general status flags */
  728. FOURCC fccIOProc; /* pointer to I/O procedure */
  729. LPMMIOPROC pIOProc; /* pointer to I/O procedure */
  730. UINT wErrorRet; /* place for error to be returned */
  731. HTASK htask; /* alternate local task */
  732. /* fields maintained by MMIO functions during buffered I/O */
  733. LONG cchBuffer; /* size of I/O buffer (or 0L) */
  734. HPSTR pchBuffer; /* start of I/O buffer (or NULL) */
  735. HPSTR pchNext; /* pointer to next byte to read/write */
  736. HPSTR pchEndRead; /* pointer to last valid byte to read */
  737. HPSTR pchEndWrite; /* pointer to last byte to write */
  738. LONG lBufOffset; /* disk offset of start of buffer */
  739. /* fields maintained by I/O procedure */
  740. LONG lDiskOffset; /* disk offset of next read or write */
  741. DWORD adwInfo[3]; /* data specific to type of MMIOPROC */
  742. /* other fields maintained by MMIO */
  743. DWORD dwReserved1; /* reserved for MMIO use */
  744. DWORD dwReserved2; /* reserved for MMIO use */
  745. HMMIO hmmio; /* handle to open file */
  746. } MMIOINFO;
  747. typedef MMIOINFO *PMMIOINFO;
  748. typedef MMIOINFO NEAR *NPMMIOINFO;
  749. typedef MMIOINFO FAR *LPMMIOINFO;
  750. /* RIFF chunk information data structure */
  751. typedef struct _MMCKINFO
  752. {
  753. FOURCC ckid; /* chunk ID */
  754. DWORD cksize; /* chunk size */
  755. FOURCC fccType; /* form type or list type */
  756. DWORD dwDataOffset; /* offset of data portion of chunk */
  757. DWORD dwFlags; /* flags used by MMIO functions */
  758. } MMCKINFO;
  759. typedef MMCKINFO *PMMCKINFO;
  760. typedef MMCKINFO NEAR *NPMMCKINFO;
  761. typedef MMCKINFO FAR *LPMMCKINFO;
  762. /* bit field masks */
  763. #define MMIO_RWMODE 0x00000003 /* open file for reading/writing/both */
  764. #define MMIO_SHAREMODE 0x00000070 /* file sharing mode number */
  765. /* constants for dwFlags field of MMIOINFO */
  766. #define MMIO_CREATE 0x00001000 /* create new file (or truncate file) */
  767. #define MMIO_PARSE 0x00000100 /* parse new file returning path */
  768. #define MMIO_DELETE 0x00000200 /* create new file (or truncate file) */
  769. #define MMIO_EXIST 0x00004000 /* checks for existence of file */
  770. #define MMIO_ALLOCBUF 0x00010000 /* mmioOpen() should allocate a buffer */
  771. #define MMIO_GETTEMP 0x00020000 /* mmioOpen() should retrieve temp name */
  772. #define MMIO_DIRTY 0x10000000 /* I/O buffer is dirty */
  773. #define MMIO_OPEN_VALID 0x0003FFFF /* valid flags for mmioOpen */ /* ;Internal */
  774. #define MMIO_FLUSH_VALID MMIO_EMPTYBUF /* valid flags for mmioFlush */ /* ;Internal */
  775. #define MMIO_ADVANCE_VALID (MMIO_WRITE | MMIO_READ) /* valid flags for mmioAdvance */ /* ;Internal */
  776. #define MMIO_FOURCC_VALID MMIO_TOUPPER /* valid flags for mmioStringToFOURCC */ /* ;Internal */
  777. #define MMIO_DESCEND_VALID (MMIO_FINDCHUNK | MMIO_FINDRIFF | MMIO_FINDLIST) /* ;Internal */
  778. #define MMIO_CREATE_VALID (MMIO_CREATERIFF | MMIO_CREATELIST) /* ;Internal */
  779. /* read/write mode numbers (bit field MMIO_RWMODE) */
  780. #define MMIO_READ 0x00000000 /* open file for reading only */
  781. #define MMIO_WRITE 0x00000001 /* open file for writing only */
  782. #define MMIO_READWRITE 0x00000002 /* open file for reading and writing */
  783. /* share mode numbers (bit field MMIO_SHAREMODE) */
  784. #define MMIO_COMPAT 0x00000000 /* compatibility mode */
  785. #define MMIO_EXCLUSIVE 0x00000010 /* exclusive-access mode */
  786. #define MMIO_DENYWRITE 0x00000020 /* deny writing to other processes */
  787. #define MMIO_DENYREAD 0x00000030 /* deny reading to other processes */
  788. #define MMIO_DENYNONE 0x00000040 /* deny nothing to other processes */
  789. /* various MMIO flags */
  790. #define MMIO_FHOPEN 0x0010 /* mmioClose: keep file handle open */
  791. #define MMIO_EMPTYBUF 0x0010 /* mmioFlush: empty the I/O buffer */
  792. #define MMIO_TOUPPER 0x0010 /* mmioStringToFOURCC: to u-case */
  793. #define MMIO_INSTALLPROC 0x00010000 /* mmioInstallIOProc: install MMIOProc */
  794. #define MMIO_GLOBALPROC 0x10000000 /* mmioInstallIOProc: install globally */
  795. #define MMIO_REMOVEPROC 0x00020000 /* mmioInstallIOProc: remove MMIOProc */
  796. #define MMIO_FINDPROC 0x00040000 /* mmioInstallIOProc: find an MMIOProc */
  797. #define MMIO_FINDCHUNK 0x0010 /* mmioDescend: find a chunk by ID */
  798. #define MMIO_FINDRIFF 0x0020 /* mmioDescend: find a LIST chunk */
  799. #define MMIO_FINDLIST 0x0040 /* mmioDescend: find a RIFF chunk */
  800. #define MMIO_CREATERIFF 0x0020 /* mmioCreateChunk: make a LIST chunk */
  801. #define MMIO_CREATELIST 0x0040 /* mmioCreateChunk: make a RIFF chunk */
  802. #define MMIO_VALIDPROC 0x10070000 /* valid for mmioInstallIOProc */ /* ;Internal */
  803. /* message numbers for MMIOPROC I/O procedure functions */
  804. #define MMIOM_READ MMIO_READ /* read */
  805. #define MMIOM_WRITE MMIO_WRITE /* write */
  806. #define MMIOM_SEEK 2 /* seek to a new position in file */
  807. #define MMIOM_OPEN 3 /* open file */
  808. #define MMIOM_CLOSE 4 /* close file */
  809. #define MMIOM_WRITEFLUSH 5 /* write and flush */
  810. #if (WINVER >= 0x030a)
  811. #define MMIOM_RENAME 6 /* rename specified file */
  812. #endif /* ifdef WINVER >= 0x030a */
  813. #define MMIOM_USER 0x8000 /* beginning of user-defined messages */
  814. /* standard four character codes */
  815. #define FOURCC_RIFF mmioFOURCC('R', 'I', 'F', 'F')
  816. #define FOURCC_LIST mmioFOURCC('L', 'I', 'S', 'T')
  817. /* four character codes used to identify standard built-in I/O procedures */
  818. #define FOURCC_DOS mmioFOURCC('D', 'O', 'S', ' ')
  819. #define FOURCC_MEM mmioFOURCC('M', 'E', 'M', ' ')
  820. /* flags for mmioSeek() */
  821. #ifndef SEEK_SET
  822. #define SEEK_SET 0 /* seek to an absolute position */
  823. #define SEEK_CUR 1 /* seek relative to current position */
  824. #define SEEK_END 2 /* seek relative to end of file */
  825. #endif /* ifndef SEEK_SET */
  826. /* other constants */
  827. #define MMIO_DEFAULTBUFFER 8192 /* default buffer size */
  828. /* MMIO macros */
  829. #define mmioFOURCC( ch0, ch1, ch2, ch3 ) \
  830. ( (DWORD)(BYTE)(ch0) | ( (DWORD)(BYTE)(ch1) << 8 ) | \
  831. ( (DWORD)(BYTE)(ch2) << 16 ) | ( (DWORD)(BYTE)(ch3) << 24 ) )
  832. /* MMIO function prototypes */
  833. FOURCC WINAPI mmioStringToFOURCC(LPCSTR sz, UINT uFlags);
  834. LPMMIOPROC WINAPI mmioInstallIOProc(FOURCC fccIOProc, LPMMIOPROC pIOProc,
  835. DWORD dwFlags);
  836. HMMIO WINAPI mmioOpen(LPSTR szFileName, MMIOINFO FAR* lpmmioinfo,
  837. DWORD dwOpenFlags);
  838. #if (WINVER >= 0x030a)
  839. UINT WINAPI mmioRename(LPCSTR szFileName, LPCSTR szNewFileName,
  840. MMIOINFO FAR* lpmmioinfo, DWORD dwRenameFlags);
  841. #endif /* ifdef WINVER >= 0x030a */
  842. UINT WINAPI mmioClose(HMMIO hmmio, UINT uFlags);
  843. LONG WINAPI mmioRead(HMMIO hmmio, HPSTR pch, LONG cch);
  844. LONG WINAPI mmioWrite(HMMIO hmmio, const char _huge* pch, LONG cch);
  845. LONG WINAPI mmioSeek(HMMIO hmmio, LONG lOffset, int iOrigin);
  846. UINT WINAPI mmioGetInfo(HMMIO hmmio, MMIOINFO FAR* lpmmioinfo, UINT uFlags);
  847. UINT WINAPI mmioSetInfo(HMMIO hmmio, const MMIOINFO FAR* lpmmioinfo, UINT uFlags);
  848. UINT WINAPI mmioSetBuffer(HMMIO hmmio, LPSTR pchBuffer, LONG cchBuffer,
  849. UINT uFlags);
  850. UINT WINAPI mmioFlush(HMMIO hmmio, UINT uFlags);
  851. UINT WINAPI mmioAdvance(HMMIO hmmio, MMIOINFO FAR* lpmmioinfo, UINT uFlags);
  852. LRESULT WINAPI mmioSendMessage(HMMIO hmmio, UINT uMessage,
  853. LPARAM lParam1, LPARAM lParam2);
  854. UINT WINAPI mmioDescend(HMMIO hmmio, MMCKINFO FAR* lpck,
  855. const MMCKINFO FAR* lpckParent, UINT uFlags);
  856. UINT WINAPI mmioAscend(HMMIO hmmio, MMCKINFO FAR* lpck, UINT uFlags);
  857. UINT WINAPI mmioCreateChunk(HMMIO hmmio, MMCKINFO FAR* lpck, UINT uFlags);
  858. #endif /* ifndef MMNOMMIO */
  859. #ifndef MMNOMCI
  860. /****************************************************************************
  861. MCI support
  862. ****************************************************************************/
  863. typedef UINT (CALLBACK *YIELDPROC) (UINT uDeviceID, DWORD dwYieldData);
  864. /* MCI function prototypes */
  865. DWORD WINAPI mciSendCommand (UINT uDeviceID, UINT uMessage,
  866. DWORD dwParam1, DWORD dwParam2);
  867. DWORD WINAPI mciSendString (LPCSTR lpstrCommand,
  868. LPSTR lpstrReturnString, UINT uReturnLength, HWND hwndCallback);
  869. UINT WINAPI mciGetDeviceID (LPCSTR lpstrName);
  870. UINT WINAPI mciGetDeviceIDFromElementID (DWORD dwElementID,
  871. LPCSTR lpstrType);
  872. BOOL WINAPI mciGetErrorString (DWORD wError, LPSTR lpstrBuffer,
  873. UINT uLength);
  874. BOOL WINAPI mciSetYieldProc (UINT uDeviceID, YIELDPROC fpYieldProc,
  875. DWORD dwYieldData);
  876. #if (WINVER >= 0x030a)
  877. HTASK WINAPI mciGetCreatorTask(UINT uDeviceID);
  878. YIELDPROC WINAPI mciGetYieldProc (UINT uDeviceID, DWORD FAR* lpdwYieldData);
  879. #endif /* ifdef WINVER >= 0x030a */
  880. #if (WINVER < 0x030a)
  881. BOOL WINAPI mciExecute (LPCSTR lpstrCommand);
  882. #endif /* ifdef WINVER < 0x030a */
  883. /* MCI error return values */
  884. #define MCIERR_INVALID_DEVICE_ID (MCIERR_BASE + 1)
  885. #define MCIERR_UNRECOGNIZED_KEYWORD (MCIERR_BASE + 3)
  886. #define MCIERR_UNRECOGNIZED_COMMAND (MCIERR_BASE + 5)
  887. #define MCIERR_HARDWARE (MCIERR_BASE + 6)
  888. #define MCIERR_INVALID_DEVICE_NAME (MCIERR_BASE + 7)
  889. #define MCIERR_OUT_OF_MEMORY (MCIERR_BASE + 8)
  890. #define MCIERR_DEVICE_OPEN (MCIERR_BASE + 9)
  891. #define MCIERR_CANNOT_LOAD_DRIVER (MCIERR_BASE + 10)
  892. #define MCIERR_MISSING_COMMAND_STRING (MCIERR_BASE + 11)
  893. #define MCIERR_PARAM_OVERFLOW (MCIERR_BASE + 12)
  894. #define MCIERR_MISSING_STRING_ARGUMENT (MCIERR_BASE + 13)
  895. #define MCIERR_BAD_INTEGER (MCIERR_BASE + 14)
  896. #define MCIERR_PARSER_INTERNAL (MCIERR_BASE + 15)
  897. #define MCIERR_DRIVER_INTERNAL (MCIERR_BASE + 16)
  898. #define MCIERR_MISSING_PARAMETER (MCIERR_BASE + 17)
  899. #define MCIERR_UNSUPPORTED_FUNCTION (MCIERR_BASE + 18)
  900. #define MCIERR_FILE_NOT_FOUND (MCIERR_BASE + 19)
  901. #define MCIERR_DEVICE_NOT_READY (MCIERR_BASE + 20)
  902. #define MCIERR_INTERNAL (MCIERR_BASE + 21)
  903. #define MCIERR_DRIVER (MCIERR_BASE + 22)
  904. #define MCIERR_CANNOT_USE_ALL (MCIERR_BASE + 23)
  905. #define MCIERR_MULTIPLE (MCIERR_BASE + 24)
  906. #define MCIERR_EXTENSION_NOT_FOUND (MCIERR_BASE + 25)
  907. #define MCIERR_OUTOFRANGE (MCIERR_BASE + 26)
  908. #define MCIERR_FLAGS_NOT_COMPATIBLE (MCIERR_BASE + 28)
  909. #define MCIERR_FILE_NOT_SAVED (MCIERR_BASE + 30)
  910. #define MCIERR_DEVICE_TYPE_REQUIRED (MCIERR_BASE + 31)
  911. #define MCIERR_DEVICE_LOCKED (MCIERR_BASE + 32)
  912. #define MCIERR_DUPLICATE_ALIAS (MCIERR_BASE + 33)
  913. #define MCIERR_BAD_CONSTANT (MCIERR_BASE + 34)
  914. #define MCIERR_MUST_USE_SHAREABLE (MCIERR_BASE + 35)
  915. #define MCIERR_MISSING_DEVICE_NAME (MCIERR_BASE + 36)
  916. #define MCIERR_BAD_TIME_FORMAT (MCIERR_BASE + 37)
  917. #define MCIERR_NO_CLOSING_QUOTE (MCIERR_BASE + 38)
  918. #define MCIERR_DUPLICATE_FLAGS (MCIERR_BASE + 39)
  919. #define MCIERR_INVALID_FILE (MCIERR_BASE + 40)
  920. #define MCIERR_NULL_PARAMETER_BLOCK (MCIERR_BASE + 41)
  921. #define MCIERR_UNNAMED_RESOURCE (MCIERR_BASE + 42)
  922. #define MCIERR_NEW_REQUIRES_ALIAS (MCIERR_BASE + 43)
  923. #define MCIERR_NOTIFY_ON_AUTO_OPEN (MCIERR_BASE + 44)
  924. #define MCIERR_NO_ELEMENT_ALLOWED (MCIERR_BASE + 45)
  925. #define MCIERR_NONAPPLICABLE_FUNCTION (MCIERR_BASE + 46)
  926. #define MCIERR_ILLEGAL_FOR_AUTO_OPEN (MCIERR_BASE + 47)
  927. #define MCIERR_FILENAME_REQUIRED (MCIERR_BASE + 48)
  928. #define MCIERR_EXTRA_CHARACTERS (MCIERR_BASE + 49)
  929. #define MCIERR_DEVICE_NOT_INSTALLED (MCIERR_BASE + 50)
  930. #define MCIERR_GET_CD (MCIERR_BASE + 51)
  931. #define MCIERR_SET_CD (MCIERR_BASE + 52)
  932. #define MCIERR_SET_DRIVE (MCIERR_BASE + 53)
  933. #define MCIERR_DEVICE_LENGTH (MCIERR_BASE + 54)
  934. #define MCIERR_DEVICE_ORD_LENGTH (MCIERR_BASE + 55)
  935. #define MCIERR_NO_INTEGER (MCIERR_BASE + 56)
  936. #define MCIERR_WAVE_OUTPUTSINUSE (MCIERR_BASE + 64)
  937. #define MCIERR_WAVE_SETOUTPUTINUSE (MCIERR_BASE + 65)
  938. #define MCIERR_WAVE_INPUTSINUSE (MCIERR_BASE + 66)
  939. #define MCIERR_WAVE_SETINPUTINUSE (MCIERR_BASE + 67)
  940. #define MCIERR_WAVE_OUTPUTUNSPECIFIED (MCIERR_BASE + 68)
  941. #define MCIERR_WAVE_INPUTUNSPECIFIED (MCIERR_BASE + 69)
  942. #define MCIERR_WAVE_OUTPUTSUNSUITABLE (MCIERR_BASE + 70)
  943. #define MCIERR_WAVE_SETOUTPUTUNSUITABLE (MCIERR_BASE + 71)
  944. #define MCIERR_WAVE_INPUTSUNSUITABLE (MCIERR_BASE + 72)
  945. #define MCIERR_WAVE_SETINPUTUNSUITABLE (MCIERR_BASE + 73)
  946. #define MCIERR_SEQ_DIV_INCOMPATIBLE (MCIERR_BASE + 80)
  947. #define MCIERR_SEQ_PORT_INUSE (MCIERR_BASE + 81)
  948. #define MCIERR_SEQ_PORT_NONEXISTENT (MCIERR_BASE + 82)
  949. #define MCIERR_SEQ_PORT_MAPNODEVICE (MCIERR_BASE + 83)
  950. #define MCIERR_SEQ_PORT_MISCERROR (MCIERR_BASE + 84)
  951. #define MCIERR_SEQ_TIMER (MCIERR_BASE + 85)
  952. #define MCIERR_SEQ_PORTUNSPECIFIED (MCIERR_BASE + 86)
  953. #define MCIERR_SEQ_NOMIDIPRESENT (MCIERR_BASE + 87)
  954. #define MCIERR_NO_WINDOW (MCIERR_BASE + 90)
  955. #define MCIERR_CREATEWINDOW (MCIERR_BASE + 91)
  956. #define MCIERR_FILE_READ (MCIERR_BASE + 92)
  957. #define MCIERR_FILE_WRITE (MCIERR_BASE + 93)
  958. /* all custom device driver errors must be >= than this value */
  959. #define MCIERR_CUSTOM_DRIVER_BASE (MCIERR_BASE + 256)
  960. /* MCI command message identifiers */
  961. #define MCI_OPEN 0x0803
  962. #define MCI_CLOSE 0x0804
  963. #define MCI_ESCAPE 0x0805
  964. #define MCI_PLAY 0x0806
  965. #define MCI_SEEK 0x0807
  966. #define MCI_STOP 0x0808
  967. #define MCI_PAUSE 0x0809
  968. #define MCI_INFO 0x080A
  969. #define MCI_GETDEVCAPS 0x080B
  970. #define MCI_SPIN 0x080C
  971. #define MCI_SET 0x080D
  972. #define MCI_STEP 0x080E
  973. #define MCI_RECORD 0x080F
  974. #define MCI_SYSINFO 0x0810
  975. #define MCI_BREAK 0x0811
  976. #define MCI_SOUND 0x0812
  977. #define MCI_SAVE 0x0813
  978. #define MCI_STATUS 0x0814
  979. #define MCI_CUE 0x0830
  980. #define MCI_REALIZE 0x0840
  981. #define MCI_WINDOW 0x0841
  982. #define MCI_PUT 0x0842
  983. #define MCI_WHERE 0x0843
  984. #define MCI_FREEZE 0x0844
  985. #define MCI_UNFREEZE 0x0845
  986. #define MCI_LOAD 0x0850
  987. #define MCI_CUT 0x0851
  988. #define MCI_COPY 0x0852
  989. #define MCI_PASTE 0x0853
  990. #define MCI_UPDATE 0x0854
  991. #define MCI_RESUME 0x0855
  992. #define MCI_DELETE 0x0856
  993. /* all custom MCI command messages must be >= than this value */
  994. #define MCI_USER_MESSAGES (0x400 + DRV_MCI_FIRST)
  995. /* device ID for "all devices" */
  996. #define MCI_ALL_DEVICE_ID 0xFFFF
  997. /* constants for predefined MCI device types */
  998. #define MCI_DEVTYPE_VCR (MCI_STRING_OFFSET + 1)
  999. #define MCI_DEVTYPE_VIDEODISC (MCI_STRING_OFFSET + 2)
  1000. #define MCI_DEVTYPE_OVERLAY (MCI_STRING_OFFSET + 3)
  1001. #define MCI_DEVTYPE_CD_AUDIO (MCI_STRING_OFFSET + 4)
  1002. #define MCI_DEVTYPE_DAT (MCI_STRING_OFFSET + 5)
  1003. #define MCI_DEVTYPE_SCANNER (MCI_STRING_OFFSET + 6)
  1004. #define MCI_DEVTYPE_ANIMATION (MCI_STRING_OFFSET + 7)
  1005. #define MCI_DEVTYPE_DIGITAL_VIDEO (MCI_STRING_OFFSET + 8)
  1006. #define MCI_DEVTYPE_OTHER (MCI_STRING_OFFSET + 9)
  1007. #define MCI_DEVTYPE_WAVEFORM_AUDIO (MCI_STRING_OFFSET + 10)
  1008. #define MCI_DEVTYPE_SEQUENCER (MCI_STRING_OFFSET + 11)
  1009. #define MCI_DEVTYPE_FIRST MCI_DEVTYPE_VCR
  1010. #define MCI_DEVTYPE_LAST MCI_DEVTYPE_SEQUENCER
  1011. /* return values for 'status mode' command */
  1012. #define MCI_MODE_NOT_READY (MCI_STRING_OFFSET + 12)
  1013. #define MCI_MODE_STOP (MCI_STRING_OFFSET + 13)
  1014. #define MCI_MODE_PLAY (MCI_STRING_OFFSET + 14)
  1015. #define MCI_MODE_RECORD (MCI_STRING_OFFSET + 15)
  1016. #define MCI_MODE_SEEK (MCI_STRING_OFFSET + 16)
  1017. #define MCI_MODE_PAUSE (MCI_STRING_OFFSET + 17)
  1018. #define MCI_MODE_OPEN (MCI_STRING_OFFSET + 18)
  1019. /* constants used in 'set time format' and 'status time format' commands */
  1020. #define MCI_FORMAT_MILLISECONDS 0
  1021. #define MCI_FORMAT_HMS 1
  1022. #define MCI_FORMAT_MSF 2
  1023. #define MCI_FORMAT_FRAMES 3
  1024. #define MCI_FORMAT_SMPTE_24 4
  1025. #define MCI_FORMAT_SMPTE_25 5
  1026. #define MCI_FORMAT_SMPTE_30 6
  1027. #define MCI_FORMAT_SMPTE_30DROP 7
  1028. #define MCI_FORMAT_BYTES 8
  1029. #define MCI_FORMAT_SAMPLES 9
  1030. #define MCI_FORMAT_TMSF 10
  1031. /* MCI time format conversion macros */
  1032. #define MCI_MSF_MINUTE(msf) ((BYTE)(msf))
  1033. #define MCI_MSF_SECOND(msf) ((BYTE)(((WORD)(msf)) >> 8))
  1034. #define MCI_MSF_FRAME(msf) ((BYTE)((msf)>>16))
  1035. #define MCI_MAKE_MSF(m, s, f) ((DWORD)(((BYTE)(m) | \
  1036. ((WORD)(s)<<8)) | \
  1037. (((DWORD)(BYTE)(f))<<16)))
  1038. #define MCI_TMSF_TRACK(tmsf) ((BYTE)(tmsf))
  1039. #define MCI_TMSF_MINUTE(tmsf) ((BYTE)(((WORD)(tmsf)) >> 8))
  1040. #define MCI_TMSF_SECOND(tmsf) ((BYTE)((tmsf)>>16))
  1041. #define MCI_TMSF_FRAME(tmsf) ((BYTE)((tmsf)>>24))
  1042. #define MCI_MAKE_TMSF(t, m, s, f) ((DWORD)(((BYTE)(t) | \
  1043. ((WORD)(m)<<8)) | \
  1044. (((DWORD)(BYTE)(s) | \
  1045. ((WORD)(f)<<8))<<16)))
  1046. #define MCI_HMS_HOUR(hms) ((BYTE)(hms))
  1047. #define MCI_HMS_MINUTE(hms) ((BYTE)(((WORD)(hms)) >> 8))
  1048. #define MCI_HMS_SECOND(hms) ((BYTE)((hms)>>16))
  1049. #define MCI_MAKE_HMS(h, m, s) ((DWORD)(((BYTE)(h) | \
  1050. ((WORD)(m)<<8)) | \
  1051. (((DWORD)(BYTE)(s))<<16)))
  1052. /* flags for wParam of MM_MCINOTIFY message */
  1053. #define MCI_NOTIFY_SUCCESSFUL 0x0001
  1054. #define MCI_NOTIFY_SUPERSEDED 0x0002
  1055. #define MCI_NOTIFY_ABORTED 0x0004
  1056. #define MCI_NOTIFY_FAILURE 0x0008
  1057. /* common flags for dwFlags parameter of MCI command messages */
  1058. #define MCI_NOTIFY 0x00000001L
  1059. #define MCI_WAIT 0x00000002L
  1060. #define MCI_FROM 0x00000004L
  1061. #define MCI_TO 0x00000008L
  1062. #define MCI_TRACK 0x00000010L
  1063. /* flags for dwFlags parameter of MCI_OPEN command message */
  1064. #define MCI_OPEN_SHAREABLE 0x00000100L
  1065. #define MCI_OPEN_ELEMENT 0x00000200L
  1066. #define MCI_OPEN_ALIAS 0x00000400L
  1067. #define MCI_OPEN_ELEMENT_ID 0x00000800L
  1068. #define MCI_OPEN_TYPE_ID 0x00001000L
  1069. #define MCI_OPEN_TYPE 0x00002000L
  1070. /* flags for dwFlags parameter of MCI_SEEK command message */
  1071. #define MCI_SEEK_TO_START 0x00000100L
  1072. #define MCI_SEEK_TO_END 0x00000200L
  1073. /* flags for dwFlags parameter of MCI_STATUS command message */
  1074. #define MCI_STATUS_ITEM 0x00000100L
  1075. #define MCI_STATUS_START 0x00000200L
  1076. /* flags for dwItem field of the MCI_STATUS_PARMS parameter block */
  1077. #define MCI_STATUS_LENGTH 0x00000001L
  1078. #define MCI_STATUS_POSITION 0x00000002L
  1079. #define MCI_STATUS_NUMBER_OF_TRACKS 0x00000003L
  1080. #define MCI_STATUS_MODE 0x00000004L
  1081. #define MCI_STATUS_MEDIA_PRESENT 0x00000005L
  1082. #define MCI_STATUS_TIME_FORMAT 0x00000006L
  1083. #define MCI_STATUS_READY 0x00000007L
  1084. #define MCI_STATUS_CURRENT_TRACK 0x00000008L
  1085. /* flags for dwFlags parameter of MCI_INFO command message */
  1086. #define MCI_INFO_PRODUCT 0x00000100L
  1087. #define MCI_INFO_FILE 0x00000200L
  1088. /* flags for dwFlags parameter of MCI_GETDEVCAPS command message */
  1089. #define MCI_GETDEVCAPS_ITEM 0x00000100L
  1090. /* flags for dwItem field of the MCI_GETDEVCAPS_PARMS parameter block */
  1091. #define MCI_GETDEVCAPS_CAN_RECORD 0x00000001L
  1092. #define MCI_GETDEVCAPS_HAS_AUDIO 0x00000002L
  1093. #define MCI_GETDEVCAPS_HAS_VIDEO 0x00000003L
  1094. #define MCI_GETDEVCAPS_DEVICE_TYPE 0x00000004L
  1095. #define MCI_GETDEVCAPS_USES_FILES 0x00000005L
  1096. #define MCI_GETDEVCAPS_COMPOUND_DEVICE 0x00000006L
  1097. #define MCI_GETDEVCAPS_CAN_EJECT 0x00000007L
  1098. #define MCI_GETDEVCAPS_CAN_PLAY 0x00000008L
  1099. #define MCI_GETDEVCAPS_CAN_SAVE 0x00000009L
  1100. /* flags for dwFlags parameter of MCI_SYSINFO command message */
  1101. #define MCI_SYSINFO_QUANTITY 0x00000100L
  1102. #define MCI_SYSINFO_OPEN 0x00000200L
  1103. #define MCI_SYSINFO_NAME 0x00000400L
  1104. #define MCI_SYSINFO_INSTALLNAME 0x00000800L
  1105. /* flags for dwFlags parameter of MCI_SET command message */
  1106. #define MCI_SET_DOOR_OPEN 0x00000100L
  1107. #define MCI_SET_DOOR_CLOSED 0x00000200L
  1108. #define MCI_SET_TIME_FORMAT 0x00000400L
  1109. #define MCI_SET_AUDIO 0x00000800L
  1110. #define MCI_SET_VIDEO 0x00001000L
  1111. #define MCI_SET_ON 0x00002000L
  1112. #define MCI_SET_OFF 0x00004000L
  1113. /* flags for dwAudio field of MCI_SET_PARMS or MCI_SEQ_SET_PARMS */
  1114. #define MCI_SET_AUDIO_ALL 0x00000000L
  1115. #define MCI_SET_AUDIO_LEFT 0x00000001L
  1116. #define MCI_SET_AUDIO_RIGHT 0x00000002L
  1117. /* flags for dwFlags parameter of MCI_BREAK command message */
  1118. #define MCI_BREAK_KEY 0x00000100L
  1119. #define MCI_BREAK_HWND 0x00000200L
  1120. #define MCI_BREAK_OFF 0x00000400L
  1121. /* flags for dwFlags parameter of MCI_RECORD command message */
  1122. #define MCI_RECORD_INSERT 0x00000100L
  1123. #define MCI_RECORD_OVERWRITE 0x00000200L
  1124. /* flags for dwFlags parameter of MCI_SOUND command message */
  1125. #define MCI_SOUND_NAME 0x00000100L
  1126. /* flags for dwFlags parameter of MCI_SAVE command message */
  1127. #define MCI_SAVE_FILE 0x00000100L
  1128. /* flags for dwFlags parameter of MCI_LOAD command message */
  1129. #define MCI_LOAD_FILE 0x00000100L
  1130. /* generic parameter block for MCI command messages with no special parameters */
  1131. typedef struct tagMCI_GENERIC_PARMS {
  1132. DWORD dwCallback;
  1133. } MCI_GENERIC_PARMS;
  1134. typedef MCI_GENERIC_PARMS FAR *LPMCI_GENERIC_PARMS;
  1135. /* parameter block for MCI_OPEN command message */
  1136. typedef struct tagMCI_OPEN_PARMS {
  1137. DWORD dwCallback;
  1138. UINT wDeviceID;
  1139. UINT wReserved0;
  1140. LPCSTR lpstrDeviceType;
  1141. LPCSTR lpstrElementName;
  1142. LPCSTR lpstrAlias;
  1143. } MCI_OPEN_PARMS;
  1144. typedef MCI_OPEN_PARMS FAR *LPMCI_OPEN_PARMS;
  1145. /* parameter block for MCI_PLAY command message */
  1146. typedef struct tagMCI_PLAY_PARMS {
  1147. DWORD dwCallback;
  1148. DWORD dwFrom;
  1149. DWORD dwTo;
  1150. } MCI_PLAY_PARMS;
  1151. typedef MCI_PLAY_PARMS FAR *LPMCI_PLAY_PARMS;
  1152. /* parameter block for MCI_SEEK command message */
  1153. typedef struct tagMCI_SEEK_PARMS {
  1154. DWORD dwCallback;
  1155. DWORD dwTo;
  1156. } MCI_SEEK_PARMS;
  1157. typedef MCI_SEEK_PARMS FAR *LPMCI_SEEK_PARMS;
  1158. /* parameter block for MCI_STATUS command message */
  1159. typedef struct tagMCI_STATUS_PARMS {
  1160. DWORD dwCallback;
  1161. DWORD dwReturn;
  1162. DWORD dwItem;
  1163. DWORD dwTrack;
  1164. } MCI_STATUS_PARMS;
  1165. typedef MCI_STATUS_PARMS FAR * LPMCI_STATUS_PARMS;
  1166. /* parameter block for MCI_INFO command message */
  1167. typedef struct tagMCI_INFO_PARMS {
  1168. DWORD dwCallback;
  1169. LPSTR lpstrReturn;
  1170. DWORD dwRetSize;
  1171. } MCI_INFO_PARMS;
  1172. typedef MCI_INFO_PARMS FAR * LPMCI_INFO_PARMS;
  1173. /* parameter block for MCI_GETDEVCAPS command message */
  1174. typedef struct tagMCI_GETDEVCAPS_PARMS {
  1175. DWORD dwCallback;
  1176. DWORD dwReturn;
  1177. DWORD dwItem;
  1178. } MCI_GETDEVCAPS_PARMS;
  1179. typedef MCI_GETDEVCAPS_PARMS FAR * LPMCI_GETDEVCAPS_PARMS;
  1180. /* parameter block for MCI_SYSINFO command message */
  1181. typedef struct tagMCI_SYSINFO_PARMS {
  1182. DWORD dwCallback;
  1183. LPSTR lpstrReturn;
  1184. DWORD dwRetSize;
  1185. DWORD dwNumber;
  1186. UINT wDeviceType;
  1187. UINT wReserved0;
  1188. } MCI_SYSINFO_PARMS;
  1189. typedef MCI_SYSINFO_PARMS FAR * LPMCI_SYSINFO_PARMS;
  1190. /* parameter block for MCI_SET command message */
  1191. typedef struct tagMCI_SET_PARMS {
  1192. DWORD dwCallback;
  1193. DWORD dwTimeFormat;
  1194. DWORD dwAudio;
  1195. } MCI_SET_PARMS;
  1196. typedef MCI_SET_PARMS FAR *LPMCI_SET_PARMS;
  1197. /* parameter block for MCI_BREAK command message */
  1198. typedef struct tagMCI_BREAK_PARMS {
  1199. DWORD dwCallback;
  1200. int nVirtKey;
  1201. UINT wReserved0;
  1202. HWND hwndBreak;
  1203. UINT wReserved1;
  1204. } MCI_BREAK_PARMS;
  1205. typedef MCI_BREAK_PARMS FAR * LPMCI_BREAK_PARMS;
  1206. /* parameter block for MCI_SOUND command message */
  1207. typedef struct tagMCI_SOUND_PARMS {
  1208. DWORD dwCallback;
  1209. LPCSTR lpstrSoundName;
  1210. } MCI_SOUND_PARMS;
  1211. typedef MCI_SOUND_PARMS FAR * LPMCI_SOUND_PARMS;
  1212. /* parameter block for MCI_SAVE command message */
  1213. typedef struct tagMCI_SAVE_PARMS {
  1214. DWORD dwCallback;
  1215. LPCSTR lpfilename;
  1216. } MCI_SAVE_PARMS;
  1217. typedef MCI_SAVE_PARMS FAR * LPMCI_SAVE_PARMS;
  1218. /* parameter block for MCI_LOAD command message */
  1219. typedef struct tagMCI_LOAD_PARMS {
  1220. DWORD dwCallback;
  1221. LPCSTR lpfilename;
  1222. } MCI_LOAD_PARMS;
  1223. typedef MCI_LOAD_PARMS FAR * LPMCI_LOAD_PARMS;
  1224. /* parameter block for MCI_RECORD command message */
  1225. typedef struct tagMCI_RECORD_PARMS {
  1226. DWORD dwCallback;
  1227. DWORD dwFrom;
  1228. DWORD dwTo;
  1229. } MCI_RECORD_PARMS;
  1230. typedef MCI_RECORD_PARMS FAR *LPMCI_RECORD_PARMS;
  1231. /* MCI extensions for videodisc devices */
  1232. /* flag for dwReturn field of MCI_STATUS_PARMS */
  1233. /* MCI_STATUS command, (dwItem == MCI_STATUS_MODE) */
  1234. #define MCI_VD_MODE_PARK (MCI_VD_OFFSET + 1)
  1235. /* flag for dwReturn field of MCI_STATUS_PARMS */
  1236. /* MCI_STATUS command, (dwItem == MCI_VD_STATUS_MEDIA_TYPE) */
  1237. #define MCI_VD_MEDIA_CLV (MCI_VD_OFFSET + 2)
  1238. #define MCI_VD_MEDIA_CAV (MCI_VD_OFFSET + 3)
  1239. #define MCI_VD_MEDIA_OTHER (MCI_VD_OFFSET + 4)
  1240. #define MCI_VD_FORMAT_TRACK 0x4001
  1241. /* flags for dwFlags parameter of MCI_PLAY command message */
  1242. #define MCI_VD_PLAY_REVERSE 0x00010000L
  1243. #define MCI_VD_PLAY_FAST 0x00020000L
  1244. #define MCI_VD_PLAY_SPEED 0x00040000L
  1245. #define MCI_VD_PLAY_SCAN 0x00080000L
  1246. #define MCI_VD_PLAY_SLOW 0x00100000L
  1247. /* flag for dwFlags parameter of MCI_SEEK command message */
  1248. #define MCI_VD_SEEK_REVERSE 0x00010000L
  1249. /* flags for dwItem field of MCI_STATUS_PARMS parameter block */
  1250. #define MCI_VD_STATUS_SPEED 0x00004002L
  1251. #define MCI_VD_STATUS_FORWARD 0x00004003L
  1252. #define MCI_VD_STATUS_MEDIA_TYPE 0x00004004L
  1253. #define MCI_VD_STATUS_SIDE 0x00004005L
  1254. #define MCI_VD_STATUS_DISC_SIZE 0x00004006L
  1255. /* flags for dwFlags parameter of MCI_GETDEVCAPS command message */
  1256. #define MCI_VD_GETDEVCAPS_CLV 0x00010000L
  1257. #define MCI_VD_GETDEVCAPS_CAV 0x00020000L
  1258. #define MCI_VD_SPIN_UP 0x00010000L
  1259. #define MCI_VD_SPIN_DOWN 0x00020000L
  1260. /* flags for dwItem field of MCI_GETDEVCAPS_PARMS parameter block */
  1261. #define MCI_VD_GETDEVCAPS_CAN_REVERSE 0x00004002L
  1262. #define MCI_VD_GETDEVCAPS_FAST_RATE 0x00004003L
  1263. #define MCI_VD_GETDEVCAPS_SLOW_RATE 0x00004004L
  1264. #define MCI_VD_GETDEVCAPS_NORMAL_RATE 0x00004005L
  1265. /* flags for the dwFlags parameter of MCI_STEP command message */
  1266. #define MCI_VD_STEP_FRAMES 0x00010000L
  1267. #define MCI_VD_STEP_REVERSE 0x00020000L
  1268. /* flag for the MCI_ESCAPE command message */
  1269. #define MCI_VD_ESCAPE_STRING 0x00000100L
  1270. /* parameter block for MCI_PLAY command message */
  1271. typedef struct tagMCI_VD_PLAY_PARMS {
  1272. DWORD dwCallback;
  1273. DWORD dwFrom;
  1274. DWORD dwTo;
  1275. DWORD dwSpeed;
  1276. } MCI_VD_PLAY_PARMS;
  1277. typedef MCI_VD_PLAY_PARMS FAR *LPMCI_VD_PLAY_PARMS;
  1278. /* parameter block for MCI_STEP command message */
  1279. typedef struct tagMCI_VD_STEP_PARMS {
  1280. DWORD dwCallback;
  1281. DWORD dwFrames;
  1282. } MCI_VD_STEP_PARMS;
  1283. typedef MCI_VD_STEP_PARMS FAR *LPMCI_VD_STEP_PARMS;
  1284. /* parameter block for MCI_ESCAPE command message */
  1285. typedef struct tagMCI_VD_ESCAPE_PARMS {
  1286. DWORD dwCallback;
  1287. LPCSTR lpstrCommand;
  1288. } MCI_VD_ESCAPE_PARMS;
  1289. typedef MCI_VD_ESCAPE_PARMS FAR *LPMCI_VD_ESCAPE_PARMS;
  1290. /* MCI extensions for waveform audio devices */
  1291. /* flags for the dwFlags parameter of MCI_OPEN command message */
  1292. #define MCI_WAVE_OPEN_BUFFER 0x00010000L
  1293. /* flags for the dwFlags parameter of MCI_SET command message */
  1294. #define MCI_WAVE_SET_FORMATTAG 0x00010000L
  1295. #define MCI_WAVE_SET_CHANNELS 0x00020000L
  1296. #define MCI_WAVE_SET_SAMPLESPERSEC 0x00040000L
  1297. #define MCI_WAVE_SET_AVGBYTESPERSEC 0x00080000L
  1298. #define MCI_WAVE_SET_BLOCKALIGN 0x00100000L
  1299. #define MCI_WAVE_SET_BITSPERSAMPLE 0x00200000L
  1300. /* flags for the dwFlags parameter of MCI_STATUS, MCI_SET command messages */
  1301. #define MCI_WAVE_INPUT 0x00400000L
  1302. #define MCI_WAVE_OUTPUT 0x00800000L
  1303. /* flags for the dwItem field of MCI_STATUS_PARMS parameter block */
  1304. #define MCI_WAVE_STATUS_FORMATTAG 0x00004001L
  1305. #define MCI_WAVE_STATUS_CHANNELS 0x00004002L
  1306. #define MCI_WAVE_STATUS_SAMPLESPERSEC 0x00004003L
  1307. #define MCI_WAVE_STATUS_AVGBYTESPERSEC 0x00004004L
  1308. #define MCI_WAVE_STATUS_BLOCKALIGN 0x00004005L
  1309. #define MCI_WAVE_STATUS_BITSPERSAMPLE 0x00004006L
  1310. #define MCI_WAVE_STATUS_LEVEL 0x00004007L
  1311. /* flags for the dwFlags parameter of MCI_SET command message */
  1312. #define MCI_WAVE_SET_ANYINPUT 0x04000000L
  1313. #define MCI_WAVE_SET_ANYOUTPUT 0x08000000L
  1314. /* flags for the dwFlags parameter of MCI_GETDEVCAPS command message */
  1315. #define MCI_WAVE_GETDEVCAPS_INPUTS 0x00004001L
  1316. #define MCI_WAVE_GETDEVCAPS_OUTPUTS 0x00004002L
  1317. /* parameter block for MCI_OPEN command message */
  1318. typedef struct tagMCI_WAVE_OPEN_PARMS {
  1319. DWORD dwCallback;
  1320. UINT wDeviceID;
  1321. UINT wReserved0;
  1322. LPCSTR lpstrDeviceType;
  1323. LPCSTR lpstrElementName;
  1324. LPCSTR lpstrAlias;
  1325. DWORD dwBufferSeconds;
  1326. } MCI_WAVE_OPEN_PARMS;
  1327. typedef MCI_WAVE_OPEN_PARMS FAR *LPMCI_WAVE_OPEN_PARMS;
  1328. /* parameter block for MCI_DELETE command message */
  1329. typedef struct tagMCI_WAVE_DELETE_PARMS {
  1330. DWORD dwCallback;
  1331. DWORD dwFrom;
  1332. DWORD dwTo;
  1333. } MCI_WAVE_DELETE_PARMS;
  1334. typedef MCI_WAVE_DELETE_PARMS FAR *LPMCI_WAVE_DELETE_PARMS;
  1335. /* parameter block for MCI_SET command message */
  1336. typedef struct tagMCI_WAVE_SET_PARMS {
  1337. DWORD dwCallback;
  1338. DWORD dwTimeFormat;
  1339. DWORD dwAudio;
  1340. UINT wInput;
  1341. UINT wReserved0;
  1342. UINT wOutput;
  1343. UINT wReserved1;
  1344. UINT wFormatTag;
  1345. UINT wReserved2;
  1346. UINT nChannels;
  1347. UINT wReserved3;
  1348. DWORD nSamplesPerSec;
  1349. DWORD nAvgBytesPerSec;
  1350. UINT nBlockAlign;
  1351. UINT wReserved4;
  1352. UINT wBitsPerSample;
  1353. UINT wReserved5;
  1354. } MCI_WAVE_SET_PARMS;
  1355. typedef MCI_WAVE_SET_PARMS FAR * LPMCI_WAVE_SET_PARMS;
  1356. /* MCI extensions for MIDI sequencer devices */
  1357. /* flags for the dwReturn field of MCI_STATUS_PARMS parameter block */
  1358. /* MCI_STATUS command, (dwItem == MCI_SEQ_STATUS_DIVTYPE) */
  1359. #define MCI_SEQ_DIV_PPQN (0 + MCI_SEQ_OFFSET)
  1360. #define MCI_SEQ_DIV_SMPTE_24 (1 + MCI_SEQ_OFFSET)
  1361. #define MCI_SEQ_DIV_SMPTE_25 (2 + MCI_SEQ_OFFSET)
  1362. #define MCI_SEQ_DIV_SMPTE_30DROP (3 + MCI_SEQ_OFFSET)
  1363. #define MCI_SEQ_DIV_SMPTE_30 (4 + MCI_SEQ_OFFSET)
  1364. /* flags for the dwMaster field of MCI_SEQ_SET_PARMS parameter block */
  1365. /* MCI_SET command, (dwFlags == MCI_SEQ_SET_MASTER) */
  1366. #define MCI_SEQ_FORMAT_SONGPTR 0x4001
  1367. #define MCI_SEQ_FILE 0x4002
  1368. #define MCI_SEQ_MIDI 0x4003
  1369. #define MCI_SEQ_SMPTE 0x4004
  1370. #define MCI_SEQ_NONE 65533
  1371. /* flags for the dwItem field of MCI_STATUS_PARMS parameter block */
  1372. #define MCI_SEQ_STATUS_TEMPO 0x00004002L
  1373. #define MCI_SEQ_STATUS_PORT 0x00004003L
  1374. #define MCI_SEQ_STATUS_SLAVE 0x00004007L
  1375. #define MCI_SEQ_STATUS_MASTER 0x00004008L
  1376. #define MCI_SEQ_STATUS_OFFSET 0x00004009L
  1377. #define MCI_SEQ_STATUS_DIVTYPE 0x0000400AL
  1378. /* flags for the dwFlags parameter of MCI_SET command message */
  1379. #define MCI_SEQ_SET_TEMPO 0x00010000L
  1380. #define MCI_SEQ_SET_PORT 0x00020000L
  1381. #define MCI_SEQ_SET_SLAVE 0x00040000L
  1382. #define MCI_SEQ_SET_MASTER 0x00080000L
  1383. #define MCI_SEQ_SET_OFFSET 0x01000000L
  1384. /* parameter block for MCI_SET command message */
  1385. typedef struct tagMCI_SEQ_SET_PARMS {
  1386. DWORD dwCallback;
  1387. DWORD dwTimeFormat;
  1388. DWORD dwAudio;
  1389. DWORD dwTempo;
  1390. DWORD dwPort;
  1391. DWORD dwSlave;
  1392. DWORD dwMaster;
  1393. DWORD dwOffset;
  1394. } MCI_SEQ_SET_PARMS;
  1395. typedef MCI_SEQ_SET_PARMS FAR * LPMCI_SEQ_SET_PARMS;
  1396. /* MCI extensions for animation devices */
  1397. /* flags for dwFlags parameter of MCI_OPEN command message */
  1398. #define MCI_ANIM_OPEN_WS 0x00010000L
  1399. #define MCI_ANIM_OPEN_PARENT 0x00020000L
  1400. #define MCI_ANIM_OPEN_NOSTATIC 0x00040000L
  1401. /* flags for dwFlags parameter of MCI_PLAY command message */
  1402. #define MCI_ANIM_PLAY_SPEED 0x00010000L
  1403. #define MCI_ANIM_PLAY_REVERSE 0x00020000L
  1404. #define MCI_ANIM_PLAY_FAST 0x00040000L
  1405. #define MCI_ANIM_PLAY_SLOW 0x00080000L
  1406. #define MCI_ANIM_PLAY_SCAN 0x00100000L
  1407. /* flags for dwFlags parameter of MCI_STEP command message */
  1408. #define MCI_ANIM_STEP_REVERSE 0x00010000L
  1409. #define MCI_ANIM_STEP_FRAMES 0x00020000L
  1410. /* flags for dwItem field of MCI_STATUS_PARMS parameter block */
  1411. #define MCI_ANIM_STATUS_SPEED 0x00004001L
  1412. #define MCI_ANIM_STATUS_FORWARD 0x00004002L
  1413. #define MCI_ANIM_STATUS_HWND 0x00004003L
  1414. #define MCI_ANIM_STATUS_HPAL 0x00004004L
  1415. #define MCI_ANIM_STATUS_STRETCH 0x00004005L
  1416. /* flags for the dwFlags parameter of MCI_INFO command message */
  1417. #define MCI_ANIM_INFO_TEXT 0x00010000L
  1418. /* flags for dwItem field of MCI_GETDEVCAPS_PARMS parameter block */
  1419. #define MCI_ANIM_GETDEVCAPS_CAN_REVERSE 0x00004001L
  1420. #define MCI_ANIM_GETDEVCAPS_FAST_RATE 0x00004002L
  1421. #define MCI_ANIM_GETDEVCAPS_SLOW_RATE 0x00004003L
  1422. #define MCI_ANIM_GETDEVCAPS_NORMAL_RATE 0x00004004L
  1423. #define MCI_ANIM_GETDEVCAPS_PALETTES 0x00004006L
  1424. #define MCI_ANIM_GETDEVCAPS_CAN_STRETCH 0x00004007L
  1425. #define MCI_ANIM_GETDEVCAPS_MAX_WINDOWS 0x00004008L
  1426. /* flags for the MCI_REALIZE command message */
  1427. #define MCI_ANIM_REALIZE_NORM 0x00010000L
  1428. #define MCI_ANIM_REALIZE_BKGD 0x00020000L
  1429. /* flags for dwFlags parameter of MCI_WINDOW command message */
  1430. #define MCI_ANIM_WINDOW_HWND 0x00010000L
  1431. #define MCI_ANIM_WINDOW_STATE 0x00040000L
  1432. #define MCI_ANIM_WINDOW_TEXT 0x00080000L
  1433. #define MCI_ANIM_WINDOW_ENABLE_STRETCH 0x00100000L
  1434. #define MCI_ANIM_WINDOW_DISABLE_STRETCH 0x00200000L
  1435. /* flags for hWnd field of MCI_ANIM_WINDOW_PARMS parameter block */
  1436. /* MCI_WINDOW command message, (dwFlags == MCI_ANIM_WINDOW_HWND) */
  1437. #define MCI_ANIM_WINDOW_DEFAULT 0x00000000L
  1438. /* flags for dwFlags parameter of MCI_PUT command message */
  1439. #define MCI_ANIM_RECT 0x00010000L
  1440. #define MCI_ANIM_PUT_SOURCE 0x00020000L
  1441. #define MCI_ANIM_PUT_DESTINATION 0x00040000L
  1442. /* flags for dwFlags parameter of MCI_WHERE command message */
  1443. #define MCI_ANIM_WHERE_SOURCE 0x00020000L
  1444. #define MCI_ANIM_WHERE_DESTINATION 0x00040000L
  1445. /* flags for dwFlags parameter of MCI_UPDATE command message */
  1446. #define MCI_ANIM_UPDATE_HDC 0x00020000L
  1447. /* parameter block for MCI_OPEN command message */
  1448. typedef struct tagMCI_ANIM_OPEN_PARMS {
  1449. DWORD dwCallback;
  1450. UINT wDeviceID;
  1451. UINT wReserved0;
  1452. LPCSTR lpstrDeviceType;
  1453. LPCSTR lpstrElementName;
  1454. LPCSTR lpstrAlias;
  1455. DWORD dwStyle;
  1456. HWND hWndParent;
  1457. UINT wReserved1;
  1458. } MCI_ANIM_OPEN_PARMS;
  1459. typedef MCI_ANIM_OPEN_PARMS FAR *LPMCI_ANIM_OPEN_PARMS;
  1460. /* parameter block for MCI_PLAY command message */
  1461. typedef struct tagMCI_ANIM_PLAY_PARMS {
  1462. DWORD dwCallback;
  1463. DWORD dwFrom;
  1464. DWORD dwTo;
  1465. DWORD dwSpeed;
  1466. } MCI_ANIM_PLAY_PARMS;
  1467. typedef MCI_ANIM_PLAY_PARMS FAR *LPMCI_ANIM_PLAY_PARMS;
  1468. /* parameter block for MCI_STEP command message */
  1469. typedef struct tagMCI_ANIM_STEP_PARMS {
  1470. DWORD dwCallback;
  1471. DWORD dwFrames;
  1472. } MCI_ANIM_STEP_PARMS;
  1473. typedef MCI_ANIM_STEP_PARMS FAR *LPMCI_ANIM_STEP_PARMS;
  1474. /* parameter block for MCI_WINDOW command message */
  1475. typedef struct tagMCI_ANIM_WINDOW_PARMS {
  1476. DWORD dwCallback;
  1477. HWND hWnd;
  1478. UINT wReserved1;
  1479. UINT nCmdShow;
  1480. UINT wReserved2;
  1481. LPCSTR lpstrText;
  1482. } MCI_ANIM_WINDOW_PARMS;
  1483. typedef MCI_ANIM_WINDOW_PARMS FAR * LPMCI_ANIM_WINDOW_PARMS;
  1484. /* parameter block for MCI_PUT, MCI_UPDATE, MCI_WHERE command messages */
  1485. typedef struct tagMCI_ANIM_RECT_PARMS {
  1486. DWORD dwCallback;
  1487. #ifdef MCI_USE_OFFEXT
  1488. POINT ptOffset;
  1489. POINT ptExtent;
  1490. #else /* ifdef MCI_USE_OFFEXT */
  1491. RECT rc;
  1492. #endif /* ifdef MCI_USE_OFFEXT */
  1493. } MCI_ANIM_RECT_PARMS;
  1494. typedef MCI_ANIM_RECT_PARMS FAR * LPMCI_ANIM_RECT_PARMS;
  1495. /* parameter block for MCI_UPDATE PARMS */
  1496. typedef struct tagMCI_ANIM_UPDATE_PARMS {
  1497. DWORD dwCallback;
  1498. RECT rc;
  1499. HDC hDC;
  1500. } MCI_ANIM_UPDATE_PARMS;
  1501. typedef MCI_ANIM_UPDATE_PARMS FAR * LPMCI_ANIM_UPDATE_PARMS;
  1502. /* MCI extensions for video overlay devices */
  1503. /* flags for dwFlags parameter of MCI_OPEN command message */
  1504. #define MCI_OVLY_OPEN_WS 0x00010000L
  1505. #define MCI_OVLY_OPEN_PARENT 0x00020000L
  1506. /* flags for dwFlags parameter of MCI_STATUS command message */
  1507. #define MCI_OVLY_STATUS_HWND 0x00004001L
  1508. #define MCI_OVLY_STATUS_STRETCH 0x00004002L
  1509. /* flags for dwFlags parameter of MCI_INFO command message */
  1510. #define MCI_OVLY_INFO_TEXT 0x00010000L
  1511. /* flags for dwItem field of MCI_GETDEVCAPS_PARMS parameter block */
  1512. #define MCI_OVLY_GETDEVCAPS_CAN_STRETCH 0x00004001L
  1513. #define MCI_OVLY_GETDEVCAPS_CAN_FREEZE 0x00004002L
  1514. #define MCI_OVLY_GETDEVCAPS_MAX_WINDOWS 0x00004003L
  1515. /* flags for dwFlags parameter of MCI_WINDOW command message */
  1516. #define MCI_OVLY_WINDOW_HWND 0x00010000L
  1517. #define MCI_OVLY_WINDOW_STATE 0x00040000L
  1518. #define MCI_OVLY_WINDOW_TEXT 0x00080000L
  1519. #define MCI_OVLY_WINDOW_ENABLE_STRETCH 0x00100000L
  1520. #define MCI_OVLY_WINDOW_DISABLE_STRETCH 0x00200000L
  1521. /* flags for hWnd parameter of MCI_OVLY_WINDOW_PARMS parameter block */
  1522. #define MCI_OVLY_WINDOW_DEFAULT 0x00000000L
  1523. /* flags for dwFlags parameter of MCI_PUT command message */
  1524. #define MCI_OVLY_RECT 0x00010000L
  1525. #define MCI_OVLY_PUT_SOURCE 0x00020000L
  1526. #define MCI_OVLY_PUT_DESTINATION 0x00040000L
  1527. #define MCI_OVLY_PUT_FRAME 0x00080000L
  1528. #define MCI_OVLY_PUT_VIDEO 0x00100000L
  1529. /* flags for dwFlags parameter of MCI_WHERE command message */
  1530. #define MCI_OVLY_WHERE_SOURCE 0x00020000L
  1531. #define MCI_OVLY_WHERE_DESTINATION 0x00040000L
  1532. #define MCI_OVLY_WHERE_FRAME 0x00080000L
  1533. #define MCI_OVLY_WHERE_VIDEO 0x00100000L
  1534. /* parameter block for MCI_OPEN command message */
  1535. typedef struct tagMCI_OVLY_OPEN_PARMS {
  1536. DWORD dwCallback;
  1537. UINT wDeviceID;
  1538. UINT wReserved0;
  1539. LPCSTR lpstrDeviceType;
  1540. LPCSTR lpstrElementName;
  1541. LPCSTR lpstrAlias;
  1542. DWORD dwStyle;
  1543. HWND hWndParent;
  1544. UINT wReserved1;
  1545. } MCI_OVLY_OPEN_PARMS;
  1546. typedef MCI_OVLY_OPEN_PARMS FAR *LPMCI_OVLY_OPEN_PARMS;
  1547. /* parameter block for MCI_WINDOW command message */
  1548. typedef struct tagMCI_OVLY_WINDOW_PARMS {
  1549. DWORD dwCallback;
  1550. HWND hWnd;
  1551. UINT wReserved1;
  1552. UINT nCmdShow;
  1553. UINT wReserved2;
  1554. LPCSTR lpstrText;
  1555. } MCI_OVLY_WINDOW_PARMS;
  1556. typedef MCI_OVLY_WINDOW_PARMS FAR * LPMCI_OVLY_WINDOW_PARMS;
  1557. /* parameter block for MCI_PUT, MCI_UPDATE, and MCI_WHERE command messages */
  1558. typedef struct tagMCI_OVLY_RECT_PARMS {
  1559. DWORD dwCallback;
  1560. #ifdef MCI_USE_OFFEXT
  1561. POINT ptOffset;
  1562. POINT ptExtent;
  1563. #else /* ifdef MCI_USE_OFFEXT */
  1564. RECT rc;
  1565. #endif /* ifdef MCI_USE_OFFEXT */
  1566. } MCI_OVLY_RECT_PARMS;
  1567. typedef MCI_OVLY_RECT_PARMS FAR * LPMCI_OVLY_RECT_PARMS;
  1568. /* parameter block for MCI_SAVE command message */
  1569. typedef struct tagMCI_OVLY_SAVE_PARMS {
  1570. DWORD dwCallback;
  1571. LPCSTR lpfilename;
  1572. RECT rc;
  1573. } MCI_OVLY_SAVE_PARMS;
  1574. typedef MCI_OVLY_SAVE_PARMS FAR * LPMCI_OVLY_SAVE_PARMS;
  1575. /* parameter block for MCI_LOAD command message */
  1576. typedef struct tagMCI_OVLY_LOAD_PARMS {
  1577. DWORD dwCallback;
  1578. LPCSTR lpfilename;
  1579. RECT rc;
  1580. } MCI_OVLY_LOAD_PARMS;
  1581. typedef MCI_OVLY_LOAD_PARMS FAR * LPMCI_OVLY_LOAD_PARMS;
  1582. #endif /* ifndef MMNOMCI */
  1583. /****************************************************************************
  1584. DISPLAY Driver extensions
  1585. ****************************************************************************/
  1586. #ifndef C1_TRANSPARENT
  1587. #define CAPS1 94 /* other caps */
  1588. #define C1_TRANSPARENT 0x0001 /* new raster cap */
  1589. #define NEWTRANSPARENT 3 /* use with SetBkMode() */
  1590. #define QUERYROPSUPPORT 40 /* use to determine ROP support */
  1591. #endif /* ifndef C1_TRANSPARENT */
  1592. /****************************************************************************
  1593. DIB Driver extensions
  1594. ****************************************************************************/
  1595. #define SELECTDIB 41 /* DIB.DRV select dib escape */
  1596. #define DIBINDEX(n) MAKELONG((n),0x10FF)
  1597. /****************************************************************************
  1598. ScreenSaver support
  1599. The current application will receive a syscommand of SC_SCREENSAVE just
  1600. before the screen saver is invoked. If the app wishes to prevent a
  1601. screen save, return non-zero value, otherwise call DefWindowProc().
  1602. ****************************************************************************/
  1603. #ifndef SC_SCREENSAVE
  1604. #define SC_SCREENSAVE 0xF140
  1605. #endif /* ifndef SC_SCREENSAVE */
  1606. #ifdef __cplusplus
  1607. } /* End of extern "C" { */
  1608. #endif /* __cplusplus */
  1609. #ifndef RC_INVOKED
  1610. #pragma pack() /* Revert to default packing */
  1611. #endif
  1612. #endif /* _INC_MMSYSTEM */