2 * MMSYSTEM - Multimedia Wine Extension ... :-)
8 typedef LPSTR HPSTR; /* a huge version of LPSTR */
9 typedef LPCSTR HPCSTR; /* a huge version of LPCSTR */
11 #define MAXPNAMELEN 32 /* max product name length (including NULL) */
12 #define MAXERRORLENGTH 128 /* max error text length (including NULL) */
14 typedef WORD VERSION; /* major (high byte), minor (low byte) */
17 UINT wType; /* indicates the contents of the union */
19 DWORD ms; /* milliseconds */
20 DWORD sample; /* samples */
21 DWORD cb; /* byte count */
23 BYTE hour; /* hours */
24 BYTE min; /* minutes */
25 BYTE sec; /* seconds */
26 BYTE frame; /* frames */
27 BYTE fps; /* frames per second */
31 DWORD songptrpos; /* song pointer position */
35 typedef MMTIME FAR *LPMMTIME;
37 #define TIME_MS 0x0001 /* time in milliseconds */
38 #define TIME_SAMPLES 0x0002 /* number of wave samples */
39 #define TIME_BYTES 0x0004 /* current byte offset */
40 #define TIME_SMPTE 0x0008 /* SMPTE time */
41 #define TIME_MIDI 0x0010 /* MIDI time */
43 #define MM_JOY1MOVE 0x3A0 /* joystick */
44 #define MM_JOY2MOVE 0x3A1
45 #define MM_JOY1ZMOVE 0x3A2
46 #define MM_JOY2ZMOVE 0x3A3
47 #define MM_JOY1BUTTONDOWN 0x3B5
48 #define MM_JOY2BUTTONDOWN 0x3B6
49 #define MM_JOY1BUTTONUP 0x3B7
50 #define MM_JOY2BUTTONUP 0x3B8
52 #define MM_MCINOTIFY 0x3B9 /* MCI */
54 #define MM_WOM_OPEN 0x3BB /* waveform output */
55 #define MM_WOM_CLOSE 0x3BC
56 #define MM_WOM_DONE 0x3BD
58 #define MM_WIM_OPEN 0x3BE /* waveform input */
59 #define MM_WIM_CLOSE 0x3BF
60 #define MM_WIM_DATA 0x3C0
62 #define MM_MIM_OPEN 0x3C1 /* MIDI input */
63 #define MM_MIM_CLOSE 0x3C2
64 #define MM_MIM_DATA 0x3C3
65 #define MM_MIM_LONGDATA 0x3C4
66 #define MM_MIM_ERROR 0x3C5
67 #define MM_MIM_LONGERROR 0x3C6
69 #define MM_MOM_OPEN 0x3C7 /* MIDI output */
70 #define MM_MOM_CLOSE 0x3C8
71 #define MM_MOM_DONE 0x3C9
74 #define MMSYSERR_BASE 0
75 #define WAVERR_BASE 32
76 #define MIDIERR_BASE 64
77 #define TIMERR_BASE 96
78 #define JOYERR_BASE 160
79 #define MCIERR_BASE 256
81 #define MCI_STRING_OFFSET 512
82 #define MCI_VD_OFFSET 1024
83 #define MCI_CD_OFFSET 1088
84 #define MCI_WAVE_OFFSET 1152
85 #define MCI_SEQ_OFFSET 1216
87 #define MMSYSERR_NOERROR 0 /* no error */
88 #define MMSYSERR_ERROR (MMSYSERR_BASE + 1) /* unspecified error */
89 #define MMSYSERR_BADDEVICEID (MMSYSERR_BASE + 2) /* device ID out of range */
90 #define MMSYSERR_NOTENABLED (MMSYSERR_BASE + 3) /* driver failed enable */
91 #define MMSYSERR_ALLOCATED (MMSYSERR_BASE + 4) /* device already allocated */
92 #define MMSYSERR_INVALHANDLE (MMSYSERR_BASE + 5) /* device handle is invalid */
93 #define MMSYSERR_NODRIVER (MMSYSERR_BASE + 6) /* no device driver present */
94 #define MMSYSERR_NOMEM (MMSYSERR_BASE + 7) /* memory allocation error */
95 #define MMSYSERR_NOTSUPPORTED (MMSYSERR_BASE + 8) /* function isn't supported */
96 #define MMSYSERR_BADERRNUM (MMSYSERR_BASE + 9) /* error value out of range */
97 #define MMSYSERR_INVALFLAG (MMSYSERR_BASE + 10) /* invalid flag passed */
98 #define MMSYSERR_INVALPARAM (MMSYSERR_BASE + 11) /* invalid parameter passed */
99 #define MMSYSERR_LASTERROR (MMSYSERR_BASE + 11) /* last error in range */
101 #define CALLBACK_TYPEMASK 0x00070000l /* callback type mask */
102 #define CALLBACK_NULL 0x00000000l /* no callback */
103 #define CALLBACK_WINDOW 0x00010000l /* dwCallback is a HWND */
104 #define CALLBACK_TASK 0x00020000l /* dwCallback is a HTASK */
105 #define CALLBACK_FUNCTION 0x00030000l /* dwCallback is a FARPROC */
107 typedef void (CALLBACK DRVCALLBACK) (HDRVR h, UINT uMessage, DWORD dwUser, DWORD dw1, DWORD dw2);
109 typedef DRVCALLBACK FAR *LPDRVCALLBACK;
111 #define MM_MICROSOFT 1 /* Microsoft Corp. */
113 #define MM_MIDI_MAPPER 1 /* MIDI Mapper */
114 #define MM_WAVE_MAPPER 2 /* Wave Mapper */
116 #define MM_SNDBLST_MIDIOUT 3 /* Sound Blaster MIDI output port */
117 #define MM_SNDBLST_MIDIIN 4 /* Sound Blaster MIDI input port */
118 #define MM_SNDBLST_SYNTH 5 /* Sound Blaster internal synthesizer */
119 #define MM_SNDBLST_WAVEOUT 6 /* Sound Blaster waveform output */
120 #define MM_SNDBLST_WAVEIN 7 /* Sound Blaster waveform input */
122 #define MM_ADLIB 9 /* Ad Lib-compatible synthesizer */
124 #define MM_MPU401_MIDIOUT 10 /* MPU401-compatible MIDI output port */
125 #define MM_MPU401_MIDIIN 11 /* MPU401-compatible MIDI input port */
127 #define MM_PC_JOYSTICK 12 /* Joystick adapter */
130 WORD WINAPI mmsystemGetVersion(void);
131 void WINAPI OutputDebugStr(LPCSTR);
133 BOOL WINAPI sndPlaySound(LPCSTR lpszSoundName, UINT uFlags);
135 #define SND_SYNC 0x0000 /* play synchronously (default) */
136 #define SND_ASYNC 0x0001 /* play asynchronously */
137 #define SND_NODEFAULT 0x0002 /* don't use default sound */
138 #define SND_MEMORY 0x0004 /* lpszSoundName points to a memory file */
139 #define SND_LOOP 0x0008 /* loop the sound until next sndPlaySound */
140 #define SND_NOSTOP 0x0010 /* don't stop any currently playing sound */
142 /* waveform audio error return values */
143 #define WAVERR_BADFORMAT (WAVERR_BASE + 0) /* unsupported wave format */
144 #define WAVERR_STILLPLAYING (WAVERR_BASE + 1) /* still something playing */
145 #define WAVERR_UNPREPARED (WAVERR_BASE + 2) /* header not prepared */
146 #define WAVERR_SYNC (WAVERR_BASE + 3) /* device is synchronous */
147 #define WAVERR_LASTERROR (WAVERR_BASE + 3) /* last error in range */
149 DECLARE_HANDLE(HWAVE);
150 DECLARE_HANDLE(HWAVEIN);
151 DECLARE_HANDLE(HWAVEOUT);
152 typedef HWAVEIN FAR *LPHWAVEIN;
153 typedef HWAVEOUT FAR *LPHWAVEOUT;
154 typedef DRVCALLBACK WAVECALLBACK;
155 typedef WAVECALLBACK FAR *LPWAVECALLBACK;
157 #define WOM_OPEN MM_WOM_OPEN
158 #define WOM_CLOSE MM_WOM_CLOSE
159 #define WOM_DONE MM_WOM_DONE
160 #define WIM_OPEN MM_WIM_OPEN
161 #define WIM_CLOSE MM_WIM_CLOSE
162 #define WIM_DATA MM_WIM_DATA
164 #define WAVE_MAPPER (-1)
166 #define WAVE_FORMAT_QUERY 0x0001
167 #define WAVE_ALLOWSYNC 0x0002
170 LPSTR lpData; /* pointer to locked data buffer */
171 DWORD dwBufferLength; /* length of data buffer */
172 DWORD dwBytesRecorded; /* used for input only */
173 DWORD dwUser; /* for client's use */
174 DWORD dwFlags; /* assorted flags (see defines) */
175 DWORD dwLoops; /* loop control counter */
176 struct wavehdr_tag FAR *lpNext; /* reserved for driver */
177 DWORD reserved; /* reserved for driver */
179 typedef WAVEHDR FAR *LPWAVEHDR;
181 #define WHDR_DONE 0x00000001 /* done bit */
182 #define WHDR_PREPARED 0x00000002 /* set if this header has been prepared */
183 #define WHDR_BEGINLOOP 0x00000004 /* loop start block */
184 #define WHDR_ENDLOOP 0x00000008 /* loop end block */
185 #define WHDR_INQUEUE 0x00000010 /* reserved for driver */
188 UINT wMid; /* manufacturer ID */
189 UINT wPid; /* product ID */
190 VERSION vDriverVersion; /* version of the driver */
191 char szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
192 DWORD dwFormats; /* formats supported */
193 UINT wChannels; /* number of sources supported */
194 DWORD dwSupport; /* functionality supported by driver */
196 typedef WAVEOUTCAPS FAR *LPWAVEOUTCAPS;
198 #define WAVECAPS_PITCH 0x0001 /* supports pitch control */
199 #define WAVECAPS_PLAYBACKRATE 0x0002 /* supports playback rate control */
200 #define WAVECAPS_VOLUME 0x0004 /* supports volume control */
201 #define WAVECAPS_LRVOLUME 0x0008 /* separate left-right volume control */
202 #define WAVECAPS_SYNC 0x0010
205 UINT wMid; /* manufacturer ID */
206 UINT wPid; /* product ID */
207 VERSION vDriverVersion; /* version of the driver */
208 char szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
209 DWORD dwFormats; /* formats supported */
210 UINT wChannels; /* number of channels supported */
212 typedef WAVEINCAPS FAR *LPWAVEINCAPS;
214 #define WAVE_INVALIDFORMAT 0x00000000 /* invalid format */
215 #define WAVE_FORMAT_1M08 0x00000001 /* 11.025 kHz, Mono, 8-bit */
216 #define WAVE_FORMAT_1S08 0x00000002 /* 11.025 kHz, Stereo, 8-bit */
217 #define WAVE_FORMAT_1M16 0x00000004 /* 11.025 kHz, Mono, 16-bit */
218 #define WAVE_FORMAT_1S16 0x00000008 /* 11.025 kHz, Stereo, 16-bit */
219 #define WAVE_FORMAT_2M08 0x00000010 /* 22.05 kHz, Mono, 8-bit */
220 #define WAVE_FORMAT_2S08 0x00000020 /* 22.05 kHz, Stereo, 8-bit */
221 #define WAVE_FORMAT_2M16 0x00000040 /* 22.05 kHz, Mono, 16-bit */
222 #define WAVE_FORMAT_2S16 0x00000080 /* 22.05 kHz, Stereo, 16-bit */
223 #define WAVE_FORMAT_4M08 0x00000100 /* 44.1 kHz, Mono, 8-bit */
224 #define WAVE_FORMAT_4S08 0x00000200 /* 44.1 kHz, Stereo, 8-bit */
225 #define WAVE_FORMAT_4M16 0x00000400 /* 44.1 kHz, Mono, 16-bit */
226 #define WAVE_FORMAT_4S16 0x00000800 /* 44.1 kHz, Stereo, 16-bit */
228 /* general format structure common to all formats */
230 WORD wFormatTag; /* format type */
231 WORD nChannels; /* number of channels (i.e. mono, stereo, etc.) */
232 DWORD nSamplesPerSec; /* sample rate */
233 DWORD nAvgBytesPerSec; /* for buffer estimation */
234 WORD nBlockAlign; /* block size of data */
236 typedef WAVEFORMAT FAR *LPWAVEFORMAT;
238 #define WAVE_FORMAT_PCM 1
244 typedef PCMWAVEFORMAT FAR *LPPCMWAVEFORMAT;
246 UINT WINAPI waveOutGetNumDevs(void);
247 UINT WINAPI waveOutGetDevCaps(UINT uDeviceID, WAVEOUTCAPS FAR* lpCaps,
249 UINT WINAPI waveOutGetVolume(UINT uDeviceID, DWORD FAR* lpdwVolume);
250 UINT WINAPI waveOutSetVolume(UINT uDeviceID, DWORD dwVolume);
251 UINT WINAPI waveOutGetErrorText(UINT uError, LPSTR lpText, UINT uSize);
252 UINT WINAPI waveGetErrorText(UINT uError, LPSTR lpText, UINT uSize);
253 UINT WINAPI waveOutOpen(HWAVEOUT FAR* lphWaveOut, UINT uDeviceID,
254 const WAVEFORMAT FAR* lpFormat, DWORD dwCallback, DWORD dwInstance, DWORD dwFlags);
255 UINT WINAPI waveOutClose(HWAVEOUT hWaveOut);
256 UINT WINAPI waveOutPrepareHeader(HWAVEOUT hWaveOut,
257 WAVEHDR FAR* lpWaveOutHdr, UINT uSize);
258 UINT WINAPI waveOutUnprepareHeader(HWAVEOUT hWaveOut,
259 WAVEHDR FAR* lpWaveOutHdr, UINT uSize);
260 UINT WINAPI waveOutWrite(HWAVEOUT hWaveOut, WAVEHDR FAR* lpWaveOutHdr,
262 UINT WINAPI waveOutPause(HWAVEOUT hWaveOut);
263 UINT WINAPI waveOutRestart(HWAVEOUT hWaveOut);
264 UINT WINAPI waveOutReset(HWAVEOUT hWaveOut);
265 UINT WINAPI waveOutBreakLoop(HWAVEOUT hWaveOut);
266 UINT WINAPI waveOutGetPosition(HWAVEOUT hWaveOut, MMTIME FAR* lpInfo,
268 UINT WINAPI waveOutGetPitch(HWAVEOUT hWaveOut, DWORD FAR* lpdwPitch);
269 UINT WINAPI waveOutSetPitch(HWAVEOUT hWaveOut, DWORD dwPitch);
270 UINT WINAPI waveOutGetPlaybackRate(HWAVEOUT hWaveOut, DWORD FAR* lpdwRate);
271 UINT WINAPI waveOutSetPlaybackRate(HWAVEOUT hWaveOut, DWORD dwRate);
272 UINT WINAPI waveOutGetID(HWAVEOUT hWaveOut, UINT FAR* lpuDeviceID);
274 DWORD WINAPI waveOutMessage(HWAVEOUT hWaveOut, UINT uMessage, DWORD dw1, DWORD dw2);
276 UINT WINAPI waveInGetNumDevs(void);
277 UINT WINAPI waveInGetDevCaps(UINT uDeviceID, WAVEINCAPS FAR* lpCaps,
279 UINT WINAPI waveInGetErrorText(UINT uError, LPSTR lpText, UINT uSize);
280 UINT WINAPI waveInOpen(HWAVEIN FAR* lphWaveIn, UINT uDeviceID,
281 const WAVEFORMAT FAR* lpFormat, DWORD dwCallback, DWORD dwInstance, DWORD dwFlags);
282 UINT WINAPI waveInClose(HWAVEIN hWaveIn);
283 UINT WINAPI waveInPrepareHeader(HWAVEIN hWaveIn,
284 WAVEHDR FAR* lpWaveInHdr, UINT uSize);
285 UINT WINAPI waveInUnprepareHeader(HWAVEIN hWaveIn,
286 WAVEHDR FAR* lpWaveInHdr, UINT uSize);
287 UINT WINAPI waveInAddBuffer(HWAVEIN hWaveIn,
288 WAVEHDR FAR* lpWaveInHdr, UINT uSize);
289 UINT WINAPI waveInStart(HWAVEIN hWaveIn);
290 UINT WINAPI waveInStop(HWAVEIN hWaveIn);
291 UINT WINAPI waveInReset(HWAVEIN hWaveIn);
292 UINT WINAPI waveInGetPosition(HWAVEIN hWaveIn, MMTIME FAR* lpInfo,
294 UINT WINAPI waveInGetID(HWAVEIN hWaveIn, UINT FAR* lpuDeviceID);
296 DWORD WINAPI waveInMessage(HWAVEIN hWaveIn, UINT uMessage, DWORD dw1, DWORD dw2);
298 #define MIDIERR_UNPREPARED (MIDIERR_BASE + 0) /* header not prepared */
299 #define MIDIERR_STILLPLAYING (MIDIERR_BASE + 1) /* still something playing */
300 #define MIDIERR_NOMAP (MIDIERR_BASE + 2) /* no current map */
301 #define MIDIERR_NOTREADY (MIDIERR_BASE + 3) /* hardware is still busy */
302 #define MIDIERR_NODEVICE (MIDIERR_BASE + 4) /* port no longer connected */
303 #define MIDIERR_INVALIDSETUP (MIDIERR_BASE + 5) /* invalid setup */
304 #define MIDIERR_LASTERROR (MIDIERR_BASE + 5) /* last error in range */
306 DECLARE_HANDLE(HMIDI);
307 DECLARE_HANDLE(HMIDIIN);
308 DECLARE_HANDLE(HMIDIOUT);
309 typedef HMIDIIN FAR *LPHMIDIIN;
310 typedef HMIDIOUT FAR *LPHMIDIOUT;
311 typedef DRVCALLBACK MIDICALLBACK;
312 typedef MIDICALLBACK FAR *LPMIDICALLBACK;
313 #define MIDIPATCHSIZE 128
314 typedef WORD PATCHARRAY[MIDIPATCHSIZE];
315 typedef WORD FAR *LPPATCHARRAY;
316 typedef WORD KEYARRAY[MIDIPATCHSIZE];
317 typedef WORD FAR *LPKEYARRAY;
319 #define MIM_OPEN MM_MIM_OPEN
320 #define MIM_CLOSE MM_MIM_CLOSE
321 #define MIM_DATA MM_MIM_DATA
322 #define MIM_LONGDATA MM_MIM_LONGDATA
323 #define MIM_ERROR MM_MIM_ERROR
324 #define MIM_LONGERROR MM_MIM_LONGERROR
325 #define MOM_OPEN MM_MOM_OPEN
326 #define MOM_CLOSE MM_MOM_CLOSE
327 #define MOM_DONE MM_MOM_DONE
329 #define MIDIMAPPER (-1)
330 #define MIDI_MAPPER (-1)
332 /* flags for wFlags parm of
333 midiOutCachePatches(),
334 midiOutCacheDrumPatches() */
335 #define MIDI_CACHE_ALL 1
336 #define MIDI_CACHE_BESTFIT 2
337 #define MIDI_CACHE_QUERY 3
338 #define MIDI_UNCACHE 4
341 UINT wMid; /* manufacturer ID */
342 UINT wPid; /* product ID */
343 VERSION vDriverVersion; /* version of the driver */
344 char szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
345 UINT wTechnology; /* type of device */
346 UINT wVoices; /* # of voices (internal synth only) */
347 UINT wNotes; /* max # of notes (internal synth only) */
348 UINT wChannelMask; /* channels used (internal synth only) */
349 DWORD dwSupport; /* functionality supported by driver */
351 typedef MIDIOUTCAPS FAR *LPMIDIOUTCAPS;
353 #define MOD_MIDIPORT 1 /* output port */
354 #define MOD_SYNTH 2 /* generic internal synth */
355 #define MOD_SQSYNTH 3 /* square wave internal synth */
356 #define MOD_FMSYNTH 4 /* FM internal synth */
357 #define MOD_MAPPER 5 /* MIDI mapper */
359 #define MIDICAPS_VOLUME 0x0001 /* supports volume control */
360 #define MIDICAPS_LRVOLUME 0x0002 /* separate left-right volume control */
361 #define MIDICAPS_CACHE 0x0004
364 UINT wMid; /* manufacturer ID */
365 UINT wPid; /* product ID */
366 VERSION vDriverVersion; /* version of the driver */
367 char szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
369 typedef MIDIINCAPS FAR *LPMIDIINCAPS;
372 LPSTR lpData; /* pointer to locked data block */
373 DWORD dwBufferLength; /* length of data in data block */
374 DWORD dwBytesRecorded; /* used for input only */
375 DWORD dwUser; /* for client's use */
376 DWORD dwFlags; /* assorted flags (see defines) */
377 struct midihdr_tag FAR *lpNext; /* reserved for driver */
378 DWORD reserved; /* reserved for driver */
380 typedef MIDIHDR FAR *LPMIDIHDR;
382 #define MHDR_DONE 0x00000001 /* done bit */
383 #define MHDR_PREPARED 0x00000002 /* set if header prepared */
384 #define MHDR_INQUEUE 0x00000004 /* reserved for driver */
386 UINT WINAPI midiOutGetNumDevs(void);
387 UINT WINAPI midiOutGetDevCaps(UINT uDeviceID,
388 MIDIOUTCAPS FAR* lpCaps, UINT uSize);
389 UINT WINAPI midiOutGetVolume(UINT uDeviceID, DWORD FAR* lpdwVolume);
390 UINT WINAPI midiOutSetVolume(UINT uDeviceID, DWORD dwVolume);
391 UINT WINAPI midiOutGetErrorText(UINT uError, LPSTR lpText, UINT uSize);
392 UINT WINAPI midiGetErrorText(UINT uError, LPSTR lpText, UINT uSize);
393 UINT WINAPI midiOutOpen(HMIDIOUT FAR* lphMidiOut, UINT uDeviceID,
394 DWORD dwCallback, DWORD dwInstance, DWORD dwFlags);
395 UINT WINAPI midiOutClose(HMIDIOUT hMidiOut);
396 UINT WINAPI midiOutPrepareHeader(HMIDIOUT hMidiOut,
397 MIDIHDR FAR* lpMidiOutHdr, UINT uSize);
398 UINT WINAPI midiOutUnprepareHeader(HMIDIOUT hMidiOut,
399 MIDIHDR FAR* lpMidiOutHdr, UINT uSize);
400 UINT WINAPI midiOutShortMsg(HMIDIOUT hMidiOut, DWORD dwMsg);
401 UINT WINAPI midiOutLongMsg(HMIDIOUT hMidiOut,
402 MIDIHDR FAR* lpMidiOutHdr, UINT uSize);
403 UINT WINAPI midiOutReset(HMIDIOUT hMidiOut);
404 UINT WINAPI midiOutCachePatches(HMIDIOUT hMidiOut,
405 UINT uBank, WORD FAR* lpwPatchArray, UINT uFlags);
406 UINT WINAPI midiOutCacheDrumPatches(HMIDIOUT hMidiOut,
407 UINT uPatch, WORD FAR* lpwKeyArray, UINT uFlags);
408 UINT WINAPI midiOutGetID(HMIDIOUT hMidiOut, UINT FAR* lpuDeviceID);
410 DWORD WINAPI midiOutMessage(HMIDIOUT hMidiOut, UINT uMessage, DWORD dw1, DWORD dw2);
412 UINT WINAPI midiInGetNumDevs(void);
413 UINT WINAPI midiInGetDevCaps(UINT uDeviceID,
414 LPMIDIINCAPS lpCaps, UINT uSize);
415 UINT WINAPI midiInGetErrorText(UINT uError, LPSTR lpText, UINT uSize);
416 UINT WINAPI midiInOpen(HMIDIIN FAR* lphMidiIn, UINT uDeviceID,
417 DWORD dwCallback, DWORD dwInstance, DWORD dwFlags);
418 UINT WINAPI midiInClose(HMIDIIN hMidiIn);
419 UINT WINAPI midiInPrepareHeader(HMIDIIN hMidiIn,
420 MIDIHDR FAR* lpMidiInHdr, UINT uSize);
421 UINT WINAPI midiInUnprepareHeader(HMIDIIN hMidiIn,
422 MIDIHDR FAR* lpMidiInHdr, UINT uSize);
423 UINT WINAPI midiInAddBuffer(HMIDIIN hMidiIn,
424 MIDIHDR FAR* lpMidiInHdr, UINT uSize);
425 UINT WINAPI midiInStart(HMIDIIN hMidiIn);
426 UINT WINAPI midiInStop(HMIDIIN hMidiIn);
427 UINT WINAPI midiInReset(HMIDIIN hMidiIn);
428 UINT WINAPI midiInGetID(HMIDIIN hMidiIn, UINT FAR* lpuDeviceID);
430 DWORD WINAPI midiInMessage(HMIDIIN hMidiIn, UINT uMessage, DWORD dw1, DWORD dw2);
432 #define AUX_MAPPER (-1)
435 UINT wMid; /* manufacturer ID */
436 UINT wPid; /* product ID */
437 VERSION vDriverVersion; /* version of the driver */
438 char szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
439 UINT wTechnology; /* type of device */
440 DWORD dwSupport; /* functionality supported by driver */
442 typedef AUXCAPS FAR *LPAUXCAPS;
444 #define AUXCAPS_CDAUDIO 1 /* audio from internal CD-ROM drive */
445 #define AUXCAPS_AUXIN 2 /* audio from auxiliary input jacks */
447 #define AUXCAPS_VOLUME 0x0001 /* supports volume control */
448 #define AUXCAPS_LRVOLUME 0x0002 /* separate left-right volume control */
450 UINT WINAPI auxGetNumDevs(void);
451 UINT WINAPI auxGetDevCaps(UINT uDeviceID, AUXCAPS FAR* lpCaps, UINT uSize);
452 UINT WINAPI auxSetVolume(UINT uDeviceID, DWORD dwVolume);
453 UINT WINAPI auxGetVolume(UINT uDeviceID, DWORD FAR* lpdwVolume);
455 DWORD WINAPI auxOutMessage(UINT uDeviceID, UINT uMessage, DWORD dw1, DWORD dw2);
457 #define TIMERR_NOERROR (0) /* no error */
458 #define TIMERR_NOCANDO (TIMERR_BASE+1) /* request not completed */
459 #define TIMERR_STRUCT (TIMERR_BASE+33) /* time struct size */
461 typedef void (CALLBACK TIMECALLBACK) (UINT uTimerID, UINT uMessage, DWORD dwUser, DWORD dw1, DWORD dw2);
463 typedef TIMECALLBACK FAR *LPTIMECALLBACK;
465 #define TIME_ONESHOT 0 /* program timer for single event */
466 #define TIME_PERIODIC 1 /* program for continuous periodic event */
469 UINT wPeriodMin; /* minimum period supported */
470 UINT wPeriodMax; /* maximum period supported */
472 typedef TIMECAPS FAR *LPTIMECAPS;
474 UINT WINAPI timeGetSystemTime(MMTIME FAR* lpTime, UINT uSize);
475 DWORD WINAPI timeGetTime(void);
476 UINT WINAPI timeSetEvent(UINT uDelay, UINT uResolution,
477 LPTIMECALLBACK lpFunction, DWORD dwUser, UINT uFlags);
478 UINT WINAPI timeKillEvent(UINT uTimerID);
479 UINT WINAPI timeGetDevCaps(TIMECAPS FAR* lpTimeCaps, UINT uSize);
480 UINT WINAPI timeBeginPeriod(UINT uPeriod);
481 UINT WINAPI timeEndPeriod(UINT uPeriod);
483 #define JOYERR_NOERROR (0) /* no error */
484 #define JOYERR_PARMS (JOYERR_BASE+5) /* bad parameters */
485 #define JOYERR_NOCANDO (JOYERR_BASE+6) /* request not completed */
486 #define JOYERR_UNPLUGGED (JOYERR_BASE+7) /* joystick is unplugged */
488 #define JOY_BUTTON1 0x0001
489 #define JOY_BUTTON2 0x0002
490 #define JOY_BUTTON3 0x0004
491 #define JOY_BUTTON4 0x0008
492 #define JOY_BUTTON1CHG 0x0100
493 #define JOY_BUTTON2CHG 0x0200
494 #define JOY_BUTTON3CHG 0x0400
495 #define JOY_BUTTON4CHG 0x0800
497 #define JOYSTICKID1 0
498 #define JOYSTICKID2 1
501 UINT wMid; /* manufacturer ID */
502 UINT wPid; /* product ID */
503 char szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */
504 UINT wXmin; /* minimum x position value */
505 UINT wXmax; /* maximum x position value */
506 UINT wYmin; /* minimum y position value */
507 UINT wYmax; /* maximum y position value */
508 UINT wZmin; /* minimum z position value */
509 UINT wZmax; /* maximum z position value */
510 UINT wNumButtons; /* number of buttons */
511 UINT wPeriodMin; /* minimum message period when captured */
512 UINT wPeriodMax; /* maximum message period when captured */
514 typedef JOYCAPS FAR *LPJOYCAPS;
517 UINT wXpos; /* x position */
518 UINT wYpos; /* y position */
519 UINT wZpos; /* z position */
520 UINT wButtons; /* button states */
522 typedef JOYINFO FAR *LPJOYINFO;
524 UINT WINAPI joyGetDevCaps(UINT uJoyID, JOYCAPS FAR* lpCaps, UINT uSize);
525 UINT WINAPI joyGetNumDevs(void);
526 UINT WINAPI joyGetPos(UINT uJoyID, JOYINFO FAR* lpInfo);
527 UINT WINAPI joyGetThreshold(UINT uJoyID, UINT FAR* lpuThreshold);
528 UINT WINAPI joyReleaseCapture(UINT uJoyID);
529 UINT WINAPI joySetCapture(HWND hwnd, UINT uJoyID, UINT uPeriod,
531 UINT WINAPI joySetThreshold(UINT uJoyID, UINT uThreshold);
533 #define MMIOERR_BASE 256
534 #define MMIOERR_FILENOTFOUND (MMIOERR_BASE + 1) /* file not found */
535 #define MMIOERR_OUTOFMEMORY (MMIOERR_BASE + 2) /* out of memory */
536 #define MMIOERR_CANNOTOPEN (MMIOERR_BASE + 3) /* cannot open */
537 #define MMIOERR_CANNOTCLOSE (MMIOERR_BASE + 4) /* cannot close */
538 #define MMIOERR_CANNOTREAD (MMIOERR_BASE + 5) /* cannot read */
539 #define MMIOERR_CANNOTWRITE (MMIOERR_BASE + 6) /* cannot write */
540 #define MMIOERR_CANNOTSEEK (MMIOERR_BASE + 7) /* cannot seek */
541 #define MMIOERR_CANNOTEXPAND (MMIOERR_BASE + 8) /* cannot expand file */
542 #define MMIOERR_CHUNKNOTFOUND (MMIOERR_BASE + 9) /* chunk not found */
543 #define MMIOERR_UNBUFFERED (MMIOERR_BASE + 10) /* file is unbuffered */
545 #define CFSEPCHAR '+' /* compound file name separator char. */
547 typedef DWORD FOURCC; /* a four character code */
548 DECLARE_HANDLE(HMMIO); /* a handle to an open file */
549 typedef LRESULT (CALLBACK MMIOPROC)(LPSTR lpmmioinfo, UINT uMessage,
550 LPARAM lParam1, LPARAM lParam2);
551 typedef MMIOPROC FAR *LPMMIOPROC;
554 DWORD dwFlags; /* general status flags */
555 FOURCC fccIOProc; /* pointer to I/O procedure */
556 LPMMIOPROC pIOProc; /* pointer to I/O procedure */
557 UINT wErrorRet; /* place for error to be returned */
558 HTASK htask; /* alternate local task */
559 /* fields maintained by MMIO functions during buffered I/O */
560 LONG cchBuffer; /* size of I/O buffer (or 0L) */
561 HPSTR pchBuffer; /* start of I/O buffer (or NULL) */
562 HPSTR pchNext; /* pointer to next byte to read/write */
563 HPSTR pchEndRead; /* pointer to last valid byte to read */
564 HPSTR pchEndWrite; /* pointer to last byte to write */
565 LONG lBufOffset; /* disk offset of start of buffer */
566 /* fields maintained by I/O procedure */
567 LONG lDiskOffset; /* disk offset of next read or write */
568 DWORD adwInfo[3]; /* data specific to type of MMIOPROC */
569 /* other fields maintained by MMIO */
570 DWORD dwReserved1; /* reserved for MMIO use */
571 DWORD dwReserved2; /* reserved for MMIO use */
572 HMMIO hmmio; /* handle to open file */
574 typedef MMIOINFO FAR *LPMMIOINFO;
576 typedef struct _MMCKINFO
578 FOURCC ckid; /* chunk ID */
579 DWORD cksize; /* chunk size */
580 FOURCC fccType; /* form type or list type */
581 DWORD dwDataOffset; /* offset of data portion of chunk */
582 DWORD dwFlags; /* flags used by MMIO functions */
584 typedef MMCKINFO FAR *LPMMCKINFO;
586 #define MMIO_RWMODE 0x00000003 /* open file for reading/writing/both */
587 #define MMIO_SHAREMODE 0x00000070 /* file sharing mode number */
589 #define MMIO_CREATE 0x00001000 /* create new file (or truncate file) */
590 #define MMIO_PARSE 0x00000100 /* parse new file returning path */
591 #define MMIO_DELETE 0x00000200 /* create new file (or truncate file) */
592 #define MMIO_EXIST 0x00004000 /* checks for existence of file */
593 #define MMIO_ALLOCBUF 0x00010000 /* mmioOpen() should allocate a buffer */
594 #define MMIO_GETTEMP 0x00020000 /* mmioOpen() should retrieve temp name */
596 #define MMIO_DIRTY 0x10000000 /* I/O buffer is dirty */
598 #define MMIO_READ 0x00000000 /* open file for reading only */
599 #define MMIO_WRITE 0x00000001 /* open file for writing only */
600 #define MMIO_READWRITE 0x00000002 /* open file for reading and writing */
602 #define MMIO_COMPAT 0x00000000 /* compatibility mode */
603 #define MMIO_EXCLUSIVE 0x00000010 /* exclusive-access mode */
604 #define MMIO_DENYWRITE 0x00000020 /* deny writing to other processes */
605 #define MMIO_DENYREAD 0x00000030 /* deny reading to other processes */
606 #define MMIO_DENYNONE 0x00000040 /* deny nothing to other processes */
608 #define MMIO_FHOPEN 0x0010 /* mmioClose: keep file handle open */
609 #define MMIO_EMPTYBUF 0x0010 /* mmioFlush: empty the I/O buffer */
610 #define MMIO_TOUPPER 0x0010 /* mmioStringToFOURCC: to u-case */
611 #define MMIO_INSTALLPROC 0x00010000 /* mmioInstallIOProc: install MMIOProc */
612 #define MMIO_GLOBALPROC 0x10000000 /* mmioInstallIOProc: install globally */
613 #define MMIO_REMOVEPROC 0x00020000 /* mmioInstallIOProc: remove MMIOProc */
614 #define MMIO_FINDPROC 0x00040000 /* mmioInstallIOProc: find an MMIOProc */
615 #define MMIO_FINDCHUNK 0x0010 /* mmioDescend: find a chunk by ID */
616 #define MMIO_FINDRIFF 0x0020 /* mmioDescend: find a LIST chunk */
617 #define MMIO_FINDLIST 0x0040 /* mmioDescend: find a RIFF chunk */
618 #define MMIO_CREATERIFF 0x0020 /* mmioCreateChunk: make a LIST chunk */
619 #define MMIO_CREATELIST 0x0040 /* mmioCreateChunk: make a RIFF chunk */
621 #define MMIOM_READ MMIO_READ /* read */
622 #define MMIOM_WRITE MMIO_WRITE /* write */
623 #define MMIOM_SEEK 2 /* seek to a new position in file */
624 #define MMIOM_OPEN 3 /* open file */
625 #define MMIOM_CLOSE 4 /* close file */
626 #define MMIOM_WRITEFLUSH 5 /* write and flush */
628 #define MMIOM_RENAME 6 /* rename specified file */
630 #define MMIOM_USER 0x8000 /* beginning of user-defined messages */
632 #define FOURCC_RIFF mmioFOURCC('R', 'I', 'F', 'F')
633 #define FOURCC_LIST mmioFOURCC('L', 'I', 'S', 'T')
635 #define FOURCC_DOS mmioFOURCC('D', 'O', 'S', ' ')
636 #define FOURCC_MEM mmioFOURCC('M', 'E', 'M', ' ')
638 #define MMIO_DEFAULTBUFFER 8192 /* default buffer size */
640 #define mmioFOURCC( ch0, ch1, ch2, ch3 ) \
641 ( (DWORD)(BYTE)(ch0) | ( (DWORD)(BYTE)(ch1) << 8 ) | \
642 ( (DWORD)(BYTE)(ch2) << 16 ) | ( (DWORD)(BYTE)(ch3) << 24 ) )
644 FOURCC WINAPI mmioStringToFOURCC(LPCSTR sz, UINT uFlags);
645 LPMMIOPROC WINAPI mmioInstallIOProc(FOURCC fccIOProc, LPMMIOPROC pIOProc,
647 HMMIO WINAPI mmioOpen(LPSTR szFileName, MMIOINFO FAR* lpmmioinfo,
650 UINT WINAPI mmioRename(LPCSTR szFileName, LPCSTR szNewFileName,
651 MMIOINFO FAR* lpmmioinfo, DWORD dwRenameFlags);
653 UINT WINAPI mmioClose(HMMIO hmmio, UINT uFlags);
654 LONG WINAPI mmioRead(HMMIO hmmio, HPSTR pch, LONG cch);
655 LONG WINAPI mmioWrite(HMMIO hmmio, HPCSTR pch, LONG cch);
656 LONG WINAPI mmioSeek(HMMIO hmmio, LONG lOffset, int iOrigin);
657 UINT WINAPI mmioGetInfo(HMMIO hmmio, MMIOINFO FAR* lpmmioinfo, UINT uFlags);
658 UINT WINAPI mmioSetInfo(HMMIO hmmio, const MMIOINFO FAR* lpmmioinfo, UINT uFlags);
659 UINT WINAPI mmioSetBuffer(HMMIO hmmio, LPSTR pchBuffer, LONG cchBuffer,
661 UINT WINAPI mmioFlush(HMMIO hmmio, UINT uFlags);
662 UINT WINAPI mmioAdvance(HMMIO hmmio, MMIOINFO FAR* lpmmioinfo, UINT uFlags);
663 LRESULT WINAPI mmioSendMessage(HMMIO hmmio, UINT uMessage,
664 LPARAM lParam1, LPARAM lParam2);
665 UINT WINAPI mmioDescend(HMMIO hmmio, MMCKINFO FAR* lpck,
666 const MMCKINFO FAR* lpckParent, UINT uFlags);
667 UINT WINAPI mmioAscend(HMMIO hmmio, MMCKINFO FAR* lpck, UINT uFlags);
668 UINT WINAPI mmioCreateChunk(HMMIO hmmio, MMCKINFO FAR* lpck, UINT uFlags);
670 typedef UINT (CALLBACK *YIELDPROC) (UINT uDeviceID, DWORD dwYieldData);
672 DWORD WINAPI mciSendCommand (UINT uDeviceID, UINT uMessage,
673 DWORD dwParam1, DWORD dwParam2);
674 DWORD WINAPI mciSendString (LPCSTR lpstrCommand,
675 LPSTR lpstrReturnString, UINT uReturnLength, HWND hwndCallback);
676 UINT WINAPI mciGetDeviceID (LPCSTR lpstrName);
677 UINT WINAPI mciGetDeviceIDFromElementID (DWORD dwElementID,
679 BOOL WINAPI mciGetErrorString (DWORD wError, LPSTR lpstrBuffer,
681 BOOL WINAPI mciSetYieldProc (UINT uDeviceID, YIELDPROC fpYieldProc,
684 HTASK WINAPI mciGetCreatorTask(UINT uDeviceID);
685 YIELDPROC WINAPI mciGetYieldProc (UINT uDeviceID, DWORD FAR* lpdwYieldData);
687 #define MCIERR_INVALID_DEVICE_ID (MCIERR_BASE + 1)
688 #define MCIERR_UNRECOGNIZED_KEYWORD (MCIERR_BASE + 3)
689 #define MCIERR_UNRECOGNIZED_COMMAND (MCIERR_BASE + 5)
690 #define MCIERR_HARDWARE (MCIERR_BASE + 6)
691 #define MCIERR_INVALID_DEVICE_NAME (MCIERR_BASE + 7)
692 #define MCIERR_OUT_OF_MEMORY (MCIERR_BASE + 8)
693 #define MCIERR_DEVICE_OPEN (MCIERR_BASE + 9)
694 #define MCIERR_CANNOT_LOAD_DRIVER (MCIERR_BASE + 10)
695 #define MCIERR_MISSING_COMMAND_STRING (MCIERR_BASE + 11)
696 #define MCIERR_PARAM_OVERFLOW (MCIERR_BASE + 12)
697 #define MCIERR_MISSING_STRING_ARGUMENT (MCIERR_BASE + 13)
698 #define MCIERR_BAD_INTEGER (MCIERR_BASE + 14)
699 #define MCIERR_PARSER_INTERNAL (MCIERR_BASE + 15)
700 #define MCIERR_DRIVER_INTERNAL (MCIERR_BASE + 16)
701 #define MCIERR_MISSING_PARAMETER (MCIERR_BASE + 17)
702 #define MCIERR_UNSUPPORTED_FUNCTION (MCIERR_BASE + 18)
703 #define MCIERR_FILE_NOT_FOUND (MCIERR_BASE + 19)
704 #define MCIERR_DEVICE_NOT_READY (MCIERR_BASE + 20)
705 #define MCIERR_INTERNAL (MCIERR_BASE + 21)
706 #define MCIERR_DRIVER (MCIERR_BASE + 22)
707 #define MCIERR_CANNOT_USE_ALL (MCIERR_BASE + 23)
708 #define MCIERR_MULTIPLE (MCIERR_BASE + 24)
709 #define MCIERR_EXTENSION_NOT_FOUND (MCIERR_BASE + 25)
710 #define MCIERR_OUTOFRANGE (MCIERR_BASE + 26)
711 #define MCIERR_FLAGS_NOT_COMPATIBLE (MCIERR_BASE + 28)
712 #define MCIERR_FILE_NOT_SAVED (MCIERR_BASE + 30)
713 #define MCIERR_DEVICE_TYPE_REQUIRED (MCIERR_BASE + 31)
714 #define MCIERR_DEVICE_LOCKED (MCIERR_BASE + 32)
715 #define MCIERR_DUPLICATE_ALIAS (MCIERR_BASE + 33)
716 #define MCIERR_BAD_CONSTANT (MCIERR_BASE + 34)
717 #define MCIERR_MUST_USE_SHAREABLE (MCIERR_BASE + 35)
718 #define MCIERR_MISSING_DEVICE_NAME (MCIERR_BASE + 36)
719 #define MCIERR_BAD_TIME_FORMAT (MCIERR_BASE + 37)
720 #define MCIERR_NO_CLOSING_QUOTE (MCIERR_BASE + 38)
721 #define MCIERR_DUPLICATE_FLAGS (MCIERR_BASE + 39)
722 #define MCIERR_INVALID_FILE (MCIERR_BASE + 40)
723 #define MCIERR_NULL_PARAMETER_BLOCK (MCIERR_BASE + 41)
724 #define MCIERR_UNNAMED_RESOURCE (MCIERR_BASE + 42)
725 #define MCIERR_NEW_REQUIRES_ALIAS (MCIERR_BASE + 43)
726 #define MCIERR_NOTIFY_ON_AUTO_OPEN (MCIERR_BASE + 44)
727 #define MCIERR_NO_ELEMENT_ALLOWED (MCIERR_BASE + 45)
728 #define MCIERR_NONAPPLICABLE_FUNCTION (MCIERR_BASE + 46)
729 #define MCIERR_ILLEGAL_FOR_AUTO_OPEN (MCIERR_BASE + 47)
730 #define MCIERR_FILENAME_REQUIRED (MCIERR_BASE + 48)
731 #define MCIERR_EXTRA_CHARACTERS (MCIERR_BASE + 49)
732 #define MCIERR_DEVICE_NOT_INSTALLED (MCIERR_BASE + 50)
733 #define MCIERR_GET_CD (MCIERR_BASE + 51)
734 #define MCIERR_SET_CD (MCIERR_BASE + 52)
735 #define MCIERR_SET_DRIVE (MCIERR_BASE + 53)
736 #define MCIERR_DEVICE_LENGTH (MCIERR_BASE + 54)
737 #define MCIERR_DEVICE_ORD_LENGTH (MCIERR_BASE + 55)
738 #define MCIERR_NO_INTEGER (MCIERR_BASE + 56)
740 #define MCIERR_WAVE_OUTPUTSINUSE (MCIERR_BASE + 64)
741 #define MCIERR_WAVE_SETOUTPUTINUSE (MCIERR_BASE + 65)
742 #define MCIERR_WAVE_INPUTSINUSE (MCIERR_BASE + 66)
743 #define MCIERR_WAVE_SETINPUTINUSE (MCIERR_BASE + 67)
744 #define MCIERR_WAVE_OUTPUTUNSPECIFIED (MCIERR_BASE + 68)
745 #define MCIERR_WAVE_INPUTUNSPECIFIED (MCIERR_BASE + 69)
746 #define MCIERR_WAVE_OUTPUTSUNSUITABLE (MCIERR_BASE + 70)
747 #define MCIERR_WAVE_SETOUTPUTUNSUITABLE (MCIERR_BASE + 71)
748 #define MCIERR_WAVE_INPUTSUNSUITABLE (MCIERR_BASE + 72)
749 #define MCIERR_WAVE_SETINPUTUNSUITABLE (MCIERR_BASE + 73)
751 #define MCIERR_SEQ_DIV_INCOMPATIBLE (MCIERR_BASE + 80)
752 #define MCIERR_SEQ_PORT_INUSE (MCIERR_BASE + 81)
753 #define MCIERR_SEQ_PORT_NONEXISTENT (MCIERR_BASE + 82)
754 #define MCIERR_SEQ_PORT_MAPNODEVICE (MCIERR_BASE + 83)
755 #define MCIERR_SEQ_PORT_MISCERROR (MCIERR_BASE + 84)
756 #define MCIERR_SEQ_TIMER (MCIERR_BASE + 85)
757 #define MCIERR_SEQ_PORTUNSPECIFIED (MCIERR_BASE + 86)
758 #define MCIERR_SEQ_NOMIDIPRESENT (MCIERR_BASE + 87)
760 #define MCIERR_NO_WINDOW (MCIERR_BASE + 90)
761 #define MCIERR_CREATEWINDOW (MCIERR_BASE + 91)
762 #define MCIERR_FILE_READ (MCIERR_BASE + 92)
763 #define MCIERR_FILE_WRITE (MCIERR_BASE + 93)
765 #define MCIERR_CUSTOM_DRIVER_BASE (MCIERR_BASE + 256)
767 #define MCI_OPEN 0x0803
768 #define MCI_CLOSE 0x0804
769 #define MCI_ESCAPE 0x0805
770 #define MCI_PLAY 0x0806
771 #define MCI_SEEK 0x0807
772 #define MCI_STOP 0x0808
773 #define MCI_PAUSE 0x0809
774 #define MCI_INFO 0x080A
775 #define MCI_GETDEVCAPS 0x080B
776 #define MCI_SPIN 0x080C
777 #define MCI_SET 0x080D
778 #define MCI_STEP 0x080E
779 #define MCI_RECORD 0x080F
780 #define MCI_SYSINFO 0x0810
781 #define MCI_BREAK 0x0811
782 #define MCI_SOUND 0x0812
783 #define MCI_SAVE 0x0813
784 #define MCI_STATUS 0x0814
785 #define MCI_CUE 0x0830
786 #define MCI_REALIZE 0x0840
787 #define MCI_WINDOW 0x0841
788 #define MCI_PUT 0x0842
789 #define MCI_WHERE 0x0843
790 #define MCI_FREEZE 0x0844
791 #define MCI_UNFREEZE 0x0845
792 #define MCI_LOAD 0x0850
793 #define MCI_CUT 0x0851
794 #define MCI_COPY 0x0852
795 #define MCI_PASTE 0x0853
796 #define MCI_UPDATE 0x0854
797 #define MCI_RESUME 0x0855
798 #define MCI_DELETE 0x0856
800 #define MCI_USER_MESSAGES (0x400 + DRV_MCI_FIRST)
802 #define MCI_ALL_DEVICE_ID 0xFFFF
804 #define MCI_DEVTYPE_VCR (MCI_STRING_OFFSET + 1)
805 #define MCI_DEVTYPE_VIDEODISC (MCI_STRING_OFFSET + 2)
806 #define MCI_DEVTYPE_OVERLAY (MCI_STRING_OFFSET + 3)
807 #define MCI_DEVTYPE_CD_AUDIO (MCI_STRING_OFFSET + 4)
808 #define MCI_DEVTYPE_DAT (MCI_STRING_OFFSET + 5)
809 #define MCI_DEVTYPE_SCANNER (MCI_STRING_OFFSET + 6)
810 #define MCI_DEVTYPE_ANIMATION (MCI_STRING_OFFSET + 7)
811 #define MCI_DEVTYPE_DIGITAL_VIDEO (MCI_STRING_OFFSET + 8)
812 #define MCI_DEVTYPE_OTHER (MCI_STRING_OFFSET + 9)
813 #define MCI_DEVTYPE_WAVEFORM_AUDIO (MCI_STRING_OFFSET + 10)
814 #define MCI_DEVTYPE_SEQUENCER (MCI_STRING_OFFSET + 11)
816 #define MCI_DEVTYPE_FIRST MCI_DEVTYPE_VCR
817 #define MCI_DEVTYPE_LAST MCI_DEVTYPE_SEQUENCER
819 #define MCI_MODE_NOT_READY (MCI_STRING_OFFSET + 12)
820 #define MCI_MODE_STOP (MCI_STRING_OFFSET + 13)
821 #define MCI_MODE_PLAY (MCI_STRING_OFFSET + 14)
822 #define MCI_MODE_RECORD (MCI_STRING_OFFSET + 15)
823 #define MCI_MODE_SEEK (MCI_STRING_OFFSET + 16)
824 #define MCI_MODE_PAUSE (MCI_STRING_OFFSET + 17)
825 #define MCI_MODE_OPEN (MCI_STRING_OFFSET + 18)
827 #define MCI_FORMAT_MILLISECONDS 0
828 #define MCI_FORMAT_HMS 1
829 #define MCI_FORMAT_MSF 2
830 #define MCI_FORMAT_FRAMES 3
831 #define MCI_FORMAT_SMPTE_24 4
832 #define MCI_FORMAT_SMPTE_25 5
833 #define MCI_FORMAT_SMPTE_30 6
834 #define MCI_FORMAT_SMPTE_30DROP 7
835 #define MCI_FORMAT_BYTES 8
836 #define MCI_FORMAT_SAMPLES 9
837 #define MCI_FORMAT_TMSF 10
839 #define MCI_MSF_MINUTE(msf) ((BYTE)(msf))
840 #define MCI_MSF_SECOND(msf) ((BYTE)(((WORD)(msf)) >> 8))
841 #define MCI_MSF_FRAME(msf) ((BYTE)((msf)>>16))
843 #define MCI_MAKE_MSF(m, s, f) ((DWORD)(((BYTE)(m) | \
845 (((DWORD)(BYTE)(f))<<16)))
847 #define MCI_TMSF_TRACK(tmsf) ((BYTE)(tmsf))
848 #define MCI_TMSF_MINUTE(tmsf) ((BYTE)(((WORD)(tmsf)) >> 8))
849 #define MCI_TMSF_SECOND(tmsf) ((BYTE)((tmsf)>>16))
850 #define MCI_TMSF_FRAME(tmsf) ((BYTE)((tmsf)>>24))
852 #define MCI_MAKE_TMSF(t, m, s, f) ((DWORD)(((BYTE)(t) | \
854 (((DWORD)(BYTE)(s) | \
855 ((WORD)(f)<<8))<<16)))
857 #define MCI_HMS_HOUR(hms) ((BYTE)(hms))
858 #define MCI_HMS_MINUTE(hms) ((BYTE)(((WORD)(hms)) >> 8))
859 #define MCI_HMS_SECOND(hms) ((BYTE)((hms)>>16))
861 #define MCI_MAKE_HMS(h, m, s) ((DWORD)(((BYTE)(h) | \
863 (((DWORD)(BYTE)(s))<<16)))
865 #define MCI_NOTIFY_SUCCESSFUL 0x0001
866 #define MCI_NOTIFY_SUPERSEDED 0x0002
867 #define MCI_NOTIFY_ABORTED 0x0004
868 #define MCI_NOTIFY_FAILURE 0x0008
870 #define MCI_NOTIFY 0x00000001L
871 #define MCI_WAIT 0x00000002L
872 #define MCI_FROM 0x00000004L
873 #define MCI_TO 0x00000008L
874 #define MCI_TRACK 0x00000010L
876 #define MCI_OPEN_SHAREABLE 0x00000100L
877 #define MCI_OPEN_ELEMENT 0x00000200L
878 #define MCI_OPEN_ALIAS 0x00000400L
879 #define MCI_OPEN_ELEMENT_ID 0x00000800L
880 #define MCI_OPEN_TYPE_ID 0x00001000L
881 #define MCI_OPEN_TYPE 0x00002000L
883 #define MCI_SEEK_TO_START 0x00000100L
884 #define MCI_SEEK_TO_END 0x00000200L
886 #define MCI_STATUS_ITEM 0x00000100L
887 #define MCI_STATUS_START 0x00000200L
889 #define MCI_STATUS_LENGTH 0x00000001L
890 #define MCI_STATUS_POSITION 0x00000002L
891 #define MCI_STATUS_NUMBER_OF_TRACKS 0x00000003L
892 #define MCI_STATUS_MODE 0x00000004L
893 #define MCI_STATUS_MEDIA_PRESENT 0x00000005L
894 #define MCI_STATUS_TIME_FORMAT 0x00000006L
895 #define MCI_STATUS_READY 0x00000007L
896 #define MCI_STATUS_CURRENT_TRACK 0x00000008L
898 #define MCI_INFO_PRODUCT 0x00000100L
899 #define MCI_INFO_FILE 0x00000200L
901 #define MCI_GETDEVCAPS_ITEM 0x00000100L
903 #define MCI_GETDEVCAPS_CAN_RECORD 0x00000001L
904 #define MCI_GETDEVCAPS_HAS_AUDIO 0x00000002L
905 #define MCI_GETDEVCAPS_HAS_VIDEO 0x00000003L
906 #define MCI_GETDEVCAPS_DEVICE_TYPE 0x00000004L
907 #define MCI_GETDEVCAPS_USES_FILES 0x00000005L
908 #define MCI_GETDEVCAPS_COMPOUND_DEVICE 0x00000006L
909 #define MCI_GETDEVCAPS_CAN_EJECT 0x00000007L
910 #define MCI_GETDEVCAPS_CAN_PLAY 0x00000008L
911 #define MCI_GETDEVCAPS_CAN_SAVE 0x00000009L
913 #define MCI_SYSINFO_QUANTITY 0x00000100L
914 #define MCI_SYSINFO_OPEN 0x00000200L
915 #define MCI_SYSINFO_NAME 0x00000400L
916 #define MCI_SYSINFO_INSTALLNAME 0x00000800L
918 #define MCI_SET_DOOR_OPEN 0x00000100L
919 #define MCI_SET_DOOR_CLOSED 0x00000200L
920 #define MCI_SET_TIME_FORMAT 0x00000400L
921 #define MCI_SET_AUDIO 0x00000800L
922 #define MCI_SET_VIDEO 0x00001000L
923 #define MCI_SET_ON 0x00002000L
924 #define MCI_SET_OFF 0x00004000L
926 #define MCI_SET_AUDIO_ALL 0x00000000L
927 #define MCI_SET_AUDIO_LEFT 0x00000001L
928 #define MCI_SET_AUDIO_RIGHT 0x00000002L
930 #define MCI_BREAK_KEY 0x00000100L
931 #define MCI_BREAK_HWND 0x00000200L
932 #define MCI_BREAK_OFF 0x00000400L
934 #define MCI_RECORD_INSERT 0x00000100L
935 #define MCI_RECORD_OVERWRITE 0x00000200L
937 #define MCI_SOUND_NAME 0x00000100L
939 #define MCI_SAVE_FILE 0x00000100L
941 #define MCI_LOAD_FILE 0x00000100L
946 typedef MCI_GENERIC_PARMS FAR *LPMCI_GENERIC_PARMS;
952 LPCSTR lpstrDeviceType;
953 LPCSTR lpstrElementName;
956 typedef MCI_OPEN_PARMS FAR *LPMCI_OPEN_PARMS;
963 typedef MCI_PLAY_PARMS FAR *LPMCI_PLAY_PARMS;
969 typedef MCI_SEEK_PARMS FAR *LPMCI_SEEK_PARMS;
977 typedef MCI_STATUS_PARMS FAR * LPMCI_STATUS_PARMS;
984 typedef MCI_INFO_PARMS FAR * LPMCI_INFO_PARMS;
990 } MCI_GETDEVCAPS_PARMS;
991 typedef MCI_GETDEVCAPS_PARMS FAR * LPMCI_GETDEVCAPS_PARMS;
1000 } MCI_SYSINFO_PARMS;
1001 typedef MCI_SYSINFO_PARMS FAR * LPMCI_SYSINFO_PARMS;
1008 typedef MCI_SET_PARMS FAR *LPMCI_SET_PARMS;
1017 typedef MCI_BREAK_PARMS FAR * LPMCI_BREAK_PARMS;
1021 LPCSTR lpstrSoundName;
1023 typedef MCI_SOUND_PARMS FAR * LPMCI_SOUND_PARMS;
1029 typedef MCI_SAVE_PARMS FAR * LPMCI_SAVE_PARMS;
1035 typedef MCI_LOAD_PARMS FAR * LPMCI_LOAD_PARMS;
1042 typedef MCI_RECORD_PARMS FAR *LPMCI_RECORD_PARMS;
1044 #define MCI_VD_MODE_PARK (MCI_VD_OFFSET + 1)
1046 #define MCI_VD_MEDIA_CLV (MCI_VD_OFFSET + 2)
1047 #define MCI_VD_MEDIA_CAV (MCI_VD_OFFSET + 3)
1048 #define MCI_VD_MEDIA_OTHER (MCI_VD_OFFSET + 4)
1050 #define MCI_VD_FORMAT_TRACK 0x4001
1052 #define MCI_VD_PLAY_REVERSE 0x00010000L
1053 #define MCI_VD_PLAY_FAST 0x00020000L
1054 #define MCI_VD_PLAY_SPEED 0x00040000L
1055 #define MCI_VD_PLAY_SCAN 0x00080000L
1056 #define MCI_VD_PLAY_SLOW 0x00100000L
1058 #define MCI_VD_SEEK_REVERSE 0x00010000L
1060 #define MCI_VD_STATUS_SPEED 0x00004002L
1061 #define MCI_VD_STATUS_FORWARD 0x00004003L
1062 #define MCI_VD_STATUS_MEDIA_TYPE 0x00004004L
1063 #define MCI_VD_STATUS_SIDE 0x00004005L
1064 #define MCI_VD_STATUS_DISC_SIZE 0x00004006L
1066 #define MCI_VD_GETDEVCAPS_CLV 0x00010000L
1067 #define MCI_VD_GETDEVCAPS_CAV 0x00020000L
1069 #define MCI_VD_SPIN_UP 0x00010000L
1070 #define MCI_VD_SPIN_DOWN 0x00020000L
1072 #define MCI_VD_GETDEVCAPS_CAN_REVERSE 0x00004002L
1073 #define MCI_VD_GETDEVCAPS_FAST_RATE 0x00004003L
1074 #define MCI_VD_GETDEVCAPS_SLOW_RATE 0x00004004L
1075 #define MCI_VD_GETDEVCAPS_NORMAL_RATE 0x00004005L
1077 #define MCI_VD_STEP_FRAMES 0x00010000L
1078 #define MCI_VD_STEP_REVERSE 0x00020000L
1080 #define MCI_VD_ESCAPE_STRING 0x00000100L
1087 } MCI_VD_PLAY_PARMS;
1088 typedef MCI_VD_PLAY_PARMS FAR *LPMCI_VD_PLAY_PARMS;
1093 } MCI_VD_STEP_PARMS;
1094 typedef MCI_VD_STEP_PARMS FAR *LPMCI_VD_STEP_PARMS;
1098 LPCSTR lpstrCommand;
1099 } MCI_VD_ESCAPE_PARMS;
1100 typedef MCI_VD_ESCAPE_PARMS FAR *LPMCI_VD_ESCAPE_PARMS;
1102 #define MCI_WAVE_OPEN_BUFFER 0x00010000L
1104 #define MCI_WAVE_SET_FORMATTAG 0x00010000L
1105 #define MCI_WAVE_SET_CHANNELS 0x00020000L
1106 #define MCI_WAVE_SET_SAMPLESPERSEC 0x00040000L
1107 #define MCI_WAVE_SET_AVGBYTESPERSEC 0x00080000L
1108 #define MCI_WAVE_SET_BLOCKALIGN 0x00100000L
1109 #define MCI_WAVE_SET_BITSPERSAMPLE 0x00200000L
1111 #define MCI_WAVE_INPUT 0x00400000L
1112 #define MCI_WAVE_OUTPUT 0x00800000L
1114 #define MCI_WAVE_STATUS_FORMATTAG 0x00004001L
1115 #define MCI_WAVE_STATUS_CHANNELS 0x00004002L
1116 #define MCI_WAVE_STATUS_SAMPLESPERSEC 0x00004003L
1117 #define MCI_WAVE_STATUS_AVGBYTESPERSEC 0x00004004L
1118 #define MCI_WAVE_STATUS_BLOCKALIGN 0x00004005L
1119 #define MCI_WAVE_STATUS_BITSPERSAMPLE 0x00004006L
1120 #define MCI_WAVE_STATUS_LEVEL 0x00004007L
1122 #define MCI_WAVE_SET_ANYINPUT 0x04000000L
1123 #define MCI_WAVE_SET_ANYOUTPUT 0x08000000L
1125 #define MCI_WAVE_GETDEVCAPS_INPUTS 0x00004001L
1126 #define MCI_WAVE_GETDEVCAPS_OUTPUTS 0x00004002L
1132 LPCSTR lpstrDeviceType;
1133 LPCSTR lpstrElementName;
1135 DWORD dwBufferSeconds;
1136 } MCI_WAVE_OPEN_PARMS;
1137 typedef MCI_WAVE_OPEN_PARMS FAR *LPMCI_WAVE_OPEN_PARMS;
1143 } MCI_WAVE_DELETE_PARMS;
1144 typedef MCI_WAVE_DELETE_PARMS FAR *LPMCI_WAVE_DELETE_PARMS;
1158 DWORD nSamplesPerSec;
1159 DWORD nAvgBytesPerSec;
1162 UINT wBitsPerSample;
1164 } MCI_WAVE_SET_PARMS;
1165 typedef MCI_WAVE_SET_PARMS FAR * LPMCI_WAVE_SET_PARMS;
1167 #define MCI_SEQ_DIV_PPQN (0 + MCI_SEQ_OFFSET)
1168 #define MCI_SEQ_DIV_SMPTE_24 (1 + MCI_SEQ_OFFSET)
1169 #define MCI_SEQ_DIV_SMPTE_25 (2 + MCI_SEQ_OFFSET)
1170 #define MCI_SEQ_DIV_SMPTE_30DROP (3 + MCI_SEQ_OFFSET)
1171 #define MCI_SEQ_DIV_SMPTE_30 (4 + MCI_SEQ_OFFSET)
1173 #define MCI_SEQ_FORMAT_SONGPTR 0x4001
1174 #define MCI_SEQ_FILE 0x4002
1175 #define MCI_SEQ_MIDI 0x4003
1176 #define MCI_SEQ_SMPTE 0x4004
1177 #define MCI_SEQ_NONE 65533
1179 #define MCI_SEQ_STATUS_TEMPO 0x00004002L
1180 #define MCI_SEQ_STATUS_PORT 0x00004003L
1181 #define MCI_SEQ_STATUS_SLAVE 0x00004007L
1182 #define MCI_SEQ_STATUS_MASTER 0x00004008L
1183 #define MCI_SEQ_STATUS_OFFSET 0x00004009L
1184 #define MCI_SEQ_STATUS_DIVTYPE 0x0000400AL
1186 #define MCI_SEQ_SET_TEMPO 0x00010000L
1187 #define MCI_SEQ_SET_PORT 0x00020000L
1188 #define MCI_SEQ_SET_SLAVE 0x00040000L
1189 #define MCI_SEQ_SET_MASTER 0x00080000L
1190 #define MCI_SEQ_SET_OFFSET 0x01000000L
1201 } MCI_SEQ_SET_PARMS;
1202 typedef MCI_SEQ_SET_PARMS FAR * LPMCI_SEQ_SET_PARMS;
1204 #define MCI_ANIM_OPEN_WS 0x00010000L
1205 #define MCI_ANIM_OPEN_PARENT 0x00020000L
1206 #define MCI_ANIM_OPEN_NOSTATIC 0x00040000L
1208 #define MCI_ANIM_PLAY_SPEED 0x00010000L
1209 #define MCI_ANIM_PLAY_REVERSE 0x00020000L
1210 #define MCI_ANIM_PLAY_FAST 0x00040000L
1211 #define MCI_ANIM_PLAY_SLOW 0x00080000L
1212 #define MCI_ANIM_PLAY_SCAN 0x00100000L
1214 #define MCI_ANIM_STEP_REVERSE 0x00010000L
1215 #define MCI_ANIM_STEP_FRAMES 0x00020000L
1217 #define MCI_ANIM_STATUS_SPEED 0x00004001L
1218 #define MCI_ANIM_STATUS_FORWARD 0x00004002L
1219 #define MCI_ANIM_STATUS_HWND 0x00004003L
1220 #define MCI_ANIM_STATUS_HPAL 0x00004004L
1221 #define MCI_ANIM_STATUS_STRETCH 0x00004005L
1223 #define MCI_ANIM_INFO_TEXT 0x00010000L
1225 #define MCI_ANIM_GETDEVCAPS_CAN_REVERSE 0x00004001L
1226 #define MCI_ANIM_GETDEVCAPS_FAST_RATE 0x00004002L
1227 #define MCI_ANIM_GETDEVCAPS_SLOW_RATE 0x00004003L
1228 #define MCI_ANIM_GETDEVCAPS_NORMAL_RATE 0x00004004L
1229 #define MCI_ANIM_GETDEVCAPS_PALETTES 0x00004006L
1230 #define MCI_ANIM_GETDEVCAPS_CAN_STRETCH 0x00004007L
1231 #define MCI_ANIM_GETDEVCAPS_MAX_WINDOWS 0x00004008L
1233 #define MCI_ANIM_REALIZE_NORM 0x00010000L
1234 #define MCI_ANIM_REALIZE_BKGD 0x00020000L
1236 #define MCI_ANIM_WINDOW_HWND 0x00010000L
1237 #define MCI_ANIM_WINDOW_STATE 0x00040000L
1238 #define MCI_ANIM_WINDOW_TEXT 0x00080000L
1239 #define MCI_ANIM_WINDOW_ENABLE_STRETCH 0x00100000L
1240 #define MCI_ANIM_WINDOW_DISABLE_STRETCH 0x00200000L
1242 #define MCI_ANIM_WINDOW_DEFAULT 0x00000000L
1244 #define MCI_ANIM_RECT 0x00010000L
1245 #define MCI_ANIM_PUT_SOURCE 0x00020000L
1246 #define MCI_ANIM_PUT_DESTINATION 0x00040000L
1248 #define MCI_ANIM_WHERE_SOURCE 0x00020000L
1249 #define MCI_ANIM_WHERE_DESTINATION 0x00040000L
1251 #define MCI_ANIM_UPDATE_HDC 0x00020000L
1257 LPCSTR lpstrDeviceType;
1258 LPCSTR lpstrElementName;
1263 } MCI_ANIM_OPEN_PARMS;
1264 typedef MCI_ANIM_OPEN_PARMS FAR *LPMCI_ANIM_OPEN_PARMS;
1271 } MCI_ANIM_PLAY_PARMS;
1272 typedef MCI_ANIM_PLAY_PARMS FAR *LPMCI_ANIM_PLAY_PARMS;
1277 } MCI_ANIM_STEP_PARMS;
1278 typedef MCI_ANIM_STEP_PARMS FAR *LPMCI_ANIM_STEP_PARMS;
1287 } MCI_ANIM_WINDOW_PARMS;
1288 typedef MCI_ANIM_WINDOW_PARMS FAR * LPMCI_ANIM_WINDOW_PARMS;
1292 #ifdef MCI_USE_OFFEXT
1295 #else /* ifdef MCI_USE_OFFEXT */
1297 #endif /* ifdef MCI_USE_OFFEXT */
1298 } MCI_ANIM_RECT_PARMS;
1299 typedef MCI_ANIM_RECT_PARMS FAR * LPMCI_ANIM_RECT_PARMS;
1305 } MCI_ANIM_UPDATE_PARMS;
1306 typedef MCI_ANIM_UPDATE_PARMS FAR * LPMCI_ANIM_UPDATE_PARMS;
1308 #define MCI_OVLY_OPEN_WS 0x00010000L
1309 #define MCI_OVLY_OPEN_PARENT 0x00020000L
1311 #define MCI_OVLY_STATUS_HWND 0x00004001L
1312 #define MCI_OVLY_STATUS_STRETCH 0x00004002L
1314 #define MCI_OVLY_INFO_TEXT 0x00010000L
1316 #define MCI_OVLY_GETDEVCAPS_CAN_STRETCH 0x00004001L
1317 #define MCI_OVLY_GETDEVCAPS_CAN_FREEZE 0x00004002L
1318 #define MCI_OVLY_GETDEVCAPS_MAX_WINDOWS 0x00004003L
1320 #define MCI_OVLY_WINDOW_HWND 0x00010000L
1321 #define MCI_OVLY_WINDOW_STATE 0x00040000L
1322 #define MCI_OVLY_WINDOW_TEXT 0x00080000L
1323 #define MCI_OVLY_WINDOW_ENABLE_STRETCH 0x00100000L
1324 #define MCI_OVLY_WINDOW_DISABLE_STRETCH 0x00200000L
1326 #define MCI_OVLY_WINDOW_DEFAULT 0x00000000L
1328 #define MCI_OVLY_RECT 0x00010000L
1329 #define MCI_OVLY_PUT_SOURCE 0x00020000L
1330 #define MCI_OVLY_PUT_DESTINATION 0x00040000L
1331 #define MCI_OVLY_PUT_FRAME 0x00080000L
1332 #define MCI_OVLY_PUT_VIDEO 0x00100000L
1334 #define MCI_OVLY_WHERE_SOURCE 0x00020000L
1335 #define MCI_OVLY_WHERE_DESTINATION 0x00040000L
1336 #define MCI_OVLY_WHERE_FRAME 0x00080000L
1337 #define MCI_OVLY_WHERE_VIDEO 0x00100000L
1343 LPCSTR lpstrDeviceType;
1344 LPCSTR lpstrElementName;
1349 } MCI_OVLY_OPEN_PARMS;
1350 typedef MCI_OVLY_OPEN_PARMS FAR *LPMCI_OVLY_OPEN_PARMS;
1359 } MCI_OVLY_WINDOW_PARMS;
1360 typedef MCI_OVLY_WINDOW_PARMS FAR * LPMCI_OVLY_WINDOW_PARMS;
1364 #ifdef MCI_USE_OFFEXT
1367 #else /* ifdef MCI_USE_OFFEXT */
1369 #endif /* ifdef MCI_USE_OFFEXT */
1370 } MCI_OVLY_RECT_PARMS;
1371 typedef MCI_OVLY_RECT_PARMS FAR * LPMCI_OVLY_RECT_PARMS;
1377 } MCI_OVLY_SAVE_PARMS;
1378 typedef MCI_OVLY_SAVE_PARMS FAR * LPMCI_OVLY_SAVE_PARMS;
1384 } MCI_OVLY_LOAD_PARMS;
1385 typedef MCI_OVLY_LOAD_PARMS FAR * LPMCI_OVLY_LOAD_PARMS;
1388 #endif /* MMSYSTEM_H */