source: branch/egtra-stream-without-en_dec/api_mmsys.sbp@ 682

Last change on this file since 682 was 595, checked in by NoWest, 16 years ago

APIの定義ミス等修正。

File size: 96.8 KB
Line 
1' api_mmsys.sbp
2' Include file for Multimedia API's
3
4
5#ifndef _INC_MMSYS
6#define _INC_MMSYS
7
8
9' general constants
10Const MAXPNAMELEN = 32
11Const MAXERRORLENGTH = 256
12Const MAX_JOYSTICKOEMVXDNAME = 260
13
14Const MM_MIDI_MAPPER = 1
15Const MM_WAVE_MAPPER = 2
16Const MM_SNDBLST_MIDIOUT = 3
17Const MM_SNDBLST_MIDIIN = 4
18Const MM_SNDBLST_SYNTH = 5
19Const MM_SNDBLST_WAVEOUT = 6
20Const MM_SNDBLST_WAVEIN = 7
21Const MM_ADLIB = 9
22Const MM_MPU401_MIDIOUT = 10
23Const MM_MPU401_MIDIIN = 11
24Const MM_PC_JOYSTICK = 12
25
26' general data types
27TypeDef MMVERSION = DWord
28TypeDef VERSION = DWord
29TypeDef MMRESULT = DWord
30
31' MMTIME data structure
32
33Type Smpte
34 hour As Byte
35 min As Byte
36 sec As Byte
37 frame As Byte
38 fps As Byte
39 dummy As Byte
40 pad[ELM(2)] As Byte
41End Type
42
43Type Midi
44 songptrpos As DWord
45End Type
46
47Type MMTIME
48Public
49 wType As DWord
50 u As DWord
51/* union
52 ms As DWord
53 sample As DWord
54 cb As DWord
55 ticks As DWord
56 smpte As Smpte
57 midi As Midi
58*/
59End Type
60TypeDef PMMTIME = *MMTIME
61TypeDef LPMMTIME = *MMTIME
62
63Const MAKEFOURCC(ch0, ch1, ch2, ch3) = (((ch0 As Byte) or ((ch1 As Byte)<<8) or ((ch2 As Byte)<<16) or ((ch3 As Byte)<<24)) As DWord)
64
65' types for wType field in MMTIME struct
66Const TIME_MS = &H0001
67Const TIME_SAMPLES = &H0002
68Const TIME_BYTES = &H0004
69Const TIME_SMPTE = &H0008
70Const TIME_MIDI = &H0010
71Const TIME_TICKS = &H0020
72
73'----------------------------------------
74' Multimedia Extensions Window Messages
75
76Const MM_JOY1MOVE = &H3A0 'joystick
77Const MM_JOY2MOVE = &H3A1
78Const MM_JOY1ZMOVE = &H3A2
79Const MM_JOY2ZMOVE = &H3A3
80Const MM_JOY1BUTTONDOWN = &H3B5
81Const MM_JOY2BUTTONDOWN = &H3B6
82Const MM_JOY1BUTTONUP = &H3B7
83Const MM_JOY2BUTTONUP = &H3B8
84
85Const MM_MCINOTIFY = &H3B9 'MCI
86
87Const MM_WOM_OPEN = &H3BB 'waveform output
88Const MM_WOM_CLOSE = &H3BC
89Const MM_WOM_DONE = &H3BD
90
91Const MM_WIM_OPEN = &H3BE 'waveform input
92Const MM_WIM_CLOSE = &H3BF
93Const MM_WIM_DATA = &H3C0
94
95Const MM_MIM_OPEN = &H3C1 'MIDI input
96Const MM_MIM_CLOSE = &H3C2
97Const MM_MIM_DATA = &H3C3
98Const MM_MIM_LONGDATA = &H3C4
99Const MM_MIM_ERROR = &H3C5
100Const MM_MIM_LONGERROR = &H3C6
101
102Const MM_MOM_OPEN = &H3C7 'MIDI output
103Const MM_MOM_CLOSE = &H3C8
104Const MM_MOM_DONE = &H3C9
105
106Const MM_DRVM_OPEN = &H3D0 'installable drivers
107Const MM_DRVM_CLOSE = &H3D1
108Const MM_DRVM_DATA = &H3D2
109Const MM_DRVM_ERROR = &H3D3
110
111Const MM_STREAM_OPEN = &H3D4
112Const MM_STREAM_CLOSE = &H3D5
113Const MM_STREAM_DONE = &H3D6
114Const MM_STREAM_ERROR = &H3D7
115
116Const MM_MOM_POSITIONCB = &H3CA
117
118Const MM_MCISIGNAL = &H3CB
119
120Const MM_MIM_MOREDATA = &H3CC 'MIM_DONE w/ pending events
121
122Const MM_MIXM_LINE_CHANGE = &H3D0 'mixer line change notify
123Const MM_MIXM_CONTROL_CHANGE =&H3D1 'mixer control change notify
124
125
126'----------------------------------------------
127' String resource number bases (internal use)
128
129Const MMSYSERR_BASE = 0
130Const WAVERR_BASE = 32
131Const MIDIERR_BASE = 64
132Const TIMERR_BASE = 96
133Const JOYERR_BASE = 160
134Const MCIERR_BASE = 256
135Const MIXERR_BASE = 1024
136
137Const MCI_STRING_OFFSET = 512
138Const MCI_VD_OFFSET = 1024
139Const MCI_CD_OFFSET = 1088
140Const MCI_WAVE_OFFSET = 1152
141Const MCI_SEQ_OFFSET = 1216
142
143
144'----------------------------------------------
145' General error return values
146
147Const MMSYSERR_NOERROR = 0 'no error
148Const MMSYSERR_ERROR = (MMSYSERR_BASE + 1) 'unspecified error
149Const MMSYSERR_BADDEVICEID = (MMSYSERR_BASE + 2) 'device ID out of range
150Const MMSYSERR_NOTENABLED = (MMSYSERR_BASE + 3) 'driver failed enable
151Const MMSYSERR_ALLOCATED = (MMSYSERR_BASE + 4) 'device already allocated
152Const MMSYSERR_INVALHANDLE = (MMSYSERR_BASE + 5) 'device handle is invalid
153Const MMSYSERR_NODRIVER = (MMSYSERR_BASE + 6) 'no device driver present
154Const MMSYSERR_NOMEM = (MMSYSERR_BASE + 7) 'memory allocation error
155Const MMSYSERR_NOTSUPPORTED= (MMSYSERR_BASE + 8) 'function isn't supported
156Const MMSYSERR_BADERRNUM = (MMSYSERR_BASE + 9) 'error value out of range
157Const MMSYSERR_INVALFLAG = (MMSYSERR_BASE + 10) 'invalid flag passed
158Const MMSYSERR_INVALPARAM = (MMSYSERR_BASE + 11) 'invalid parameter passed
159Const MMSYSERR_HANDLEBUSY = (MMSYSERR_BASE + 12) 'handle being used
160Const MMSYSERR_INVALIDALIAS= (MMSYSERR_BASE + 13) 'specified alias not found
161Const MMSYSERR_BADDB = (MMSYSERR_BASE + 14) 'bad registry database
162Const MMSYSERR_KEYNOTFOUND = (MMSYSERR_BASE + 15) 'registry key not found
163Const MMSYSERR_READERROR = (MMSYSERR_BASE + 16) 'registry read error
164Const MMSYSERR_WRITEERROR = (MMSYSERR_BASE + 17) 'registry write error
165Const MMSYSERR_DELETEERROR = (MMSYSERR_BASE + 18) 'registry delete error
166Const MMSYSERR_VALNOTFOUND = (MMSYSERR_BASE + 19) 'registry value not found
167Const MMSYSERR_NODRIVERCB = (MMSYSERR_BASE + 20) 'driver does not call DriverCallback
168Const MMSYSERR_LASTERROR = (MMSYSERR_BASE + 20) 'last error in range
169
170
171'--------------------------------------------------------
172' Installable driver support
173
174Type _System_DeclareHandle_HDRVR:unused As DWord:End Type
175TypeDef HDRVR = *_System_DeclareHandle_HDRVR
176
177Type DRVCONFIGINFOEX
178 dwDCISize As DWord
179 lpszDCISectionName As LPCWSTR
180 lpszDCIAliasName As LPCWSTR
181 dnDevNode As DWORD
182End Type
183TypeDef PDRVCONFIGINFOEX = *DRVCONFIGINFOEX
184TypeDef LPDRVCONFIGINFOEX = *DRVCONFIGINFOEX
185
186' Driver messages
187Const DRV_LOAD = &H0001
188Const DRV_ENABLE = &H0002
189Const DRV_OPEN = &H0003
190Const DRV_CLOSE = &H0004
191Const DRV_DISABLE = &H0005
192Const DRV_FREE = &H0006
193Const DRV_CONFIGURE = &H0007
194Const DRV_QUERYCONFIGURE = &H0008
195Const DRV_INSTALL = &H0009
196Const DRV_REMOVE = &H000A
197Const DRV_EXITSESSION = &H000B
198Const DRV_POWER = &H000F
199Const DRV_RESERVED = &H0800
200Const DRV_USER = &H4000
201
202Type DRVCONFIGINFO
203 dwDCISize As DWord
204 lpszDCISectionName As LPCWSTR
205 lpszDCIAliasName As LPCWSTR
206End Type
207TypeDef PDRVCONFIGINFO = *DRVCONFIGINFO
208TypeDef LPDRVCONFIGINFO = *DRVCONFIGINFO
209
210' Supported return values for DRV_CONFIGURE message
211Const DRVCNF_CANCEL = &H0000
212Const DRVCNF_OK = &H0001
213Const DRVCNF_RESTART = &H0002
214
215TypeDef DRIVERPROC = *Function(dwDriverId As DWord, hdrvr As HDRVR, msg As DWord, lParam1 As LPARAM, lParam2 As LPARAM) As LRESULT
216
217Declare Function CloseDriver Lib "winmm" (hDriver As HDRVR, lParam1 As Long, lParam2 As Long) As LRESULT
218Declare Function OpenDriver Lib "winmm" (szDriverName As LPCWSTR, szSectionName As LPCWSTR, lParam2 As Long) As HDRVR
219Declare Function SendDriverMessage Lib "winmm" (hDriver As HDRVR, message As DWord, lParam1 As Long, lParam2 As Long) As LRESULT
220Declare Function GetDriverModuleHandle Lib "winmm" (hDriver As HDRVR) As HMODULE
221Declare Function DefDriverProc Lib "winmm" (dwDriverIdentifier As DWord, hdrvr As HDRVR, uMsg As DWord, lParam1 As LPARAM, lParam2 As LPARAM) As LRESULT
222
223Declare Function DrvClose Lib "winmm" Alias "CloseDriver" (hDriver As HDRVR, lParam1 As Long, lParam2 As Long) As LRESULT
224Declare Function DrvOpen Lib "winmm" Alias "OpenDriver" (szDriverName As LPCWSTR, szSectionName As LPCWSTR, lParam2 As Long) As HDRVR
225Declare Function DrvSendMessage Lib "winmm" Alias "SendDriverMessage" (hDriver As HDRVR, message As DWord, lParam1 As Long, lParam2 As Long) As LRESULT
226Declare Function DrvGetModuleHandle Lib "winmm" Alias "GetDriverModuleHandle" (hDriver As HDRVR) As HMODULE
227Declare Function DrvDefDriverProc Lib "winmm" Alias "DefDriverProc" (dwDriverIdentifier As DWord, hdrvr As HDRVR, uMsg As DWord, lParam1 As LPARAM, lParam2 As LPARAM) As LRESULT
228
229' return values from DriverProc() function
230Const DRV_CANCEL = DRVCNF_CANCEL
231Const DRV_OK = DRVCNF_OK
232Const DRV_RESTART = DRVCNF_RESTART
233
234Const DRV_MCI_FIRST = DRV_RESERVED
235Const DRV_MCI_LAST = (DRV_RESERVED + &HFFF)
236
237
238'--------------------------------------------------------
239' Driver callback support
240Const CALLBACK_TYPEMASK = &H00070000 'callback type mask
241Const CALLBACK_NULL = &H00000000 'no callback
242Const CALLBACK_WINDOW = &H00010000 'dwCallback is a HWND
243Const CALLBACK_TASK = &H00020000 'dwCallback is a HTASK
244Const CALLBACK_FUNCTION = &H00030000 'dwCallback is a FARPROC
245Const CALLBACK_THREAD = (CALLBACK_TASK)'thread ID replaces 16 bit task
246Const CALLBACK_EVENT = &H00050000 'dwCallback is an EVENT Handle
247
248TypeDef DRVCALLBACK = *Sub(hdrvr As HDRVR, uMsg As DWord, dwUser As DWord, dw1 As DWord, dw2 As DWord)
249TypeDef PDRVCALLBACK = *DRVCALLBACK
250TypeDef LPDRVCALLBACK = *DRVCALLBACK
251
252
253'--------------------------------------------------------
254' General MMSYSTEM support
255
256Declare Function mmsystemGetVersion Lib "winmm" () As DWord
257
258
259
260'--------------------------------------------------------
261' Sound support
262
263#ifdef UNICODE
264Declare Function sndPlaySound Lib "winmm" Alias "sndPlaySoundW" (pszSound As PCWSTR, fuSound As DWord) As BOOL
265#else
266Declare Function sndPlaySound Lib "winmm" Alias "sndPlaySoundA" (pszSound As PCSTR, fuSound As DWord) As BOOL
267#endif
268
269Const SND_SYNC = &H0000
270Const SND_ASYNC = &H0001
271Const SND_NODEFAULT = &H0002
272Const SND_MEMORY = &H0004
273Const SND_LOOP = &H0008
274Const SND_NOSTOP = &H0010
275Const SND_NOWAIT = &H00002000
276Const SND_ALIAS = &H00010000
277Const SND_ALIAS_ID = &H00110000
278Const SND_FILENAME = &H00020000
279Const SND_RESOURCE = &H00040004
280Const SND_PURGE = &H0040
281Const SND_APPLICATION = &H0080
282Const SND_ALIAS_START = 0
283
284Const sndAlias(ch0, ch1) = (SND_ALIAS_START + ((&HFF AND ch0) OR (&HFF AND ch1)<<8))
285
286Const SND_ALIAS_SYSTEMASTERISK = sndAlias(&H53, &H2A)
287Const SND_ALIAS_SYSTEMQUESTION = sndAlias(&H53, &H3F)
288Const SND_ALIAS_SYSTEMHAND = sndAlias(&H53, &H48)
289Const SND_ALIAS_SYSTEMEXIT = sndAlias(&H53, &H45)
290Const SND_ALIAS_SYSTEMSTART = sndAlias(&H53, &H53)
291Const SND_ALIAS_SYSTEMWELCOME = sndAlias(&H53, &H57)
292Const SND_ALIAS_SYSTEMEXCLAMATION = sndAlias(&H53, &H21)
293Const SND_ALIAS_SYSTEMDEFAULT = sndAlias(&H53, &H44)
294
295#ifdef UNICODE
296Declare Function PlaySound Lib "winmm" Alias "PlaySoundW" (pszSound As PCWSTR, hmod As HMODULE, fdwSound As DWord) As BOOL
297#else
298Declare Function PlaySound Lib "winmm" Alias "PlaySoundA" (pszSound As PCSTR, hmod As HMODULE, fdwSound As DWord) As BOOL
299#endif
300
301
302'--------------------------------------------------------
303' Waveform audio support
304
305' waveform audio error return values
306Const WAVERR_BADFORMAT = (WAVERR_BASE + 0)
307Const WAVERR_STILLPLAYING = (WAVERR_BASE + 1)
308Const WAVERR_UNPREPARED = (WAVERR_BASE + 2)
309Const WAVERR_SYNC = (WAVERR_BASE + 3)
310Const WAVERR_LASTERROR = (WAVERR_BASE + 3)
311
312' waveform audio data types
313Type _System_DeclareHandle_HWAVE:unused As DWord:End Type
314TypeDef HWAVE = *_System_DeclareHandle_HWAVE
315Type _System_DeclareHandle_HWAVEIN:unused As DWord:End Type
316TypeDef HWAVEIN = *_System_DeclareHandle_HWAVEIN
317Type _System_DeclareHandle_HWAVEOUT:unused As DWord:End Type
318TypeDef HWAVEOUT = *_System_DeclareHandle_HWAVEOUT
319
320TypeDef WAVECALLBACK = DRVCALLBACK
321TypeDef LPWAVECALLBACK = *WAVECALLBACK
322
323
324' wave callback messages
325Const WOM_OPEN = MM_WOM_OPEN
326Const WOM_CLOSE = MM_WOM_CLOSE
327Const WOM_DONE = MM_WOM_DONE
328Const WIM_OPEN = MM_WIM_OPEN
329Const WIM_CLOSE = MM_WIM_CLOSE
330Const WIM_DATA = MM_WIM_DATA
331
332' device ID for wave device mapper
333Const WAVE_MAPPER = (-1)
334
335' flags for dwFlags parameter in waveOutOpen() and waveInOpen()
336Const WAVE_FORMAT_QUERY = &H0001
337Const WAVE_ALLOWSYNC = &H0002
338Const WAVE_MAPPED = &H0004
339Const WAVE_FORMAT_DIRECT = &H0008
340Const WAVE_FORMAT_DIRECT_QUERY = (WAVE_FORMAT_QUERY OR WAVE_FORMAT_DIRECT)
341
342' wave data block header
343Type WAVEHDR
344 lpData As LPSTR
345 dwBufferLength As DWord
346 dwBytesRecorded As DWord
347 dwUser As DWord
348 dwFlags As DWord
349 dwLoops As DWord
350 lpNext As *WAVEHDR
351 reserved As DWord
352End Type
353TypeDef PWAVEHDR = *WAVEHDR
354TypeDef LPWAVEHDR = *WAVEHDR
355
356' flags for dwFlags field of WAVEHDR
357Const WHDR_DONE = &H00000001
358Const WHDR_PREPARED = &H00000002
359Const WHDR_BEGINLOOP = &H00000004
360Const WHDR_ENDLOOP = &H00000008
361Const WHDR_INQUEUE = &H00000010
362
363' waveform output device capabilities structure
364Type WAVEOUTCAPSW
365 wMid As Word
366 wPid As Word
367 vDriverVersion As MMVERSION
368 szPname[ELM(MAXPNAMELEN)] As WCHAR
369 dwFormats As DWord
370 wChannels As Word
371 wReserved1 As Word
372 dwSupport As DWord
373End Type
374TypeDef PWAVEOUTCAPSW = *WAVEOUTCAPSW
375TypeDef LPWAVEOUTCAPSW = *WAVEOUTCAPSW
376
377Type WAVEOUTCAPSA
378 wMid As Word
379 wPid As Word
380 vDriverVersion As MMVERSION
381 szPname[ELM(MAXPNAMELEN)] As SByte
382 dwFormats As DWord
383 wChannels As Word
384 wReserved1 As Word
385 dwSupport As DWord
386End Type
387TypeDef PWAVEOUTCAPSA = *WAVEOUTCAPSA
388TypeDef LPWAVEOUTCAPSA = *WAVEOUTCAPSA
389
390#ifdef UNICODE
391TypeDef WAVEOUTCAPS = WAVEOUTCAPSW
392TypeDef PWAVEOUTCAPS = PWAVEOUTCAPSW
393TypeDef LPWAVEOUTCAPS = LPWAVEOUTCAPSW
394#else
395TypeDef WAVEOUTCAPS = WAVEOUTCAPSA
396TypeDef PWAVEOUTCAPS = PWAVEOUTCAPSA
397TypeDef LPWAVEOUTCAPS = LPWAVEOUTCAPSA
398#endif
399
400' flags for dwSupport field of WAVEOUTCAPS
401Const WAVECAPS_PITCH = &H0001
402Const WAVECAPS_PLAYBACKRATE = &H0002
403Const WAVECAPS_VOLUME = &H0004
404Const WAVECAPS_LRVOLUME = &H0008
405Const WAVECAPS_SYNC = &H0010
406Const WAVECAPS_SAMPLEACCURATE = &H0020
407Const WAVECAPS_DIRECTSOUND = &H0040
408
409' waveform input device capabilities structure
410Type WAVEINCAPSW
411 wMid As Word
412 wPid As Word
413 vDriverVersion As MMVERSION
414 szPname[ELM(MAXPNAMELEN)] As WCHAR
415 dwFormats As DWord
416 wChannels As Word
417 wReserved1 As Word
418End Type
419TypeDef PWAVEINCAPSW = *WAVEINCAPSW
420TypeDef LPWAVEINCAPSW = *WAVEINCAPSW
421
422Type WAVEINCAPSA
423 wMid As Word
424 wPid As Word
425 vDriverVersion As MMVERSION
426 szPname[ELM(MAXPNAMELEN)] As SByte
427 dwFormats As DWord
428 wChannels As Word
429 wReserved1 As Word
430End Type
431TypeDef PWAVEINCAPSA = *WAVEINCAPSA
432TypeDef LPWAVEINCAPSA = *WAVEINCAPSA
433
434#ifdef UNICODE
435TypeDef WAVEINCAPS = WAVEINCAPSW
436TypeDef PWAVEINCAPS = PWAVEINCAPSW
437TypeDef LPWAVEINCAPS = LPWAVEINCAPSW
438#else
439TypeDef WAVEINCAPS = WAVEINCAPSA
440TypeDef PWAVEINCAPS = PWAVEINCAPSA
441TypeDef LPWAVEINCAPS = LPWAVEINCAPSA
442#endif
443
444' defines for dwFormat field of WAVEINCAPS and WAVEOUTCAPS
445Const WAVE_INVALIDFORMAT = &H00000000 ' invalid format
446Const WAVE_FORMAT_1M08 = &H00000001 ' 11.025 kHz, Mono, 8-bit
447Const WAVE_FORMAT_1S08 = &H00000002 ' 11.025 kHz, Stereo, 8-bit
448Const WAVE_FORMAT_1M16 = &H00000004 ' 11.025 kHz, Mono, 16-bit
449Const WAVE_FORMAT_1S16 = &H00000008 ' 11.025 kHz, Stereo, 16-bit
450Const WAVE_FORMAT_2M08 = &H00000010 ' 22.05 kHz, Mono, 8-bit
451Const WAVE_FORMAT_2S08 = &H00000020 ' 22.05 kHz, Stereo, 8-bit
452Const WAVE_FORMAT_2M16 = &H00000040 ' 22.05 kHz, Mono, 16-bit
453Const WAVE_FORMAT_2S16 = &H00000080 ' 22.05 kHz, Stereo, 16-bit
454Const WAVE_FORMAT_4M08 = &H00000100 ' 44.1 kHz, Mono, 8-bit
455Const WAVE_FORMAT_4S08 = &H00000200 ' 44.1 kHz, Stereo, 8-bit
456Const WAVE_FORMAT_4M16 = &H00000400 ' 44.1 kHz, Mono, 16-bit
457Const WAVE_FORMAT_4S16 = &H00000800 ' 44.1 kHz, Stereo, 16-bit
458
459' OLD general waveform format structure (information common to all formats)
460Type Align(1) WAVEFORMAT
461 wFormatTag As Word
462 nChannels As Word
463 nSamplesPerSec As DWord
464 nAvgBytesPerSec As DWord
465 nBlockAlign As Word
466End Type
467TypeDef PWAVEFORMAT = *WAVEFORMAT
468TypeDef LPWAVEFORMAT = *WAVEFORMAT
469
470' flags for wFormatTag field of WAVEFORMAT
471Const WAVE_FORMAT_PCM = 1
472
473' specific waveform format structure for PCM data
474Type Align(1) PCMWAVEFORMAT
475 wf As WAVEFORMAT
476 wBitsPerSample As Word
477End Type
478TypeDef PPCMWAVEFORMAT = *PCMWAVEFORMAT
479TypeDef LPPCMWAVEFORMAT = *PCMWAVEFORMAT
480
481Type Align(1) WAVEFORMATEX
482 wFormatTag As Word
483 nChannels As Word
484 nSamplesPerSec As DWord
485 nAvgBytesPerSec As DWord
486 nBlockAlign As Word
487 wBitsPerSample As Word
488 cbSize As Word
489End Type
490TypeDef PWAVEFORMATEX = *WAVEFORMATEX
491TypeDef LPWAVEFORMATEX = *WAVEFORMATEX
492TypeDef LPCWAVEFORMATEX = *WAVEFORMATEX
493
494' waveform audio function prototypes
495Declare Function waveOutGetNumDevs Lib "winmm" () As DWord
496#ifdef UNICODE
497Declare Function waveOutGetDevCaps Lib "winmm" Alias "waveOutGetDevCapsW" (uDeviceID As DWord, ByRef pwoc As WAVEOUTCAPSW, cbwoc As DWord) As MMRESULT
498#else
499Declare Function waveOutGetDevCaps Lib "winmm" Alias "waveOutGetDevCapsA" (uDeviceID As DWord, ByRef pwoc As WAVEOUTCAPS, cbwoc As DWord) As MMRESULT
500#endif
501Declare Function waveOutGetVolume Lib "winmm" (hwo As HWAVEOUT, ByRef pdwVolume As DWord) As MMRESULT
502Declare Function waveOutSetVolume Lib "winmm" (hwo As HWAVEOUT, dwVolume As DWord) As MMRESULT
503#ifdef UNICODE
504Declare Function waveOutGetErrorText Lib "winmm" Alias "waveOutGetErrorTextW" (mmrError As MMRESULT, pszText As LPWSTR, cchText As DWord) As MMRESULT
505#else
506Declare Function waveOutGetErrorText Lib "winmm" Alias "waveOutGetErrorTextA" (mmrError As MMRESULT, pszText As LPSTR, cchText As DWord) As MMRESULT
507#endif
508Declare Function waveOutOpen Lib "winmm" (ByRef phwo As HWAVEOUT, uDeviceID As DWord, ByRef pwfx As WAVEFORMATEX, dwCallback As DWORD_PTR, dwInstance As DWORD_PTR, fdwOpen As DWord) As MMRESULT
509Declare Function waveOutClose Lib "winmm" (hwo As HWAVEOUT) As MMRESULT
510Declare Function waveOutPrepareHeader Lib "winmm" (hwo As HWAVEOUT, ByRef pwh As WAVEHDR, cbwh As DWord) As MMRESULT
511Declare Function waveOutUnprepareHeader Lib "winmm" (hwo As HWAVEOUT, ByRef pwh As WAVEHDR, cbwh As DWord) As MMRESULT
512Declare Function waveOutWrite Lib "winmm" (hwo As HWAVEOUT, ByRef pwh As WAVEHDR, cbwh As DWord) As MMRESULT
513Declare Function waveOutPause Lib "winmm" (hwo As HWAVEOUT) As MMRESULT
514Declare Function waveOutRestart Lib "winmm" (hwo As HWAVEOUT) As MMRESULT
515Declare Function waveOutReset Lib "winmm" (hwo As HWAVEOUT) As MMRESULT
516Declare Function waveOutBreakLoop Lib "winmm" (hwo As HWAVEOUT) As MMRESULT
517Declare Function waveOutGetPosition Lib "winmm" (hwo As HWAVEOUT, ByRef pmmt As MMTIME, cbmmt As DWord) As MMRESULT
518Declare Function waveOutGetPitch Lib "winmm" (hwo As HWAVEOUT, ByRef pdwPitch As DWord) As MMRESULT
519Declare Function waveOutSetPitch Lib "winmm" (hwo As HWAVEOUT, dwPitch As DWord) As MMRESULT
520Declare Function waveOutGetPlaybackRate Lib "winmm" (hwo As HWAVEOUT, ByRef pdwRate As DWord) As MMRESULT
521Declare Function waveOutSetPlaybackRate Lib "winmm" (hwo As HWAVEOUT, dwRate As DWord) As MMRESULT
522Declare Function waveOutGetID Lib "winmm" (hwo As HWAVEOUT, ByRef puDeviceID As DWord) As MMRESULT
523Declare Function waveOutMessage Lib "winmm" (hwo As HWAVEOUT, uMsg As DWord, dw1 As DWord, dw2 As DWord) As MMRESULT
524
525Declare Function waveInGetNumDevs Lib "winmm" () As DWord
526#ifdef UNICODE
527Declare Function waveInGetDevCaps Lib "winmm" Alias "waveInGetDevCapsW" (uDeviceID As DWord, ByRef pwic As WAVEINCAPSW, cbwic As DWord) As MMRESULT
528Declare Function waveInGetErrorText Lib "winmm" Alias "waveInGetErrorTextW" (mmrError As MMRESULT, pszText As LPWSTR, cchText As DWord) As MMRESULT
529#else
530Declare Function waveInGetDevCaps Lib "winmm" Alias "waveInGetDevCapsA" (uDeviceID As DWord, ByRef pwic As WAVEINCAPS, cbwic As DWord) As MMRESULT
531Declare Function waveInGetErrorText Lib "winmm" Alias "waveInGetErrorTextA" (mmrError As MMRESULT, pszText As LPSTR, cchText As DWord) As MMRESULT
532#endif
533Declare Function waveInOpen Lib "winmm" (ByRef phwi As HWAVEIN, uDeviceID As DWord, ByRef pwfx As WAVEFORMATEX, dwCallback As DWORD_PTR, dwInstance As DWORD_PTR, fdwOpen As DWord) As MMRESULT
534Declare Function waveInClose Lib "winmm" (hwi As HWAVEIN) As MMRESULT
535Declare Function waveInPrepareHeader Lib "winmm" (hwi As HWAVEIN, ByRef pwh As WAVEHDR, cbwh As DWord) As MMRESULT
536Declare Function waveInUnprepareHeader Lib "winmm" (hwi As HWAVEIN, ByRef pwh As WAVEHDR, cbwh As DWord) As MMRESULT
537Declare Function waveInAddBuffer Lib "winmm" (hwi As HWAVEIN, ByRef pwh As WAVEHDR, cbwh As DWord) As MMRESULT
538Declare Function waveInStart Lib "winmm" (hwi As HWAVEIN) As MMRESULT
539Declare Function waveInStop Lib "winmm" (hwi As HWAVEIN) As MMRESULT
540Declare Function waveInReset Lib "winmm" (hwi As HWAVEIN) As MMRESULT
541Declare Function waveInGetPosition Lib "winmm" (hwi As HWAVEIN, ByRef pmmt As MMTIME, cbmmt As DWord) As MMRESULT
542Declare Function waveInGetID Lib "winmm" (hwi As HWAVEIN, ByRef puDeviceID As DWord) As MMRESULT
543Declare Function waveInMessage Lib "winmm" (hwi As HWAVEIN, uMsg As DWord, dw1 As DWord, dw2 As DWord) As MMRESULT
544
545
546
547'--------------------------------------------------------
548' MIDI audio support
549
550' MIDI error return values
551Const MIDIERR_UNPREPARED = (MIDIERR_BASE + 0)
552Const MIDIERR_STILLPLAYING = (MIDIERR_BASE + 1)
553Const MIDIERR_NOMAP = (MIDIERR_BASE + 2)
554Const MIDIERR_NOTREADY = (MIDIERR_BASE + 3)
555Const MIDIERR_NODEVICE = (MIDIERR_BASE + 4)
556Const MIDIERR_INVALIDSETUP = (MIDIERR_BASE + 5)
557Const MIDIERR_BADOPENMODE = (MIDIERR_BASE + 6)
558Const MIDIERR_DONT_CONTINUE = (MIDIERR_BASE + 7)
559Const MIDIERR_LASTERROR = (MIDIERR_BASE + 7)
560
561' MIDI audio data types
562Type _System_DeclareHandle_HMIDI:unused As DWord:End Type
563TypeDef HMIDI = *_System_DeclareHandle_HMIDI
564Type _System_DeclareHandle_HMIDIIN:unused As DWord:End Type
565TypeDef HMIDIIN = *_System_DeclareHandle_HMIDIIN
566Type _System_DeclareHandle_HMIDIOUT:unused As DWord:End Type
567TypeDef HMIDIOUT = *_System_DeclareHandle_HMIDIOUT
568Type _System_DeclareHandle_HMIDISTRM:unused As DWord:End Type
569TypeDef HMIDISTRM = *_System_DeclareHandle_HMIDISTRM
570
571TypeDef MIDICALLBACK = DRVCALLBACK
572TypeDef LPMIDICALLBACK = *MIDICALLBACK
573
574Const MIDIPATCHSIZE = 128
575
576TypeDef LPPATCHARRAY = *Word
577TypeDef LPKEYARRAY = *Word
578
579' MIDI callback messages
580Const MIM_OPEN = MM_MIM_OPEN
581Const MIM_CLOSE = MM_MIM_CLOSE
582Const MIM_DATA = MM_MIM_DATA
583Const MIM_LONGDATA = MM_MIM_LONGDATA
584Const MIM_ERROR = MM_MIM_ERROR
585Const MIM_LONGERROR = MM_MIM_LONGERROR
586Const MOM_OPEN = MM_MOM_OPEN
587Const MOM_CLOSE = MM_MOM_CLOSE
588Const MOM_DONE = MM_MOM_DONE
589Const MIM_MOREDATA = MM_MIM_MOREDATA
590Const MOM_POSITIONCB = MM_MOM_POSITIONCB
591
592' device ID for MIDI mapper
593Const MIDIMAPPER = (-1)
594Const MIDI_MAPPER = (-1)
595
596Const MIDI_IO_STATUS = &H00000020
597
598' flags for wFlags parm of midiOutCachePatches(), midiOutCacheDrumPatches()
599Const MIDI_CACHE_ALL = 1
600Const MIDI_CACHE_BESTFIT = 2
601Const MIDI_CACHE_QUERY = 3
602Const MIDI_UNCACHE = 4
603
604' MIDI output device capabilities structure
605Type MIDIOUTCAPSW
606 wMid As Word
607 wPid As Word
608 vDriverVersion As MMVERSION
609 szPname[ELM(MAXPNAMELEN)] As WCHAR
610 wTechnology As Word
611 wVoices As Word
612 wNotes As Word
613 wChannelMask As Word
614 dwSupport As DWord
615End Type
616TypeDef PMIDIOUTCAPSW = *MIDIOUTCAPSW
617TypeDef LPMIDIOUTCAPSW = *MIDIOUTCAPSW
618
619Type MIDIOUTCAPSA
620 wMid As Word
621 wPid As Word
622 vDriverVersion As MMVERSION
623 szPname[ELM(MAXPNAMELEN)] As SByte
624 wTechnology As Word
625 wVoices As Word
626 wNotes As Word
627 wChannelMask As Word
628 dwSupport As DWord
629End Type
630TypeDef PMIDIOUTCAPSA = *MIDIOUTCAPSA
631TypeDef LPMIDIOUTCAPSA = *MIDIOUTCAPSA
632
633#ifdef UNICODE
634TypeDef MIDIOUTCAPS = MIDIOUTCAPSW
635TypeDef PMIDIOUTCAPS = PMIDIOUTCAPSW
636TypeDef LPMIDIOUTCAPS = LPMIDIOUTCAPSW
637#else
638TypeDef MIDIOUTCAPS = MIDIOUTCAPSA
639TypeDef PMIDIOUTCAPS = PMIDIOUTCAPSA
640TypeDef LPMIDIOUTCAPS = LPMIDIOUTCAPSA
641#endif
642
643' flags for wTechnology field of MIDIOUTCAPS structure
644Const MOD_MIDIPORT = 1
645Const MOD_SYNTH = 2
646Const MOD_SQSYNTH = 3
647Const MOD_FMSYNTH = 4
648Const MOD_MAPPER = 5
649Const MOD_WAVETABLE = 6
650Const MOD_SWSYNTH = 7
651
652' flags for dwSupport field of MIDIOUTCAPS structure
653Const MIDICAPS_VOLUME = &H0001
654Const MIDICAPS_LRVOLUME = &H0002
655Const MIDICAPS_CACHE = &H0004
656Const MIDICAPS_STREAM = &H0008
657
658' MIDI input device capabilities structure
659Type MIDIINCAPSW
660 wMid As Word
661 wPid As Word
662 vDriverVersion As MMVERSION
663 szPname[ELM(MAXPNAMELEN)] As Char
664 dwSupport As DWord
665End Type
666TypeDef PMIDIINCAPSW = *MIDIINCAPSW
667TypeDef LPMIDIINCAPSW = *MIDIINCAPSW
668
669Type MIDIINCAPSA
670 wMid As Word
671 wPid As Word
672 vDriverVersion As MMVERSION
673 szPname[ELM(MAXPNAMELEN)] As Char
674 dwSupport As DWord
675End Type
676TypeDef PMIDIINCAPSA = *MIDIINCAPSA
677TypeDef LPMIDIINCAPSA = *MIDIINCAPSA
678
679#ifdef UNICODE
680TypeDef MIDIINCAPS = MIDIINCAPSW
681TypeDef PMIDIINCAPS = PMIDIINCAPSW
682TypeDef LPMIDIINCAPS = LPMIDIINCAPSW
683#else
684TypeDef MIDIINCAPS = MIDIINCAPSA
685TypeDef PMIDIINCAPS = PMIDIINCAPSA
686TypeDef LPMIDIINCAPS = LPMIDIINCAPSA
687#endif
688
689' MIDI data block header
690Type MIDIHDR
691 lpData As LPSTR
692 dwBufferLength As DWord
693 dwBytesRecorded As DWord
694 dwUser As DWord
695 dwFlags As DWord
696 lpNext As *MIDIHDR
697 reserved As DWord
698 dwOffset As DWord
699 dwReserved[ELM(8)] As DWord
700End Type
701TypeDef PMIDIHDR = *MIDIHDR
702TypeDef LPMIDIHDR = *MIDIHDR
703
704Type MIDIEVENT
705 dwDeltaTime As DWord
706 dwStreamID As DWord
707 dwEvent As DWord
708 dwParms[ELM(1)] As DWord
709End Type
710
711Type MIDISTRMBUFFVER
712 dwVersion As DWord
713 dwMid As DWord
714 dwOEMVersion As DWord
715End Type
716
717' flags for dwFlags field of MIDIHDR structure
718Const MHDR_DONE = &H00000001
719Const MHDR_PREPARED = &H00000002
720Const MHDR_INQUEUE = &H00000004
721Const MHDR_ISSTRM = &H00000008
722
723Const MEVT_F_SHORT = &H00000000
724Const MEVT_F_LONG = &H80000000
725Const MEVT_F_CALLBACK = &H40000000
726Const MEVT_EVENTTYPE(x) = ((x>>24) AND &HFF)
727Const MEVT_EVENTPARM(x) = (x AND &H00FFFFFF)
728Const MEVT_SHORTMSG = (&H00)
729Const MEVT_TEMPO = (&H01)
730Const MEVT_NOP = (&H02)
731Const MEVT_LONGMSG = (&H80)
732Const MEVT_COMMENT = (&H82)
733Const MEVT_VERSION = (&H84)
734
735Const MIDISTRM_ERROR = (-2)
736
737' Structures and defines for midiStreamProperty
738Const MIDIPROP_SET = &H80000000
739Const MIDIPROP_GET = &H40000000
740Const MIDIPROP_TIMEDIV = &H00000001
741Const MIDIPROP_TEMPO = &H00000002
742
743Type MIDIPROPTIMEDIV
744 cbStruct As DWord
745 dwTimeDiv As DWord
746End Type
747TypeDef LPMIDIPROPTIMEDIV = *MIDIPROPTIMEDIV
748
749Type MIDIPROPTEMPO
750 cbStruct As DWord
751 dwTempo As DWord
752End Type
753TypeDef LPMIDIPROPTEMPO = *MIDIPROPTEMPO
754
755
756' MIDI function prototypes
757Declare Function midiOutGetNumDevs Lib "winmm" () As DWord
758Declare Function midiStreamOpen Lib "winmm" (ByRef phms As HMIDISTRM, ByRef puDeviceID As DWord, cMidi As DWord, dwCallback As DWord, dwInstance As DWord, fdwOpen As DWord) As MMRESULT
759Declare Function midiStreamClose Lib "winmm" (hms As HMIDISTRM) As MMRESULT
760Declare Function midiStreamProperty Lib "winmm" (hms As HMIDISTRM, lppropdata As *Byte, dwProperty As DWord) As MMRESULT
761Declare Function midiStreamPosition Lib "winmm" (hms As HMIDISTRM, ByRef lpmmt As MMTIME, cbmmt As DWord) As MMRESULT
762Declare Function midiStreamOut Lib "winmm" (hms As HMIDISTRM, ByRef pmh As MIDIHDR, cbmh As DWord) As MMRESULT
763Declare Function midiStreamPause Lib "winmm" (hms As HMIDISTRM) As MMRESULT
764Declare Function midiStreamRestart Lib "winmm" (hms As HMIDISTRM) As MMRESULT
765Declare Function midiStreamStop Lib "winmm" (hms As HMIDISTRM) As MMRESULT
766
767Declare Function midiConnect Lib "winmm" (hmi As HMIDI, hmo As HMIDIOUT, pReserved As VoidPtr) As MMRESULT
768Declare Function midiDisconnect Lib "winmm" (hmi As HMIDI, hmo As HMIDIOUT, pReserved As VoidPtr) As MMRESULT
769#ifdef UNICODE
770Declare Function midiOutGetDevCaps Lib "winmm" Alias "midiOutGetDevCapsW" (uDeviceID As DWord, ByRef pmoc As MIDIOUTCAPSW, cbmoc As DWord) As MMRESULT
771#else
772Declare Function midiOutGetDevCaps Lib "winmm" Alias "midiOutGetDevCapsA" (uDeviceID As DWord, ByRef pmoc As MIDIOUTCAPS, cbmoc As DWord) As MMRESULT
773#endif
774Declare Function midiOutGetVolume Lib "winmm" (hmo As HMIDIOUT, ByRef pdwVolume As DWord) As MMRESULT
775Declare Function midiOutSetVolume Lib "winmm" (hmo As HMIDIOUT, dwVolume As DWord) As MMRESULT
776#ifdef UNICODE
777Declare Function midiOutGetErrorText Lib "winmm" Alias "midiOutGetErrorTextW" (mmrError As MMRESULT, pszText As LPWSTR, cchText As DWord) As MMRESULT
778#else
779Declare Function midiOutGetErrorText Lib "winmm" Alias "midiOutGetErrorTextA" (mmrError As MMRESULT, pszText As LPSTR, cchText As DWord) As MMRESULT
780#endif
781Declare Function midiOutOpen Lib "winmm" (ByRef phmo As HMIDIOUT, uDeviceID As DWord, dwCallback As DWORD_PTR, dwInstance As DWORD_PTR, fdwOpen As DWord) As MMRESULT
782Declare Function midiOutClose Lib "winmm" (hmo As HMIDIOUT) As MMRESULT
783Declare Function midiOutPrepareHeader Lib "winmm" (hmo As HMIDIOUT, ByRef pmh As MIDIHDR, cbmh As DWord) As MMRESULT
784Declare Function midiOutUnprepareHeader Lib "winmm" (hmo As HMIDIOUT, ByRef pmh As MIDIHDR, cbmh As DWord) As MMRESULT
785Declare Function midiOutShortMsg Lib "winmm" (hmo As HMIDIOUT, dwMsg As DWord) As MMRESULT
786Declare Function midiOutLongMsg Lib "winmm" (hmo As HMIDIOUT, ByRef pmh As MIDIHDR, cbmh As DWord) As MMRESULT
787Declare Function midiOutReset Lib "winmm" (hmo As HMIDIOUT) As MMRESULT
788Declare Function midiOutCachePatches Lib "winmm" (hmo As HMIDIOUT, uBank As DWord, ByRef pwpa As Word, fuCache As DWord) As MMRESULT
789Declare Function midiOutCacheDrumPatches Lib "winmm" (hmo As HMIDIOUT, uPatch As DWord, ByRef pwkya As Word, fuCache As DWord) As MMRESULT
790Declare Function midiOutGetID Lib "winmm" (hmo As HMIDIOUT, ByRef puDeviceID As DWord) As MMRESULT
791Declare Function midiOutMessage Lib "winmm" (hmo As HMIDIOUT, uMsg As DWord, dw1 As DWord, dw2 As DWord) As MMRESULT
792
793Declare Function midiInGetNumDevs Lib "winmm" () As DWord
794#ifdef UNICODE
795Declare Function midiInGetDevCaps Lib "winmm" Alias "midiInGetDevCapsW" (uDeviceID As DWord, ByRef pmic As MIDIINCAPSW, cbmic As DWord) As MMRESULT
796Declare Function midiInGetErrorText Lib "winmm" Alias "midiInGetErrorTextW" (mmrError As MMRESULT, pszText As LPWSTR, cchText As DWord) As MMRESULT
797#else
798Declare Function midiInGetDevCaps Lib "winmm" Alias "midiInGetDevCapsA" (uDeviceID As DWord, ByRef pmic As MIDIINCAPS, cbmic As DWord) As MMRESULT
799Declare Function midiInGetErrorText Lib "winmm" Alias "midiInGetErrorTextA" (mmrError As MMRESULT, pszText As LPSTR, cchText As DWord) As MMRESULT
800#endif
801Declare Function midiInOpen Lib "winmm" (ByRef phmi As HMIDIIN, uDeviceID As DWord, dwCallback As DWORD_PTR, dwInstance As DWORD_PTR, fdwOpen As DWord) As MMRESULT
802Declare Function midiInClose Lib "winmm" (hmi As HMIDIIN) As MMRESULT
803Declare Function midiInPrepareHeader Lib "winmm" (hmi As HMIDIIN, ByRef pmh As MIDIHDR, cbmh As DWord) As MMRESULT
804Declare Function midiInUnprepareHeader Lib "winmm" (hmi As HMIDIIN, ByRef pmh As MIDIHDR, cbmh As DWord) As MMRESULT
805Declare Function midiInAddBuffer Lib "winmm" (hmi As HMIDIIN, ByRef pmh As MIDIHDR, cbmh As DWord) As MMRESULT
806Declare Function midiInStart Lib "winmm" (hmi As HMIDIIN) As MMRESULT
807Declare Function midiInStop Lib "winmm" (hmi As HMIDIIN) As MMRESULT
808Declare Function midiInReset Lib "winmm" (hmi As HMIDIIN) As MMRESULT
809Declare Function midiInGetID Lib "winmm" (hmi As HMIDIIN, ByRef puDeviceID As DWord) As MMRESULT
810Declare Function midiInMessage Lib "winmm" (hmi As HMIDIIN, uMsg As DWord, dw1 As DWord, dw2 As DWord) As MMRESULT
811
812
813'--------------------------------------------------------
814' Auxiliary audio support
815
816' device ID for aux device mapper
817Const AUX_MAPPER = (-1)
818
819' Auxiliary audio device capabilities structure
820Type AUXCAPSW
821 wMid As Word
822 wPid As Word
823 vDriverVersion As MMVERSION
824 szPname[ELM(MAXPNAMELEN)] As WCHAR
825 wTechnology As Word
826 wReserved1 As Word
827 dwSupport As DWord
828End Type
829TypeDef PAUXCAPSW = *AUXCAPSW
830TypeDef NPAUXCAPSW = *AUXCAPSW
831TypeDef LPAUXCAPSW = *AUXCAPSW
832
833Type AUXCAPSA
834 wMid As Word
835 wPid As Word
836 vDriverVersion As MMVERSION
837 szPname[ELM(MAXPNAMELEN)] As SByte
838 wTechnology As Word
839 wReserved1 As Word
840 dwSupport As DWord
841End Type
842TypeDef PAUXCAPSA = *AUXCAPSA
843TypeDef NPAUXCAPSA = *AUXCAPSA
844TypeDef LPAUXCAPSA = *AUXCAPSA
845
846#ifdef UNICODE
847TypeDef AUXCAPS = AUXCAPSW
848TypeDef PAUXCAPS = PAUXCAPSW
849TypeDef NPAUXCAPS = NPAUXCAPSW
850TypeDef LPAUXCAPS = LPAUXCAPSW
851#else
852TypeDef AUXCAPS = AUXCAPSA
853TypeDef PAUXCAPS = PAUXCAPSA
854TypeDef NPAUXCAPS = NPAUXCAPSA
855TypeDef LPAUXCAPS = LPAUXCAPSA
856#endif
857
858Const AUXCAPS_CDAUDIO = 1
859Const AUXCAPS_AUXIN = 2
860
861Const AUXCAPS_VOLUME = &H0001
862Const AUXCAPS_LRVOLUME = &H0002
863
864' auxiliary audio function prototypes
865Declare Function auxGetNumDevs Lib "winmm" () As DWord
866#ifdef UNICODE
867Declare Function auxGetDevCaps Lib "winmm" Alias "auxGetDevCapsW" (uDeviceID As DWord, pac As *AUXCAPSW, cbac As DWord) As MMRESULT
868#else
869Declare Function auxGetDevCaps Lib "winmm" Alias "auxGetDevCapsA" (uDeviceID As DWord, pac As *AUXCAPS, cbac As DWord) As MMRESULT
870#endif
871Declare Function auxSetVolume Lib "winmm" (uDeviceID As DWord, dwVolume As DWord) As MMRESULT
872Declare Function auxGetVolume Lib "winmm" (uDeviceID As DWord, pdwVolume As *DWord) As MMRESULT
873Declare Function auxOutMessage Lib "winmm" (uDeviceID As DWord, uMsg As DWord, dw1 As DWord, dw2 As DWord) As MMRESULT
874
875
876'--------------------------------------------------------
877' Mixer Support
878
879TypeDef HMIXEROBJ = VoidPtr
880TypeDef LPHMIXEROBJ = HMIXEROBJ
881TypeDef HMIXER = VoidPtr
882TypeDef LPHMIXER = *HMIXER
883
884Const MIXER_SHORT_NAME_CHARS = 16
885Const MIXER_LONG_NAME_CHARS = 64
886
887Const MIXERR_INVALLINE = (MIXERR_BASE + 0)
888Const MIXERR_INVALCONTROL = (MIXERR_BASE + 1)
889Const MIXERR_INVALVALUE = (MIXERR_BASE + 2)
890Const MIXERR_LASTERROR = (MIXERR_BASE + 2)
891
892Const MIXER_OBJECTF_HANDLE = &H80000000
893Const MIXER_OBJECTF_MIXER = &H00000000
894Const MIXER_OBJECTF_HMIXER = (MIXER_OBJECTF_HANDLE OR MIXER_OBJECTF_MIXER)
895Const MIXER_OBJECTF_WAVEOUT = &H10000000
896Const MIXER_OBJECTF_HWAVEOUT = (MIXER_OBJECTF_HANDLE OR MIXER_OBJECTF_WAVEOUT)
897Const MIXER_OBJECTF_WAVEIN = &H20000000
898Const MIXER_OBJECTF_HWAVEIN = (MIXER_OBJECTF_HANDLE OR MIXER_OBJECTF_WAVEIN)
899Const MIXER_OBJECTF_MIDIOUT = &H30000000
900Const MIXER_OBJECTF_HMIDIOUT = (MIXER_OBJECTF_HANDLE OR MIXER_OBJECTF_MIDIOUT)
901Const MIXER_OBJECTF_MIDIIN = &H40000000
902Const MIXER_OBJECTF_HMIDIIN = (MIXER_OBJECTF_HANDLE OR MIXER_OBJECTF_MIDIIN)
903Const MIXER_OBJECTF_AUX = &H50000000
904
905Declare Function mixerGetNumDevs Lib "winmm" () As DWord
906
907Type MIXERCAPSW
908 wMid As Word
909 wPid As Word
910 vDriverVersion As MMVERSION
911 szPname[ELM(MAXPNAMELEN)] As WCHAR
912 fdwSupport As DWord
913 cDestinations As DWord
914End Type
915TypeDef PMIXERCAPSW = *MIXERCAPSW
916TypeDef LPMIXERCAPSW = *MIXERCAPSW
917
918Type MIXERCAPSA
919 wMid As Word
920 wPid As Word
921 vDriverVersion As MMVERSION
922 szPname[ELM(MAXPNAMELEN)] As SByte
923 fdwSupport As DWord
924 cDestinations As DWord
925End Type
926TypeDef PMIXERCAPSA = *MIXERCAPSA
927TypeDef LPMIXERCAPSA = *MIXERCAPSA
928
929#ifdef UNICODE
930TypeDef MIXERCAPS = MIXERCAPSW
931TypeDef PMIXERCAPS = PMIXERCAPSW
932TypeDef LPMIXERCAPS = LPMIXERCAPSW
933Declare Function mixerGetDevCaps Lib "winmm" Alias "mixerGetDevCapsW" (uMxId As DWord, pmxcaps As *MIXERCAPSW, cbmxcaps As DWord) As MMRESULT
934#else
935TypeDef MIXERCAPS = MIXERCAPSA
936TypeDef PMIXERCAPS = PMIXERCAPSA
937TypeDef LPMIXERCAPS = LPMIXERCAPSA
938Declare Function mixerGetDevCaps Lib "winmm" Alias "mixerGetDevCapsA" (uMxId As DWord, pmxcaps As *MIXERCAPS, cbmxcaps As DWord) As MMRESULT
939#endif
940
941Declare Function mixerOpen Lib "winmm" (phmx As *HMIXER, uMxId As DWord, dwCallback As DWord, dwInstance As DWord, fdwOpen As DWord) As MMRESULT
942Declare Function mixerClose Lib "winmm" (hmx As HMIXER) As MMRESULT
943Declare Function mixerMessage Lib "winmm" (hmx As HMIXER, uMsg As DWord, dwParam1 As DWord, dwParam2 As DWord) As DWord
944
945#ifdef UNICODE
946Type TARGET
947 dwType As DWord
948 dwDeviceID As DWord
949 wMid As Word
950 wPid As Word
951 vDriverVersion As MMVERSION
952 szPname[ELM(MAXPNAMELEN)] As WCHAR
953End Type
954#else
955Type TARGET
956 dwType As DWord
957 dwDeviceID As DWord
958 wMid As Word
959 wPid As Word
960 vDriverVersion As MMVERSION
961 szPname[ELM(MAXPNAMELEN)] As SByte
962End Type
963#endif
964
965Type MIXERLINEW
966 cbStruct As DWord
967 dwDestination As DWord
968 dwSource As DWord
969 dwLineID As DWord
970 fdwLine As DWord
971 dwUser As DWord
972 dwComponentType As DWord
973 cChannels As DWord
974 cConnections As DWord
975 cControls As DWord
976 szShortName[ELM(MIXER_SHORT_NAME_CHARS)] As WCHAR
977 szName[ELM(MIXER_LONG_NAME_CHARS)] As WCHAR
978 Target As TARGET
979End Type
980TypeDef PMIXERLINEW = *MIXERLINEW
981TypeDef LPMIXERLINEW = *MIXERLINEW
982
983Type MIXERLINEA
984 cbStruct As DWord
985 dwDestination As DWord
986 dwSource As DWord
987 dwLineID As DWord
988 fdwLine As DWord
989 dwUser As DWord
990 dwComponentType As DWord
991 cChannels As DWord
992 cConnections As DWord
993 cControls As DWord
994 szShortName[ELM(MIXER_SHORT_NAME_CHARS)] As SByte
995 szName[ELM(MIXER_LONG_NAME_CHARS)] As SByte
996 Target As TARGET
997End Type
998TypeDef PMIXERLINEA = *MIXERLINEA
999TypeDef LPMIXERLINEA = *MIXERLINEA
1000
1001#ifdef UNICODE
1002TypeDef MIXERLINE = MIXERLINEA
1003TypeDef PMIXERLINE = PMIXERLINEA
1004TypeDef LPMIXERLINE = LPMIXERLINEA
1005#else
1006TypeDef MIXERLINE = MIXERLINEW
1007TypeDef PMIXERLINE = PMIXERLINEW
1008TypeDef LPMIXERLINE = LPMIXERLINEW
1009#endif
1010
1011' MIXERLINE.fdwLine
1012Const MIXERLINE_LINEF_ACTIVE = &H00000001
1013Const MIXERLINE_LINEF_DISCONNECTED = &H00008000
1014Const MIXERLINE_LINEF_SOURCE = &H80000000
1015
1016' MIXERLINE.dwComponentType
1017Const MIXERLINE_COMPONENTTYPE_DST_FIRST = &H00000000
1018Const MIXERLINE_COMPONENTTYPE_DST_UNDEFINED = (MIXERLINE_COMPONENTTYPE_DST_FIRST + 0)
1019Const MIXERLINE_COMPONENTTYPE_DST_DIGITAL = (MIXERLINE_COMPONENTTYPE_DST_FIRST + 1)
1020Const MIXERLINE_COMPONENTTYPE_DST_LINE = (MIXERLINE_COMPONENTTYPE_DST_FIRST + 2)
1021Const MIXERLINE_COMPONENTTYPE_DST_MONITOR = (MIXERLINE_COMPONENTTYPE_DST_FIRST + 3)
1022Const MIXERLINE_COMPONENTTYPE_DST_SPEAKERS = (MIXERLINE_COMPONENTTYPE_DST_FIRST + 4)
1023Const MIXERLINE_COMPONENTTYPE_DST_HEADPHONES = (MIXERLINE_COMPONENTTYPE_DST_FIRST + 5)
1024Const MIXERLINE_COMPONENTTYPE_DST_TELEPHONE = (MIXERLINE_COMPONENTTYPE_DST_FIRST + 6)
1025Const MIXERLINE_COMPONENTTYPE_DST_WAVEIN = (MIXERLINE_COMPONENTTYPE_DST_FIRST + 7)
1026Const MIXERLINE_COMPONENTTYPE_DST_VOICEIN = (MIXERLINE_COMPONENTTYPE_DST_FIRST + 8)
1027Const MIXERLINE_COMPONENTTYPE_DST_LAST = (MIXERLINE_COMPONENTTYPE_DST_FIRST + 8)
1028
1029Const MIXERLINE_COMPONENTTYPE_SRC_FIRST = &H00001000
1030Const MIXERLINE_COMPONENTTYPE_SRC_UNDEFINED = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 0)
1031Const MIXERLINE_COMPONENTTYPE_SRC_DIGITAL = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 1)
1032Const MIXERLINE_COMPONENTTYPE_SRC_LINE = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 2)
1033Const MIXERLINE_COMPONENTTYPE_SRC_MICROPHONE = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 3)
1034Const MIXERLINE_COMPONENTTYPE_SRC_SYNTHESIZER = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 4)
1035Const MIXERLINE_COMPONENTTYPE_SRC_COMPACTDISC = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 5)
1036Const MIXERLINE_COMPONENTTYPE_SRC_TELEPHONE = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 6)
1037Const MIXERLINE_COMPONENTTYPE_SRC_PCSPEAKER = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 7)
1038Const MIXERLINE_COMPONENTTYPE_SRC_WAVEOUT = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 8)
1039Const MIXERLINE_COMPONENTTYPE_SRC_AUXILIARY = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 9)
1040Const MIXERLINE_COMPONENTTYPE_SRC_ANALOG = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 10)
1041Const MIXERLINE_COMPONENTTYPE_SRC_LAST = (MIXERLINE_COMPONENTTYPE_SRC_FIRST + 10)
1042
1043' MIXERLINE.Target.dwType
1044Const MIXERLINE_TARGETTYPE_UNDEFINED = 0
1045Const MIXERLINE_TARGETTYPE_WAVEOUT = 1
1046Const MIXERLINE_TARGETTYPE_WAVEIN = 2
1047Const MIXERLINE_TARGETTYPE_MIDIOUT = 3
1048Const MIXERLINE_TARGETTYPE_MIDIIN = 4
1049Const MIXERLINE_TARGETTYPE_AUX = 5
1050
1051#ifdef UNICODE
1052Declare Function mixerGetLineInfo Lib "winmm" Alias "mixerGetLineInfoW" (hmxobj As HMIXEROBJ, pmxl As *MIXERLINEW, fdwInfo As DWord) As MMRESULT
1053#else
1054Declare Function mixerGetLineInfo Lib "winmm" Alias "mixerGetLineInfoA" (hmxobj As HMIXEROBJ, pmxl As *MIXERLINE, fdwInfo As DWord) As MMRESULT
1055#endif
1056
1057Const MIXER_GETLINEINFOF_DESTINATION = &H00000000
1058Const MIXER_GETLINEINFOF_SOURCE = &H00000001
1059Const MIXER_GETLINEINFOF_LINEID = &H00000002
1060Const MIXER_GETLINEINFOF_COMPONENTTYPE = &H00000003
1061Const MIXER_GETLINEINFOF_TARGETTYPE = &H00000004
1062Const MIXER_GETLINEINFOF_QUERYMASK = &H0000000F
1063
1064Declare Function mixerGetID Lib "winmm" (hmxobj As HMIXEROBJ, puMxId As *DWord, fdwId As DWord) As MMRESULT
1065
1066Type MIXERCONTROLW
1067 cbStruct As DWord
1068 dwControlID As DWord
1069 dwControlType As DWord
1070 fdwControl As DWord
1071 cMultipleItems As DWord
1072 szShortName[ELM(MIXER_SHORT_NAME_CHARS)] As WCHAR
1073 szName[ELM(MIXER_LONG_NAME_CHARS)] As WCHAR
1074 Bounds[ELM(6)] As DWord
1075 Metrics[ELM(6)] As DWord
1076End Type
1077TypeDef PMIXERCONTROLW = *MIXERCONTROLW
1078TypeDef LPMIXERCONTROLW = *MIXERCONTROLW
1079
1080Type MIXERCONTROLA
1081 cbStruct As DWord
1082 dwControlID As DWord
1083 dwControlType As DWord
1084 fdwControl As DWord
1085 cMultipleItems As DWord
1086 szShortName[ELM(MIXER_SHORT_NAME_CHARS)] As SByte
1087 szName[ELM(MIXER_LONG_NAME_CHARS)] As SByte
1088 Bounds[ELM(6)] As DWord
1089 Metrics[ELM(6)] As DWord
1090End Type
1091TypeDef PMIXERCONTROLA = *MIXERCONTROLA
1092TypeDef LPMIXERCONTROLA = *MIXERCONTROLA
1093
1094#ifdef UNICODE
1095TypeDef MIXERCONTROL = MIXERCONTROLW
1096TypeDef PMIXERCONTROL = PMIXERCONTROLW
1097TypeDef LPMIXERCONTROL = LPMIXERCONTROLW
1098#else
1099TypeDef MIXERCONTROL = MIXERCONTROLA
1100TypeDef PMIXERCONTROL = PMIXERCONTROLA
1101TypeDef LPMIXERCONTROL = LPMIXERCONTROLA
1102#endif
1103
1104' MIXERCONTROL.fdwControl
1105Const MIXERCONTROL_CONTROLF_UNIFORM = &H00000001
1106Const MIXERCONTROL_CONTROLF_MULTIPLE = &H00000002
1107Const MIXERCONTROL_CONTROLF_DISABLED = &H80000000
1108
1109' MIXERCONTROL_CONTROLTYPE_xxx
1110Const MIXERCONTROL_CT_CLASS_MASK = &HF0000000
1111Const MIXERCONTROL_CT_CLASS_CUSTOM = &H00000000
1112Const MIXERCONTROL_CT_CLASS_METER = &H10000000
1113Const MIXERCONTROL_CT_CLASS_SWITCH = &H20000000
1114Const MIXERCONTROL_CT_CLASS_NUMBER = &H30000000
1115Const MIXERCONTROL_CT_CLASS_SLIDER = &H40000000
1116Const MIXERCONTROL_CT_CLASS_FADER = &H50000000
1117Const MIXERCONTROL_CT_CLASS_TIME = &H60000000
1118Const MIXERCONTROL_CT_CLASS_LIST = &H70000000
1119Const MIXERCONTROL_CT_SUBCLASS_MASK = &H0F000000
1120Const MIXERCONTROL_CT_SC_SWITCH_BOOLEAN = &H00000000
1121Const MIXERCONTROL_CT_SC_SWITCH_BUTTON = &H01000000
1122Const MIXERCONTROL_CT_SC_METER_POLLED = &H00000000
1123Const MIXERCONTROL_CT_SC_TIME_MICROSECS = &H00000000
1124Const MIXERCONTROL_CT_SC_TIME_MILLISECS = &H01000000
1125Const MIXERCONTROL_CT_SC_LIST_SINGLE = &H00000000
1126Const MIXERCONTROL_CT_SC_LIST_MULTIPLE = &H01000000
1127Const MIXERCONTROL_CT_UNITS_MASK = &H00FF0000
1128Const MIXERCONTROL_CT_UNITS_CUSTOM = &H00000000
1129Const MIXERCONTROL_CT_UNITS_BOOLEAN = &H00010000
1130Const MIXERCONTROL_CT_UNITS_SIGNED = &H00020000
1131Const MIXERCONTROL_CT_UNITS_UNSIGNED = &H00030000
1132Const MIXERCONTROL_CT_UNITS_DECIBELS = &H00040000
1133Const MIXERCONTROL_CT_UNITS_PERCENT = &H00050000
1134
1135' MIXERCONTROL.dwControlType
1136Const MIXERCONTROL_CONTROLTYPE_CUSTOM = (MIXERCONTROL_CT_CLASS_CUSTOM OR MIXERCONTROL_CT_UNITS_CUSTOM)
1137Const MIXERCONTROL_CONTROLTYPE_BOOLEANMETER = (MIXERCONTROL_CT_CLASS_METER OR MIXERCONTROL_CT_SC_METER_POLLED OR MIXERCONTROL_CT_UNITS_BOOLEAN)
1138Const MIXERCONTROL_CONTROLTYPE_SIGNEDMETER = (MIXERCONTROL_CT_CLASS_METER OR MIXERCONTROL_CT_SC_METER_POLLED OR MIXERCONTROL_CT_UNITS_SIGNED)
1139Const MIXERCONTROL_CONTROLTYPE_PEAKMETER = (MIXERCONTROL_CONTROLTYPE_SIGNEDMETER + 1)
1140Const MIXERCONTROL_CONTROLTYPE_UNSIGNEDMETER = (MIXERCONTROL_CT_CLASS_METER OR MIXERCONTROL_CT_SC_METER_POLLED OR MIXERCONTROL_CT_UNITS_UNSIGNED)
1141Const MIXERCONTROL_CONTROLTYPE_BOOLEAN = (MIXERCONTROL_CT_CLASS_SWITCH OR MIXERCONTROL_CT_SC_SWITCH_BOOLEAN OR MIXERCONTROL_CT_UNITS_BOOLEAN)
1142Const MIXERCONTROL_CONTROLTYPE_ONOFF = (MIXERCONTROL_CONTROLTYPE_BOOLEAN + 1)
1143Const MIXERCONTROL_CONTROLTYPE_MUTE = (MIXERCONTROL_CONTROLTYPE_BOOLEAN + 2)
1144Const MIXERCONTROL_CONTROLTYPE_MONO = (MIXERCONTROL_CONTROLTYPE_BOOLEAN + 3)
1145Const MIXERCONTROL_CONTROLTYPE_LOUDNESS = (MIXERCONTROL_CONTROLTYPE_BOOLEAN + 4)
1146Const MIXERCONTROL_CONTROLTYPE_STEREOENH = (MIXERCONTROL_CONTROLTYPE_BOOLEAN + 5)
1147Const MIXERCONTROL_CONTROLTYPE_BUTTON = (MIXERCONTROL_CT_CLASS_SWITCH OR MIXERCONTROL_CT_SC_SWITCH_BUTTON OR MIXERCONTROL_CT_UNITS_BOOLEAN)
1148Const MIXERCONTROL_CONTROLTYPE_DECIBELS = (MIXERCONTROL_CT_CLASS_NUMBER OR MIXERCONTROL_CT_UNITS_DECIBELS)
1149Const MIXERCONTROL_CONTROLTYPE_SIGNED = (MIXERCONTROL_CT_CLASS_NUMBER OR MIXERCONTROL_CT_UNITS_SIGNED)
1150Const MIXERCONTROL_CONTROLTYPE_UNSIGNED = (MIXERCONTROL_CT_CLASS_NUMBER OR MIXERCONTROL_CT_UNITS_UNSIGNED)
1151Const MIXERCONTROL_CONTROLTYPE_PERCENT = (MIXERCONTROL_CT_CLASS_NUMBER OR MIXERCONTROL_CT_UNITS_PERCENT)
1152Const MIXERCONTROL_CONTROLTYPE_SLIDER = (MIXERCONTROL_CT_CLASS_SLIDER OR MIXERCONTROL_CT_UNITS_SIGNED)
1153Const MIXERCONTROL_CONTROLTYPE_PAN = (MIXERCONTROL_CONTROLTYPE_SLIDER + 1)
1154Const MIXERCONTROL_CONTROLTYPE_QSOUNDPAN = (MIXERCONTROL_CONTROLTYPE_SLIDER + 2)
1155Const MIXERCONTROL_CONTROLTYPE_FADER = (MIXERCONTROL_CT_CLASS_FADER OR MIXERCONTROL_CT_UNITS_UNSIGNED)
1156Const MIXERCONTROL_CONTROLTYPE_VOLUME = (MIXERCONTROL_CONTROLTYPE_FADER + 1)
1157Const MIXERCONTROL_CONTROLTYPE_BASS = (MIXERCONTROL_CONTROLTYPE_FADER + 2)
1158Const MIXERCONTROL_CONTROLTYPE_TREBLE = (MIXERCONTROL_CONTROLTYPE_FADER + 3)
1159Const MIXERCONTROL_CONTROLTYPE_EQUALIZER = (MIXERCONTROL_CONTROLTYPE_FADER + 4)
1160Const MIXERCONTROL_CONTROLTYPE_SINGLESELECT = (MIXERCONTROL_CT_CLASS_LIST OR MIXERCONTROL_CT_SC_LIST_SINGLE OR MIXERCONTROL_CT_UNITS_BOOLEAN)
1161Const MIXERCONTROL_CONTROLTYPE_MUX = (MIXERCONTROL_CONTROLTYPE_SINGLESELECT + 1)
1162Const MIXERCONTROL_CONTROLTYPE_MULTIPLESELECT = (MIXERCONTROL_CT_CLASS_LIST OR MIXERCONTROL_CT_SC_LIST_MULTIPLE OR MIXERCONTROL_CT_UNITS_BOOLEAN)
1163Const MIXERCONTROL_CONTROLTYPE_MIXER = (MIXERCONTROL_CONTROLTYPE_MULTIPLESELECT + 1)
1164Const MIXERCONTROL_CONTROLTYPE_MICROTIME = (MIXERCONTROL_CT_CLASS_TIME OR MIXERCONTROL_CT_SC_TIME_MICROSECS OR MIXERCONTROL_CT_UNITS_UNSIGNED)
1165Const MIXERCONTROL_CONTROLTYPE_MILLITIME = (MIXERCONTROL_CT_CLASS_TIME OR MIXERCONTROL_CT_SC_TIME_MILLISECS OR MIXERCONTROL_CT_UNITS_UNSIGNED)
1166
1167Type MIXERLINECONTROLSW
1168 cbStruct As DWord
1169 dwLineID As DWord
1170 dwControl_ID_Type As DWord
1171 cControls As DWord
1172 cbmxctrl As DWord
1173 pamxctrl As *MIXERCONTROLW
1174End Type
1175TypeDef PMIXERLINECONTROLSW = *MIXERLINECONTROLSW
1176TypeDef LPMIXERLINECONTROLSW = *MIXERLINECONTROLSW
1177
1178Type MIXERLINECONTROLSA
1179 cbStruct As DWord
1180 dwLineID As DWord
1181 dwControl_ID_Type As DWord
1182 cControls As DWord
1183 cbmxctrl As DWord
1184 pamxctrl As *MIXERCONTROL
1185End Type
1186TypeDef PMIXERLINECONTROLSA = *MIXERLINECONTROLSA
1187TypeDef LPMIXERLINECONTROLSA = *MIXERLINECONTROLSA
1188
1189#ifdef UNICODE
1190TypeDef MIXERLINECONTROLS = MIXERLINECONTROLSW
1191TypeDef PMIXERLINECONTROLS = PMIXERLINECONTROLSW
1192TypeDef LPMIXERLINECONTROLS = LPMIXERLINECONTROLSW
1193Declare Function mixerGetLineControls Lib "winmm" Alias "mixerGetLineControlsA" (hmxobj As HMIXEROBJ, pmxlc As *MIXERLINECONTROLSW, fdwControls As DWord) As MMRESULT
1194#else
1195TypeDef MIXERLINECONTROLS = MIXERLINECONTROLSA
1196TypeDef PMIXERLINECONTROLS = PMIXERLINECONTROLSA
1197TypeDef LPMIXERLINECONTROLS = LPMIXERLINECONTROLSA
1198Declare Function mixerGetLineControls Lib "winmm" Alias "mixerGetLineControlsA" (hmxobj As HMIXEROBJ, pmxlc As *MIXERLINECONTROLS, fdwControls As DWord) As MMRESULT
1199#endif
1200
1201Const MIXER_GETLINECONTROLSF_ALL = &H00000000
1202Const MIXER_GETLINECONTROLSF_ONEBYID = &H00000001
1203Const MIXER_GETLINECONTROLSF_ONEBYTYPE = &H00000002
1204Const MIXER_GETLINECONTROLSF_QUERYMASK = &H0000000F
1205
1206Type MIXERCONTROLDETAILS
1207 cbStruct As DWord
1208 dwControlID As DWord
1209 cChannels As DWord
1210 cMultipleItems As DWord
1211 cbDetails As DWord
1212 paDetails As VoidPtr
1213End Type
1214TypeDef PMIXERCONTROLDETAILS = *MIXERCONTROLDETAILS
1215TypeDef LPMIXERCONTROLDETAILS = *MIXERCONTROLDETAILS
1216
1217Type MIXERCONTROLDETAILS_LISTTEXTW
1218 dwParam1 As DWord
1219 dwParam2 As DWord
1220 szName[ELM(MIXER_LONG_NAME_CHARS)] As WCHAR
1221End Type
1222TypeDef PMIXERCONTROLDETAILS_LISTTEXTW = *MIXERCONTROLDETAILS_LISTTEXTW
1223TypeDef LPMIXERCONTROLDETAILS_LISTTEXTW = *MIXERCONTROLDETAILS_LISTTEXTW
1224
1225Type MIXERCONTROLDETAILS_LISTTEXTA
1226 dwParam1 As DWord
1227 dwParam2 As DWord
1228 szName[ELM(MIXER_LONG_NAME_CHARS)] As SByte
1229End Type
1230TypeDef PMIXERCONTROLDETAILS_LISTTEXTA = *MIXERCONTROLDETAILS_LISTTEXTA
1231TypeDef LPMIXERCONTROLDETAILS_LISTTEXTA = *MIXERCONTROLDETAILS_LISTTEXTA
1232
1233#ifdef UNICODE
1234TypeDef MIXERCONTROLDETAILS_LISTTEXT = MIXERCONTROLDETAILS_LISTTEXTW
1235TypeDef PMIXERCONTROLDETAILS_LISTTEXT = PMIXERCONTROLDETAILS_LISTTEXTW
1236TypeDef LPMIXERCONTROLDETAILS_LISTTEXT = LPMIXERCONTROLDETAILS_LISTTEXTW
1237#else
1238TypeDef MIXERCONTROLDETAILS_LISTTEXT = MIXERCONTROLDETAILS_LISTTEXTA
1239TypeDef PMIXERCONTROLDETAILS_LISTTEXT = PMIXERCONTROLDETAILS_LISTTEXTA
1240TypeDef LPMIXERCONTROLDETAILS_LISTTEXT = LPMIXERCONTROLDETAILS_LISTTEXTA
1241#endif
1242
1243Type MIXERCONTROLDETAILS_BOOLEAN
1244 fValue As Long
1245End Type
1246TypeDef PMIXERCONTROLDETAILS_BOOLEAN = *MIXERCONTROLDETAILS_BOOLEAN
1247TypeDef LPMIXERCONTROLDETAILS_BOOLEAN = *MIXERCONTROLDETAILS_BOOLEAN
1248
1249Type MIXERCONTROLDETAILS_SIGNED
1250 lValue As Long
1251End Type
1252TypeDef PMIXERCONTROLDETAILS_SIGNED = *MIXERCONTROLDETAILS_SIGNED
1253TypeDef LPMIXERCONTROLDETAILS_SIGNED = *MIXERCONTROLDETAILS_SIGNED
1254
1255Type MIXERCONTROLDETAILS_UNSIGNED
1256 dwValue As DWord
1257End Type
1258TypeDef PMIXERCONTROLDETAILS_UNSIGNED = *MIXERCONTROLDETAILS_UNSIGNED
1259TypeDef LPMIXERCONTROLDETAILS_UNSIGNED = *MIXERCONTROLDETAILS_UNSIGNED
1260
1261Declare Function mixerGetControlDetailsA Lib "winmm" (hmxobj As HMIXEROBJ, pmxcd As *MIXERCONTROLDETAILS, fdwDetails As DWord) As MMRESULT
1262Declare Function mixerGetControlDetailsW Lib "winmm" (hmxobj As HMIXEROBJ, pmxcd As *MIXERCONTROLDETAILS, fdwDetails As DWord) As MMRESULT
1263#ifdef UNICODE
1264Declare Function mixerGetControlDetails Lib "winmm" Alias "mixerGetControlDetailsW" (hmxobj As HMIXEROBJ, pmxcd As *MIXERCONTROLDETAILS, fdwDetails As DWord) As MMRESULT
1265#else
1266Declare Function mixerGetControlDetails Lib "winmm" Alias "mixerGetControlDetailsA" (hmxobj As HMIXEROBJ, pmxcd As *MIXERCONTROLDETAILS, fdwDetails As DWord) As MMRESULT
1267#endif
1268
1269Const MIXER_GETCONTROLDETAILSF_VALUE = &H00000000
1270Const MIXER_GETCONTROLDETAILSF_LISTTEXT = &H00000001
1271Const MIXER_GETCONTROLDETAILSF_QUERYMASK = &H0000000F
1272
1273Declare Function mixerSetControlDetails Lib "winmm" (hmxobj As HMIXEROBJ, pmxcd As *MIXERCONTROLDETAILS, fdwDetails As DWord) As MMRESULT
1274
1275Const MIXER_SETCONTROLDETAILSF_VALUE = &H00000000
1276Const MIXER_SETCONTROLDETAILSF_CUSTOM = &H00000001
1277Const MIXER_SETCONTROLDETAILSF_QUERYMASK = &H0000000F
1278
1279
1280'--------------------------------------------------------
1281' Timer support
1282
1283' timer error
1284Const TIMERR_NOERROR = (0)
1285Const TIMERR_NOCANDO = (TIMERR_BASE+1)
1286Const TIMERR_STRUCT = (TIMERR_BASE+33)
1287
1288TypeDef LPTIMECALLBACK = *Sub(uTimerID As DWord, uMsg As DWord, dwUser As DWord, dw1 As DWord, dw2 As DWord)
1289
1290Const TIME_ONESHOT = &H0000
1291Const TIME_PERIODIC = &H0001
1292
1293Const TIME_CALLBACK_FUNCTION = &H0000
1294Const TIME_CALLBACK_EVENT_SET = &H0010
1295Const TIME_CALLBACK_EVENT_PULSE = &H0020
1296
1297' timer device capabilities data structure
1298Type TIMECAPS
1299 wPeriodMin As DWord
1300 wPeriodMax As DWord
1301End Type
1302TypeDef PTIMECAPS = *TIMECAPS
1303TypeDef NPTIMECAPS = *TIMECAPS
1304TypeDef LPTIMECAPS = *TIMECAPS
1305
1306' timer function prototypes
1307Declare Function timeGetSystemTime Lib "winmm" (pmmt As *MMTIME, cbmmt As DWord) As MMRESULT
1308Declare Function timeGetTime Lib "winmm" () As DWord
1309Declare Function timeSetEvent Lib "winmm" (uDelay As DWord, uResolution As DWord, fptc As LPTIMECALLBACK, dwUser As DWord, fuEvent As DWord) As MMRESULT
1310Declare Function timeKillEvent Lib "winmm" (uTimerID As DWord) As MMRESULT
1311Declare Function timeGetDevCaps Lib "winmm" (ptc As *TIMECAPS, cbtc As DWord) As MMRESULT
1312Declare Function timeBeginPeriod Lib "winmm" (uPeriod As DWord) As MMRESULT
1313Declare Function timeEndPeriod Lib "winmm" (uPeriod As DWord) As MMRESULT
1314
1315
1316'--------------------------------------------------------
1317' Joystick support
1318
1319' joystick error
1320Const JOYERR_NOERROR = (0)
1321Const JOYERR_PARMS = (JOYERR_BASE+5)
1322Const JOYERR_NOCANDO = (JOYERR_BASE+6)
1323Const JOYERR_UNPLUGGED = (JOYERR_BASE+7)
1324
1325' constants used with JOYINFO and JOYINFOEX structures and MM_JOY* messages
1326Const JOY_BUTTON1 = &H0001
1327Const JOY_BUTTON2 = &H0002
1328Const JOY_BUTTON3 = &H0004
1329Const JOY_BUTTON4 = &H0008
1330Const JOY_BUTTON1CHG = &H0100
1331Const JOY_BUTTON2CHG = &H0200
1332Const JOY_BUTTON3CHG = &H0400
1333Const JOY_BUTTON4CHG = &H0800
1334
1335' constants used with JOYINFOEX
1336Const JOY_BUTTON5 = &H00000010
1337Const JOY_BUTTON6 = &H00000020
1338Const JOY_BUTTON7 = &H00000040
1339Const JOY_BUTTON8 = &H00000080
1340Const JOY_BUTTON9 = &H00000100
1341Const JOY_BUTTON10 = &H00000200
1342Const JOY_BUTTON11 = &H00000400
1343Const JOY_BUTTON12 = &H00000800
1344Const JOY_BUTTON13 = &H00001000
1345Const JOY_BUTTON14 = &H00002000
1346Const JOY_BUTTON15 = &H00004000
1347Const JOY_BUTTON16 = &H00008000
1348Const JOY_BUTTON17 = &H00010000
1349Const JOY_BUTTON18 = &H00020000
1350Const JOY_BUTTON19 = &H00040000
1351Const JOY_BUTTON20 = &H00080000
1352Const JOY_BUTTON21 = &H00100000
1353Const JOY_BUTTON22 = &H00200000
1354Const JOY_BUTTON23 = &H00400000
1355Const JOY_BUTTON24 = &H00800000
1356Const JOY_BUTTON25 = &H01000000
1357Const JOY_BUTTON26 = &H02000000
1358Const JOY_BUTTON27 = &H04000000
1359Const JOY_BUTTON28 = &H08000000
1360Const JOY_BUTTON29 = &H10000000
1361Const JOY_BUTTON30 = &H20000000
1362Const JOY_BUTTON31 = &H40000000
1363Const JOY_BUTTON32 = &H80000000
1364
1365' constants used with JOYINFOEX structure
1366Const JOY_POVCENTERED = (-1)
1367Const JOY_POVFORWARD = 0
1368Const JOY_POVRIGHT = 9000
1369Const JOY_POVBACKWARD = 18000
1370Const JOY_POVLEFT = 27000
1371
1372Const JOY_RETURNX = &H00000001
1373Const JOY_RETURNY = &H00000002
1374Const JOY_RETURNZ = &H00000004
1375Const JOY_RETURNR = &H00000008
1376Const JOY_RETURNU = &H00000010
1377Const JOY_RETURNV = &H00000020
1378Const JOY_RETURNPOV = &H00000040
1379Const JOY_RETURNBUTTONS = &H00000080
1380Const JOY_RETURNRAWDATA = &H00000100
1381Const JOY_RETURNPOVCTS = &H00000200
1382Const JOY_RETURNCENTERED = &H00000400
1383Const JOY_USEDEADZONE = &H00000800
1384Const JOY_RETURNALL = (JOY_RETURNX OR JOY_RETURNY OR JOY_RETURNZ OR JOY_RETURNR OR JOY_RETURNU OR JOY_RETURNV OR JOY_RETURNPOV OR JOY_RETURNBUTTONS)
1385Const JOY_CAL_READALWAYS = &H00010000
1386Const JOY_CAL_READXYONLY = &H00020000
1387Const JOY_CAL_READ3 = &H00040000
1388Const JOY_CAL_READ4 = &H00080000
1389Const JOY_CAL_READXONLY = &H00100000
1390Const JOY_CAL_READYONLY = &H00200000
1391Const JOY_CAL_READ5 = &H00400000
1392Const JOY_CAL_READ6 = &H00800000
1393Const JOY_CAL_READZONLY = &H01000000
1394Const JOY_CAL_READRONLY = &H02000000
1395Const JOY_CAL_READUONLY = &H04000000
1396Const JOY_CAL_READVONLY = &H08000000
1397
1398' joystick ID constants
1399Const JOYSTICKID1 = 0
1400Const JOYSTICKID2 = 1
1401
1402' joystick driver capabilites
1403Const JOYCAPS_HASZ = &H0001
1404Const JOYCAPS_HASR = &H0002
1405Const JOYCAPS_HASU = &H0004
1406Const JOYCAPS_HASV = &H0008
1407Const JOYCAPS_HASPOV = &H0010
1408Const JOYCAPS_POV4DIR = &H0020
1409Const JOYCAPS_POVCTS = &H0040
1410
1411Type JOYCAPSW
1412 wMid As Word
1413 wPid As Word
1414 szPname[ELM(MAXPNAMELEN)] As WCHAR
1415 wXmin As DWord
1416 wXmax As DWord
1417 wYmin As DWord
1418 wYmax As DWord
1419 wZmin As DWord
1420 wZmax As DWord
1421 wNumButtons As DWord
1422 wPeriodMin As DWord
1423 wPeriodMax As DWord
1424 wRmin As DWord
1425 wRmax As DWord
1426 wUmin As DWord
1427 wUmax As DWord
1428 wVmin As DWord
1429 wVmax As DWord
1430 wCaps As DWord
1431 wMaxAxes As DWord
1432 wNumAxes As DWord
1433 wMaxButtons As DWord
1434 szRegKey[ELM(MAXPNAMELEN)] As WCHAR
1435 szOEMVxD[ELM(MAX_JOYSTICKOEMVXDNAME)] As WCHAR
1436End Type
1437TypeDef PJOYCAPSW = *JOYCAPSW
1438TypeDef NPJOYCAPSW = *JOYCAPSW
1439TypeDef LPJOYCAPSW = *JOYCAPSW
1440
1441Type JOYCAPSA
1442 wMid As Word
1443 wPid As Word
1444 szPname[ELM(MAXPNAMELEN)] As SByte
1445 wXmin As DWord
1446 wXmax As DWord
1447 wYmin As DWord
1448 wYmax As DWord
1449 wZmin As DWord
1450 wZmax As DWord
1451 wNumButtons As DWord
1452 wPeriodMin As DWord
1453 wPeriodMax As DWord
1454 wRmin As DWord
1455 wRmax As DWord
1456 wUmin As DWord
1457 wUmax As DWord
1458 wVmin As DWord
1459 wVmax As DWord
1460 wCaps As DWord
1461 wMaxAxes As DWord
1462 wNumAxes As DWord
1463 wMaxButtons As DWord
1464 szRegKey[ELM(MAXPNAMELEN)] As SByte
1465 szOEMVxD[ELM(MAX_JOYSTICKOEMVXDNAME)] As SByte
1466End Type
1467TypeDef PJOYCAPSA = *JOYCAPSA
1468TypeDef NPJOYCAPSA = *JOYCAPSA
1469TypeDef LPJOYCAPSA = *JOYCAPSA
1470
1471#ifdef UNICODE
1472TypeDef JOYCAPS = JOYCAPSW
1473TypeDef PJOYCAPS = PJOYCAPSW
1474TypeDef NPJOYCAPS = NPJOYCAPSW
1475TypeDef LPJOYCAPS = LPJOYCAPSW
1476#else
1477TypeDef JOYCAPS = JOYCAPSA
1478TypeDef PJOYCAPS = PJOYCAPSA
1479TypeDef NPJOYCAPS = NPJOYCAPSA
1480TypeDef LPJOYCAPS = LPJOYCAPSA
1481#endif
1482
1483Type JOYINFO
1484 wXpos As DWord
1485 wYpos As DWord
1486 wZpos As DWord
1487 wButtons As DWord
1488End Type
1489TypeDef PJOYINFO = *JOYINFO
1490TypeDef NPJOYINFO = *JOYINFO
1491TypeDef LPJOYINFO = *JOYINFO
1492
1493Type JOYINFOEX
1494 dwSize As DWord
1495 dwFlags As DWord
1496 dwXpos As DWord
1497 dwYpos As DWord
1498 dwZpos As DWord
1499 dwRpos As DWord
1500 dwUpos As DWord
1501 dwVpos As DWord
1502 dwButtons As DWord
1503 dwButtonNumber As DWord
1504 dwPOV As DWord
1505 dwReserved1 As DWord
1506 dwReserved2 As DWord
1507End Type
1508TypeDef PJOYINFOEX = *JOYINFOEX
1509TypeDef NPJOYINFOEX = *JOYINFOEX
1510TypeDef LPJOYINFOEX = *JOYINFOEX
1511
1512' joystick function prototypes
1513Declare Function joyGetNumDevs Lib "winmm" () As DWord
1514#ifdef UNICODE
1515Declare Function joyGetDevCaps Lib "winmm" Alias "joyGetDevCapsW" (uJoyID As DWord, ByRef pjc As JOYCAPSW, cbjc As DWord) As MMRESULT
1516#else
1517Declare Function joyGetDevCaps Lib "winmm" Alias "joyGetDevCapsA" (uJoyID As DWord, ByRef pjc As JOYCAPSA, cbjc As DWord) As MMRESULT
1518#endif
1519Declare Function joyGetPos Lib "winmm" (uJoyID As DWord, ByRef pji As JOYINFO) As MMRESULT
1520Declare Function joyGetPosEx Lib "winmm" (uJoyID As DWord, ByRef pji As JOYINFOEX) As MMRESULT
1521Declare Function joyGetThreshold Lib "winmm" (uJoyID As DWord, ByRef puThreshold As DWord) As MMRESULT
1522Declare Function joyReleaseCapture Lib "winmm" (uJoyID As DWord) As MMRESULT
1523Declare Function joySetCapture Lib "winmm" (hwnd As HWND, uJoyID As DWord, uPeriod As DWord, fChanged As BOOL) As MMRESULT
1524Declare Function joySetThreshold Lib "winmm" (uJoyID As DWord, uThreshold As DWord) As MMRESULT
1525
1526
1527'--------------------------------------------------------
1528' Multimedia File I/O support
1529
1530' MMIO error return values
1531Const MMIOERR_BASE = 256
1532Const MMIOERR_FILENOTFOUND = (MMIOERR_BASE + 1)
1533Const MMIOERR_OUTOFMEMORY = (MMIOERR_BASE + 2)
1534Const MMIOERR_CANNOTOPEN = (MMIOERR_BASE + 3)
1535Const MMIOERR_CANNOTCLOSE = (MMIOERR_BASE + 4)
1536Const MMIOERR_CANNOTREAD = (MMIOERR_BASE + 5)
1537Const MMIOERR_CANNOTWRITE = (MMIOERR_BASE + 6)
1538Const MMIOERR_CANNOTSEEK = (MMIOERR_BASE + 7)
1539Const MMIOERR_CANNOTEXPAND = (MMIOERR_BASE + 8)
1540Const MMIOERR_CHUNKNOTFOUND = (MMIOERR_BASE + 9)
1541Const MMIOERR_UNBUFFERED = (MMIOERR_BASE + 10)
1542Const MMIOERR_PATHNOTFOUND = (MMIOERR_BASE + 11)
1543Const MMIOERR_ACCESSDENIED = (MMIOERR_BASE + 12)
1544Const MMIOERR_SHARINGVIOLATION = (MMIOERR_BASE + 13)
1545Const MMIOERR_NETWORKERROR = (MMIOERR_BASE + 14)
1546Const MMIOERR_TOOMANYOPENFILES = (MMIOERR_BASE + 15)
1547Const MMIOERR_INVALIDFILE = (MMIOERR_BASE + 16)
1548
1549' MMIO constants
1550Const CFSEPCHAR = "+"
1551
1552' MMIO data types
1553TypeDef FOURCC = DWord
1554TypeDef HPSTR = *Char
1555TypeDef HMMIO = VoidPtr
1556
1557TypeDef LPMMIOPROC = *Function(lpmmioinfo As LPSTR, uMsg As DWord, lParam1 As LPARAM, lParam2 As LPARAM) As LRESULT
1558
1559Type MMIOINFO
1560 dwFlags As DWord
1561 fccIOProc As FOURCC
1562 pIOProc As LPMMIOPROC
1563 wErrorRet As DWord
1564 htask As HTASK
1565 cchBuffer As Long
1566 pchBuffer As HPSTR
1567 pchNext As HPSTR
1568 pchEndRead As HPSTR
1569 pchEndWrite As HPSTR
1570 lBufOffset As Long
1571 lDiskOffset As Long
1572 adwInfo[ELM(3)] As DWord
1573 dwReserved1 As DWord
1574 dwReserved2 As DWord
1575 hmmio As HMMIO
1576End Type
1577TypeDef PMMIOINFO = *MMIOINFO
1578TypeDef NPMMIOINFO = *MMIOINFO
1579TypeDef LPMMIOINFO = *MMIOINFO
1580
1581Type MMCKINFO
1582 ckid As FOURCC
1583 cksize As DWord
1584 fccType As FOURCC
1585 dwDataOffset As DWord
1586 dwFlags As DWord
1587End Type
1588TypeDef PMMCKINFO = *MMCKINFO
1589TypeDef NPMMCKINFO = *MMCKINFO
1590TypeDef LPMMCKINFO = *MMCKINFO
1591
1592Const MMIO_RWMODE = &H00000003
1593Const MMIO_SHAREMODE = &H00000070
1594Const MMIO_CREATE = &H00001000
1595Const MMIO_PARSE = &H00000100
1596Const MMIO_DELETE = &H00000200
1597Const MMIO_EXIST = &H00004000
1598Const MMIO_ALLOCBUF = &H00010000
1599Const MMIO_GETTEMP = &H00020000
1600Const MMIO_DIRTY = &H10000000
1601Const MMIO_READ = &H00000000
1602Const MMIO_WRITE = &H00000001
1603Const MMIO_READWRITE = &H00000002
1604Const MMIO_COMPAT = &H00000000
1605Const MMIO_EXCLUSIVE = &H00000010
1606Const MMIO_DENYWRITE = &H00000020
1607Const MMIO_DENYREAD = &H00000030
1608Const MMIO_DENYNONE = &H00000040
1609Const MMIO_FHOPEN = &H0010
1610Const MMIO_EMPTYBUF = &H0010
1611Const MMIO_TOUPPER = &H0010
1612Const MMIO_INSTALLPROC = &H00010000
1613Const MMIO_GLOBALPROC = &H10000000
1614Const MMIO_REMOVEPROC = &H00020000
1615Const MMIO_UNICODEPROC = &H01000000
1616Const MMIO_FINDPROC = &H00040000
1617Const MMIO_FINDCHUNK = &H0010
1618Const MMIO_FINDRIFF = &H0020
1619Const MMIO_FINDLIST = &H0040
1620Const MMIO_CREATERIFF = &H0020
1621Const MMIO_CREATELIST = &H0040
1622
1623Const MMIOM_READ = MMIO_READ
1624Const MMIOM_WRITE = MMIO_WRITE
1625Const MMIOM_SEEK = 2
1626Const MMIOM_OPEN = 3
1627Const MMIOM_CLOSE = 4
1628Const MMIOM_WRITEFLUSH = 5
1629Const MMIOM_RENAME = 6
1630Const MMIOM_USER = &H8000
1631
1632Const FOURCC_RIFF = MAKEFOURCC(&H52, &H49, &H46, &H46)
1633Const FOURCC_LIST = MAKEFOURCC(&H4C, &H49, &H53, &H54)
1634Const FOURCC_DOS = MAKEFOURCC(&H44, &H4F, &H53, &H20)
1635Const FOURCC_MEM = MAKEFOURCC(&H4D, &H45, &H4D, &H20)
1636
1637Const SEEK_SET = 0
1638Const SEEK_CUR = 1
1639Const SEEK_END = 2
1640
1641Const MMIO_DEFAULTBUFFER = 8192
1642
1643Function mmioFOURCC(ch0 As String, ch1 As String, ch2 As String, ch3 As String) As FOURCC
1644 mmioFOURCC = MAKEFOURCC(Asc(ch0), Asc(ch1), Asc(ch2), Asc(ch3))
1645End Function
1646
1647' MMIO function prototypes
1648#ifdef UNICODE
1649Declare Function mmioStringToFOURCC Lib "winmm" Alias "mmioStringToFOURCCW" (sz As LPWSTR, uFlags As DWord) As FOURCC
1650Declare Function mmioInstallIOProc Lib "winmm" Alias "mmioInstallIOProcW" (fccIOProc As FOURCC, pIOProc As LPMMIOPROC, dwFlags As DWord) As LPMMIOPROC
1651Declare Function mmioOpen Lib "winmm" Alias "mmioOpenW" (pszFileName As LPWSTR, pmmioinfo As *MMIOINFO, fdwOpen As DWord) As HMMIO
1652Declare Function mmioRename Lib "winmm" Alias "mmioRenameW" (pszFileName As LPSTR, pszNewFileName As LPWSTR, pmmioinfo As *MMIOINFO, fdwRename As DWord) As MMRESULT
1653#else
1654Declare Function mmioStringToFOURCC Lib "winmm" Alias "mmioStringToFOURCCA" (sz As LPSTR, uFlags As DWord) As FOURCC
1655Declare Function mmioInstallIOProc Lib "winmm" Alias "mmioInstallIOProcA" (fccIOProc As FOURCC, pIOProc As LPMMIOPROC, dwFlags As DWord) As LPMMIOPROC
1656Declare Function mmioOpen Lib "winmm" Alias "mmioOpenA" (pszFileName As LPSTR, pmmioinfo As *MMIOINFO, fdwOpen As DWord) As HMMIO
1657Declare Function mmioRename Lib "winmm" Alias "mmioRenameA" (pszFileName As LPSTR, pszNewFileName As LPSTR, pmmioinfo As *MMIOINFO, fdwRename As DWord) As MMRESULT
1658#endif
1659Declare Function mmioClose Lib "winmm" (hmmio As HMMIO, fuClose As DWord) As MMRESULT
1660Declare Function mmioRead Lib "winmm" (hmmio As HMMIO, pch As HPSTR, cch As Long) As Long
1661Declare Function mmioWrite Lib "winmm" (hmmio As HMMIO, pch As HPSTR, cch As Long) As Long
1662Declare Function mmioSeek Lib "winmm" (hmmio As HMMIO, lOffset As Long, iOrigin As Long) As Long
1663Declare Function mmioGetInfo Lib "winmm" (hmmio As HMMIO, pmmioinfo As *MMIOINFO, fuInfo As DWord) As MMRESULT
1664Declare Function mmioSetInfo Lib "winmm" (hmmio As HMMIO, pmmioinfo As *MMIOINFO, fuInfo As DWord) As MMRESULT
1665Declare Function mmioSetBuffer Lib "winmm" (hmmio As HMMIO, pchBuffer As LPSTR, cchBuffer As Long, fuBuffer As DWord) As MMRESULT
1666Declare Function mmioFlush Lib "winmm" (hmmio As HMMIO, fuFlush As DWord) As MMRESULT
1667Declare Function mmioAdvance Lib "winmm" (hmmio As HMMIO, pmmioinfo As *MMIOINFO, fuAdvance As DWord) As MMRESULT
1668Declare Function mmioSendMessage Lib "winmm" (hmmio As HMMIO, uMsg As DWord, lParam1 As LPARAM, lParam2 As LPARAM) As LRESULT
1669Declare Function mmioDescend Lib "winmm" (hmmio As HMMIO, pmmcki As *MMCKINFO, pmmckiParent As *MMCKINFO, fuDescend As DWord) As MMRESULT
1670Declare Function mmioAscend Lib "winmm" (hmmio As HMMIO, pmmcki As *MMCKINFO, fuAscend As DWord) As MMRESULT
1671Declare Function mmioCreateChunk Lib "winmm" (hmmio As HMMIO, pmmcki As *MMCKINFO, fuCreate As DWord) As MMRESULT
1672
1673
1674'--------------------------------------------------------
1675' MCI support
1676
1677TypeDef MCIERROR = DWord
1678TypeDef MCIDEVICEID = DWord
1679TypeDef YIELDPROC = *Function(mciId As MCIDEVICEID, dwYieldData As DWord) As DWord
1680
1681' MCI Functions
1682#ifdef UNICODE
1683Declare Function mciSendCommand Lib "winmm" Alias "mciSendCommandW" (mciId As MCIDEVICEID, uMsg As DWord, dwParam1 As DWord, ByRef dwParam2 As Any) As MCIERROR
1684Declare Function mciSendString Lib "winmm" Alias "mciSendStringW" (lpstrCommand As LPWSTR, lpstrReturnString As LPWSTR, uReturnLength As DWord, hwndCallback As HWND) As MCIERROR
1685Declare Function mciGetDeviceID Lib "winmm" Alias "mciGetDeviceIDW" (pszDevice As LPWSTR) As MCIDEVICEID
1686Declare Function mciGetErrorString Lib "winmm" Alias "mciGetErrorStringA" (mcierr As MCIERROR, pszText As LPWSTR, cchText As DWord) As BOOL
1687#else
1688Declare Function mciSendCommand Lib "winmm" Alias "mciSendCommandA" (mciId As MCIDEVICEID, uMsg As DWord, dwParam1 As DWord, ByRef dwParam2 As Any) As MCIERROR
1689Declare Function mciSendString Lib "winmm" Alias "mciSendStringA" (lpstrCommand As LPSTR, lpstrReturnString As LPSTR, uReturnLength As DWord, hwndCallback As HWND) As MCIERROR
1690Declare Function mciGetDeviceID Lib "winmm" Alias "mciGetDeviceIDA" (pszDevice As LPSTR) As MCIDEVICEID
1691Declare Function mciGetErrorString Lib "winmm" Alias "mciGetErrorStringA" (mcierr As MCIERROR, pszText As LPSTR, cchText As DWord) As BOOL
1692#endif
1693
1694Declare Function mciSetYieldProc Lib "winmm" (mciId As MCIDEVICEID, fpYieldProc As YIELDPROC, dwYieldData As DWord) As BOOL
1695Declare Function mciGetCreatorTask Lib "winmm" (mciId As MCIDEVICEID) As HTASK
1696Declare Function mciGetYieldProc Lib "winmm" (mciId As MCIDEVICEID, pdwYieldData As *DWord) As YIELDPROC
1697Declare Function mciExecute Lib "winmm" (pszCommand As LPSTR) As BOOL
1698
1699Const MCIERR_INVALID_DEVICE_ID = (MCIERR_BASE + 1)
1700Const MCIERR_UNRECOGNIZED_KEYWORD = (MCIERR_BASE + 3)
1701Const MCIERR_UNRECOGNIZED_COMMAND = (MCIERR_BASE + 5)
1702Const MCIERR_HARDWARE = (MCIERR_BASE + 6)
1703Const MCIERR_INVALID_DEVICE_NAME = (MCIERR_BASE + 7)
1704Const MCIERR_OUT_OF_MEMORY = (MCIERR_BASE + 8)
1705Const MCIERR_DEVICE_OPEN = (MCIERR_BASE + 9)
1706Const MCIERR_CANNOT_LOAD_DRIVER = (MCIERR_BASE + 10)
1707Const MCIERR_MISSING_COMMAND_STRING = (MCIERR_BASE + 11)
1708Const MCIERR_PARAM_OVERFLOW = (MCIERR_BASE + 12)
1709Const MCIERR_MISSING_STRING_ARGUMENT = (MCIERR_BASE + 13)
1710Const MCIERR_BAD_INTEGER = (MCIERR_BASE + 14)
1711Const MCIERR_PARSER_INTERNAL = (MCIERR_BASE + 15)
1712Const MCIERR_DRIVER_INTERNAL = (MCIERR_BASE + 16)
1713Const MCIERR_MISSING_PARAMETER = (MCIERR_BASE + 17)
1714Const MCIERR_UNSUPPORTED_FUNCTION = (MCIERR_BASE + 18)
1715Const MCIERR_FILE_NOT_FOUND = (MCIERR_BASE + 19)
1716Const MCIERR_DEVICE_NOT_READY = (MCIERR_BASE + 20)
1717Const MCIERR_INTERNAL = (MCIERR_BASE + 21)
1718Const MCIERR_DRIVER = (MCIERR_BASE + 22)
1719Const MCIERR_CANNOT_USE_ALL = (MCIERR_BASE + 23)
1720Const MCIERR_MULTIPLE = (MCIERR_BASE + 24)
1721Const MCIERR_EXTENSION_NOT_FOUND = (MCIERR_BASE + 25)
1722Const MCIERR_OUTOFRANGE = (MCIERR_BASE + 26)
1723Const MCIERR_FLAGS_NOT_COMPATIBLE = (MCIERR_BASE + 28)
1724Const MCIERR_FILE_NOT_SAVED = (MCIERR_BASE + 30)
1725Const MCIERR_DEVICE_TYPE_REQUIRED = (MCIERR_BASE + 31)
1726Const MCIERR_DEVICE_LOCKED = (MCIERR_BASE + 32)
1727Const MCIERR_DUPLICATE_ALIAS = (MCIERR_BASE + 33)
1728Const MCIERR_BAD_CONSTANT = (MCIERR_BASE + 34)
1729Const MCIERR_MUST_USE_SHAREABLE = (MCIERR_BASE + 35)
1730Const MCIERR_MISSING_DEVICE_NAME = (MCIERR_BASE + 36)
1731Const MCIERR_BAD_TIME_FORMAT = (MCIERR_BASE + 37)
1732Const MCIERR_NO_CLOSING_QUOTE = (MCIERR_BASE + 38)
1733Const MCIERR_DUPLICATE_FLAGS = (MCIERR_BASE + 39)
1734Const MCIERR_INVALID_FILE = (MCIERR_BASE + 40)
1735Const MCIERR_NULL_PARAMETER_BLOCK = (MCIERR_BASE + 41)
1736Const MCIERR_UNNAMED_RESOURCE = (MCIERR_BASE + 42)
1737Const MCIERR_NEW_REQUIRES_ALIAS = (MCIERR_BASE + 43)
1738Const MCIERR_NOTIFY_ON_AUTO_OPEN = (MCIERR_BASE + 44)
1739Const MCIERR_NO_ELEMENT_ALLOWED = (MCIERR_BASE + 45)
1740Const MCIERR_NONAPPLICABLE_FUNCTION = (MCIERR_BASE + 46)
1741Const MCIERR_ILLEGAL_FOR_AUTO_OPEN = (MCIERR_BASE + 47)
1742Const MCIERR_FILENAME_REQUIRED = (MCIERR_BASE + 48)
1743Const MCIERR_EXTRA_CHARACTERS = (MCIERR_BASE + 49)
1744Const MCIERR_DEVICE_NOT_INSTALLED = (MCIERR_BASE + 50)
1745Const MCIERR_GET_CD = (MCIERR_BASE + 51)
1746Const MCIERR_SET_CD = (MCIERR_BASE + 52)
1747Const MCIERR_SET_DRIVE = (MCIERR_BASE + 53)
1748Const MCIERR_DEVICE_LENGTH = (MCIERR_BASE + 54)
1749Const MCIERR_DEVICE_ORD_LENGTH = (MCIERR_BASE + 55)
1750Const MCIERR_NO_INTEGER = (MCIERR_BASE + 56)
1751
1752Const MCIERR_WAVE_OUTPUTSINUSE = (MCIERR_BASE + 64)
1753Const MCIERR_WAVE_SETOUTPUTINUSE = (MCIERR_BASE + 65)
1754Const MCIERR_WAVE_INPUTSINUSE = (MCIERR_BASE + 66)
1755Const MCIERR_WAVE_SETINPUTINUSE = (MCIERR_BASE + 67)
1756Const MCIERR_WAVE_OUTPUTUNSPECIFIED = (MCIERR_BASE + 68)
1757Const MCIERR_WAVE_INPUTUNSPECIFIED = (MCIERR_BASE + 69)
1758Const MCIERR_WAVE_OUTPUTSUNSUITABLE = (MCIERR_BASE + 70)
1759Const MCIERR_WAVE_SETOUTPUTUNSUITABLE = (MCIERR_BASE + 71)
1760Const MCIERR_WAVE_INPUTSUNSUITABLE = (MCIERR_BASE + 72)
1761Const MCIERR_WAVE_SETINPUTUNSUITABLE = (MCIERR_BASE + 73)
1762
1763Const MCIERR_SEQ_DIV_INCOMPATIBLE = (MCIERR_BASE + 80)
1764Const MCIERR_SEQ_PORT_INUSE = (MCIERR_BASE + 81)
1765Const MCIERR_SEQ_PORT_NONEXISTENT = (MCIERR_BASE + 82)
1766Const MCIERR_SEQ_PORT_MAPNODEVICE = (MCIERR_BASE + 83)
1767Const MCIERR_SEQ_PORT_MISCERROR = (MCIERR_BASE + 84)
1768Const MCIERR_SEQ_TIMER = (MCIERR_BASE + 85)
1769Const MCIERR_SEQ_PORTUNSPECIFIED = (MCIERR_BASE + 86)
1770Const MCIERR_SEQ_NOMIDIPRESENT = (MCIERR_BASE + 87)
1771
1772Const MCIERR_NO_WINDOW = (MCIERR_BASE + 90)
1773Const MCIERR_CREATEWINDOW = (MCIERR_BASE + 91)
1774Const MCIERR_FILE_READ = (MCIERR_BASE + 92)
1775Const MCIERR_FILE_WRITE = (MCIERR_BASE + 93)
1776Const MCIERR_NO_IDENTITY = (MCIERR_BASE + 94)
1777Const MCIERR_CUSTOM_DRIVER_BASE = (MCIERR_BASE + 256)
1778
1779Const MCI_FIRST = DRV_MCI_FIRST
1780Const MCI_OPEN = &H0803
1781Const MCI_CLOSE = &H0804
1782Const MCI_ESCAPE = &H0805
1783Const MCI_PLAY = &H0806
1784Const MCI_SEEK = &H0807
1785Const MCI_STOP = &H0808
1786Const MCI_PAUSE = &H0809
1787Const MCI_INFO = &H080A
1788Const MCI_GETDEVCAPS = &H080B
1789Const MCI_SPIN = &H080C
1790Const MCI_SET = &H080D
1791Const MCI_STEP = &H080E
1792Const MCI_RECORD = &H080F
1793Const MCI_SYSINFO = &H0810
1794Const MCI_BREAK = &H0811
1795Const MCI_SAVE = &H0813
1796Const MCI_STATUS = &H0814
1797Const MCI_CUE = &H0830
1798Const MCI_REALIZE = &H0840
1799Const MCI_WINDOW = &H0841
1800Const MCI_PUT = &H0842
1801Const MCI_WHERE = &H0843
1802Const MCI_FREEZE = &H0844
1803Const MCI_UNFREEZE = &H0845
1804Const MCI_LOAD = &H0850
1805Const MCI_CUT = &H0851
1806Const MCI_COPY = &H0852
1807Const MCI_PASTE = &H0853
1808Const MCI_UPDATE = &H0854
1809Const MCI_RESUME = &H0855
1810Const MCI_DELETE = &H0856
1811
1812Const MCI_USER_MESSAGES = (DRV_MCI_FIRST + &H400)
1813Const MCI_LAST = &H0FFF
1814
1815Const MCI_ALL_DEVICE_ID = (-1)
1816
1817' constants for predefined MCI device types
1818Const MCI_DEVTYPE_VCR = 513
1819Const MCI_DEVTYPE_VIDEODISC = 514
1820Const MCI_DEVTYPE_OVERLAY = 515
1821Const MCI_DEVTYPE_CD_AUDIO = 516
1822Const MCI_DEVTYPE_DAT = 517
1823Const MCI_DEVTYPE_SCANNER = 518
1824Const MCI_DEVTYPE_ANIMATION = 519
1825Const MCI_DEVTYPE_DIGITAL_VIDEO = 520
1826Const MCI_DEVTYPE_OTHER = 521
1827Const MCI_DEVTYPE_WAVEFORM_AUDIO = 522
1828Const MCI_DEVTYPE_SEQUENCER = 523
1829Const MCI_DEVTYPE_FIRST = MCI_DEVTYPE_VCR
1830Const MCI_DEVTYPE_LAST = MCI_DEVTYPE_SEQUENCER
1831Const MCI_DEVTYPE_FIRST_USER = &H1000
1832
1833' return values for 'status mode' command
1834Const MCI_MODE_NOT_READY = MCI_STRING_OFFSET + 12
1835Const MCI_MODE_STOP = MCI_STRING_OFFSET + 13
1836Const MCI_MODE_PLAY = MCI_STRING_OFFSET + 14
1837Const MCI_MODE_RECORD = MCI_STRING_OFFSET + 15
1838Const MCI_MODE_SEEK = MCI_STRING_OFFSET + 16
1839Const MCI_MODE_PAUSE = MCI_STRING_OFFSET + 17
1840Const MCI_MODE_OPEN = MCI_STRING_OFFSET + 18
1841
1842'--------------------------------------------------------
1843' Time Format(used in MCI_SET_PARAMS, MCI_STATUS_PARAMS)
1844
1845Const MCI_FORMAT_MILLISECONDS = 0
1846Const MCI_FORMAT_HMS = 1
1847Const MCI_FORMAT_MSF = 2
1848Const MCI_FORMAT_FRAMES = 3
1849Const MCI_FORMAT_SMPTE_24 = 4
1850Const MCI_FORMAT_SMPTE_25 = 5
1851Const MCI_FORMAT_SMPTE_30 = 6
1852Const MCI_FORMAT_SMPTE_30DROP = 7
1853Const MCI_FORMAT_BYTES = 8
1854Const MCI_FORMAT_SAMPLES = 9
1855Const MCI_FORMAT_TMSF = 10
1856
1857'------------
1858' MCI Macros
1859
1860'MSF
1861Function MCI_MSF_MINUTE(msf As DWord) As Byte
1862 Return (&HFF and msf) As Byte
1863End Function
1864Function MCI_MSF_SECOND(msf As DWord) As Byte
1865 Return (&HFF and (msf>> 8)) As Byte
1866End Function
1867Function MCI_MSF_FRAME(msf As DWord) As Byte
1868 Return (&HFF and (msf>>16)) As Byte
1869End Function
1870Function MCI_MAKE_MSF(minutes As Byte, seconds As Byte, frames As Byte) As DWord
1871 Return MAKELONG(minutes,MAKEWORD(seconds,frames))
1872End Function
1873
1874'TMSF
1875Function MCI_TMSF_TRACK(tmsf As DWord) As Byte
1876 Return (&HFF and (tmsf)) As Byte
1877End Function
1878Function MCI_TMSF_MINUTE(tmsf As DWord) As Byte
1879 Return (&HFF and (((tmsf)) >> 8)) As Byte
1880End Function
1881Function MCI_TMSF_SECOND(tmsf As DWord) As Byte
1882 Return (&HFF and ((tmsf)>>16)) As Byte
1883End Function
1884Function MCI_TMSF_FRAME(tmsf As DWord) As Byte
1885 Return (&HFF and ((tmsf)>>24)) As Byte
1886End Function
1887Function MCI_MAKE_TMSF(tracks As Byte, minutes As Byte, seconds As Byte, frames As Byte) As DWord
1888 Return MAKELONG(MAKEWORD(tracks,minutes),MAKEWORD(seconds,frames))
1889End Function
1890
1891'HMS
1892Function MCI_HMS_HOUR(hms As DWord) As Byte
1893 Return (&HFF and (hms)) As Byte
1894End Function
1895Function MCI_HMS_MINUTE(hms As DWord) As Byte
1896 Return (&HFF and ((hms)>> 8)) As Byte
1897End Function
1898Function MCI_HMS_SECOND(hms As DWord) As Byte
1899 Return (&HFF and ((hms)>>16)) As Byte
1900End Function
1901Function MCI_MAKE_HMS(hours As Byte, minutes As Byte, seconds As Byte) As DWord
1902 Return MAKELONG(hours,MAKEWORD(minutes,seconds))
1903End Function
1904
1905' flags for wParam of MM_MCINOTIFY message
1906Const MCI_NOTIFY_SUCCESSFUL = &H0001
1907Const MCI_NOTIFY_SUPERSEDED = &H0002
1908Const MCI_NOTIFY_ABORTED = &H0004
1909Const MCI_NOTIFY_FAILURE = &H0008
1910
1911' common flags for dwFlags parameter of MCI command messages
1912Const MCI_NOTIFY = &H00000001
1913Const MCI_WAIT = &H00000002
1914Const MCI_FROM = &H00000004
1915Const MCI_TO = &H00000008
1916Const MCI_TRACK = &H00000010
1917
1918' flags for dwFlags parameter of MCI_OPEN command message
1919Const MCI_OPEN_SHAREABLE = &H00000100
1920Const MCI_OPEN_ELEMENT = &H00000200
1921Const MCI_OPEN_ALIAS = &H00000400
1922Const MCI_OPEN_ELEMENT_ID = &H00000800
1923Const MCI_OPEN_TYPE_ID = &H00001000
1924Const MCI_OPEN_TYPE = &H00002000
1925
1926' flags for dwFlags parameter of MCI_SEEK command message
1927Const MCI_SEEK_TO_START = &H00000100
1928Const MCI_SEEK_TO_END = &H00000200
1929
1930' flags for dwFlags parameter of MCI_STATUS command message
1931Const MCI_STATUS_ITEM = &H00000100
1932Const MCI_STATUS_START = &H00000200
1933
1934' flags for dwItem field of the MCI_STATUS_PARMS parameter block
1935Const MCI_STATUS_LENGTH = &H00000001
1936Const MCI_STATUS_POSITION = &H00000002
1937Const MCI_STATUS_NUMBER_OF_TRACKS = &H00000003
1938Const MCI_STATUS_MODE = &H00000004
1939Const MCI_STATUS_MEDIA_PRESENT = &H00000005
1940Const MCI_STATUS_TIME_FORMAT = &H00000006
1941Const MCI_STATUS_READY = &H00000007
1942Const MCI_STATUS_CURRENT_TRACK = &H00000008
1943
1944' flags for dwFlags parameter of MCI_INFO command message
1945Const MCI_INFO_PRODUCT = &H00000100
1946Const MCI_INFO_FILE = &H00000200
1947Const MCI_INFO_MEDIA_UPC = &H00000400
1948Const MCI_INFO_MEDIA_IDENTITY = &H00000800
1949Const MCI_INFO_NAME = &H00001000
1950Const MCI_INFO_COPYRIGHT = &H00002000
1951
1952' flags for dwFlags parameter of MCI_GETDEVCAPS command message
1953Const MCI_GETDEVCAPS_ITEM = &H00000100
1954
1955' flags for dwItem field of the MCI_GETDEVCAPS_PARMS parameter block
1956Const MCI_GETDEVCAPS_CAN_RECORD = &H00000001
1957Const MCI_GETDEVCAPS_HAS_AUDIO = &H00000002
1958Const MCI_GETDEVCAPS_HAS_VIDEO = &H00000003
1959Const MCI_GETDEVCAPS_DEVICE_TYPE = &H00000004
1960Const MCI_GETDEVCAPS_USES_FILES = &H00000005
1961Const MCI_GETDEVCAPS_COMPOUND_DEVICE = &H00000006
1962Const MCI_GETDEVCAPS_CAN_EJECT = &H00000007
1963Const MCI_GETDEVCAPS_CAN_PLAY = &H00000008
1964Const MCI_GETDEVCAPS_CAN_SAVE = &H00000009
1965
1966' flags for dwFlags parameter of MCI_SYSINFO command message
1967Const MCI_SYSINFO_QUANTITY = &H00000100
1968Const MCI_SYSINFO_OPEN = &H00000200
1969Const MCI_SYSINFO_NAME = &H00000400
1970Const MCI_SYSINFO_INSTALLNAME = &H00000800
1971
1972' flags for dwFlags parameter of MCI_SET command message
1973Const MCI_SET_DOOR_OPEN = &H00000100
1974Const MCI_SET_DOOR_CLOSED = &H00000200
1975Const MCI_SET_TIME_FORMAT = &H00000400
1976Const MCI_SET_AUDIO = &H00000800
1977Const MCI_SET_VIDEO = &H00001000
1978Const MCI_SET_ON = &H00002000
1979Const MCI_SET_OFF = &H00004000
1980
1981' flags for dwAudio field of MCI_SET_PARMS or MCI_SEQ_SET_PARMS
1982Const MCI_SET_AUDIO_ALL = &H00000000
1983Const MCI_SET_AUDIO_LEFT = &H00000001
1984Const MCI_SET_AUDIO_RIGHT = &H00000002
1985
1986' flags for dwFlags parameter of MCI_BREAK command message
1987Const MCI_BREAK_KEY = &H00000100
1988Const MCI_BREAK_HWND = &H00000200
1989Const MCI_BREAK_OFF = &H00000400
1990
1991' flags for dwFlags parameter of MCI_RECORD command message
1992Const MCI_RECORD_INSERT = &H00000100
1993Const MCI_RECORD_OVERWRITE = &H00000200
1994
1995' flags for dwFlags parameter of MCI_SAVE command message
1996Const MCI_SAVE_FILE = &H00000100
1997
1998' flags for dwFlags parameter of MCI_LOAD command message
1999Const MCI_LOAD_FILE = &H00000100
2000
2001Type MCI_GENERIC_PARMS
2002 dwCallback As DWord
2003End Type
2004TypeDef PMCI_GENERIC_PARMS = *MCI_GENERIC_PARMS
2005TypeDef LPMCI_GENERIC_PARMS = *MCI_GENERIC_PARMS
2006
2007Type MCI_OPEN_PARMSA
2008 dwCallback As DWord
2009 wDeviceID As DWord
2010 lpstrDeviceType As LPSTR
2011 lpstrElementName As LPSTR
2012 lpstrAlias As LPSTR
2013End Type
2014TypeDef PMCI_OPEN_PARMSA = *MCI_OPEN_PARMSA
2015TypeDef LPMCI_OPEN_PARMSA = *MCI_OPEN_PARMSA
2016
2017Type MCI_OPEN_PARMSW
2018 dwCallback As DWord
2019 wDeviceID As DWord
2020 lpstrDeviceType As LPWSTR
2021 lpstrElementName As LPWSTR
2022 lpstrAlias As LPWSTR
2023End Type
2024TypeDef PMCI_OPEN_PARMSW = *MCI_OPEN_PARMSW
2025TypeDef LPMCI_OPEN_PARMSW = *MCI_OPEN_PARMSW
2026
2027#ifdef UNICODE
2028TypeDef MCI_OPEN_PARMS = MCI_OPEN_PARMSW
2029TypeDef PMCI_OPEN_PARMS = PMCI_OPEN_PARMSW
2030TypeDef LPMCI_OPEN_PARMS = LPMCI_OPEN_PARMSW
2031#else
2032TypeDef MCI_OPEN_PARMS = MCI_OPEN_PARMSA
2033TypeDef PMCI_OPEN_PARMS = PMCI_OPEN_PARMSA
2034TypeDef LPMCI_OPEN_PARMS = LPMCI_OPEN_PARMSA
2035#endif
2036
2037Type MCI_PLAY_PARMS
2038 dwCallback As DWord
2039 dwFrom As DWord
2040 dwTo As DWord
2041End Type
2042TypeDef PMCI_PLAY_PARMS = *MCI_PLAY_PARMS
2043TypeDef LPMCI_PLAY_PARMS = *MCI_PLAY_PARMS
2044
2045Type MCI_SEEK_PARMS
2046 dwCallback As DWord
2047 dwTo As DWord
2048End Type
2049TypeDef PMCI_SEEK_PARMS = *MCI_SEEK_PARMS
2050TypeDef LPMCI_SEEK_PARMS = *MCI_SEEK_PARMS
2051
2052Type MCI_STATUS_PARMS
2053 dwCallback As DWord
2054 dwReturn As DWord
2055 dwItem As DWord
2056 dwTrack As DWord
2057End Type
2058TypeDef PMCI_STATUS_PARMS = *MCI_STATUS_PARMS
2059TypeDef LPMCI_STATUS_PARMS = *MCI_STATUS_PARMS
2060
2061Type MCI_INFO_PARMSW
2062 dwCallback As DWord
2063 lpstrReturn As LPWSTR
2064 dwRetSize As DWord
2065End Type
2066TypeDef PMCI_INFO_PARMSW = *MCI_INFO_PARMSW
2067TypeDef LPMCI_INFO_PARMSW = *MCI_INFO_PARMSW
2068
2069Type MCI_INFO_PARMSA
2070 dwCallback As DWord
2071 lpstrReturn As LPSTR
2072 dwRetSize As DWord
2073End Type
2074TypeDef PMCI_INFO_PARMSA = *MCI_INFO_PARMSA
2075TypeDef LPMCI_INFO_PARMSA = *MCI_INFO_PARMSA
2076
2077#ifdef UNICODE
2078TypeDef MCI_INFO_PARMS = MCI_INFO_PARMSW
2079TypeDef PMCI_INFO_PARMS = PMCI_INFO_PARMSW
2080TypeDef LPMCI_INFO_PARMS = LPMCI_INFO_PARMSW
2081#else
2082TypeDef MCI_INFO_PARMS = MCI_INFO_PARMSA
2083TypeDef PMCI_INFO_PARMS = PMCI_INFO_PARMSA
2084TypeDef LPMCI_INFO_PARMS = LPMCI_INFO_PARMSA
2085#endif
2086
2087Type MCI_GETDEVCAPS_PARMS
2088 dwCallback As DWord
2089 dwReturn As DWord
2090 dwItem As DWord
2091End Type
2092TypeDef PMCI_GETDEVCAPS_PARMS = *MCI_GETDEVCAPS_PARMS
2093TypeDef LPMCI_GETDEVCAPS_PARMS = *MCI_GETDEVCAPS_PARMS
2094
2095Type MCI_SYSINFO_PARMSW
2096 dwCallback As DWord
2097 lpstrReturn As LPWSTR
2098 dwRetSize As DWord
2099 dwNumber As DWord
2100 wDeviceType As DWord
2101End Type
2102TypeDef PMCI_SYSINFO_PARMSW = *MCI_SYSINFO_PARMSW
2103TypeDef LPMCI_SYSINFO_PARMSW = *MCI_SYSINFO_PARMSW
2104
2105Type MCI_SYSINFO_PARMSA
2106 dwCallback As DWord
2107 lpstrReturn As LPSTR
2108 dwRetSize As DWord
2109 dwNumber As DWord
2110 wDeviceType As DWord
2111End Type
2112TypeDef PMCI_SYSINFO_PARMSA = *MCI_SYSINFO_PARMSA
2113TypeDef LPMCI_SYSINFO_PARMSA = *MCI_SYSINFO_PARMSA
2114
2115#ifdef UNICODE
2116TypeDef MCI_SYSINFO_PARMS = MCI_SYSINFO_PARMSW
2117TypeDef PMCI_SYSINFO_PARMS = PMCI_SYSINFO_PARMSW
2118TypeDef LPMCI_SYSINFO_PARMS = LPMCI_SYSINFO_PARMSW
2119#else
2120TypeDef MCI_SYSINFO_PARMS = MCI_SYSINFO_PARMSA
2121TypeDef PMCI_SYSINFO_PARMS = PMCI_SYSINFO_PARMSA
2122TypeDef LPMCI_SYSINFO_PARMS = LPMCI_SYSINFO_PARMSA
2123#endif
2124
2125Type MCI_SET_PARMS
2126 dwCallback As DWord
2127 dwTimeFormat As DWord
2128 dwAudio As DWord
2129End Type
2130TypeDef PMCI_SET_PARMS = *MCI_SET_PARMS
2131TypeDef LPMCI_SET_PARMS = *MCI_SET_PARMS
2132
2133Type MCI_BREAK_PARMS
2134 dwCallback As DWord
2135 nVirtKey As Long
2136 hwndBreak As HWND
2137End Type
2138TypeDef PMCI_BREAK_PARMS = *MCI_BREAK_PARMS
2139TypeDef LPMCI_BREAK_PARMS = *MCI_BREAK_PARMS
2140
2141Type MCI_SAVE_PARMSW
2142 dwCallback As DWord
2143 lpfilename As LPWSTR
2144End Type
2145TypeDef PMCI_SAVE_PARMSW = *MCI_SAVE_PARMSW
2146TypeDef LPMCI_SAVE_PARMSW = *MCI_SAVE_PARMSW
2147
2148Type MCI_SAVE_PARMSA
2149 dwCallback As DWord
2150 lpfilename As LPSTR
2151End Type
2152TypeDef PMCI_SAVE_PARMSA = *MCI_SAVE_PARMSA
2153TypeDef LPMCI_SAVE_PARMSA = *MCI_SAVE_PARMSA
2154
2155#ifdef UNICODE
2156TypeDef MCI_SAVE_PARMS = MCI_SAVE_PARMSW
2157TypeDef PMCI_SAVE_PARMS = PMCI_SAVE_PARMSW
2158TypeDef LPMCI_SAVE_PARMS = LPMCI_SAVE_PARMSW
2159#else
2160TypeDef MCI_SAVE_PARMS = MCI_SAVE_PARMSA
2161TypeDef PMCI_SAVE_PARMS = PMCI_SAVE_PARMSA
2162TypeDef LPMCI_SAVE_PARMS = LPMCI_SAVE_PARMSA
2163#endif
2164
2165Type MCI_LOAD_PARMSW
2166 dwCallback As DWord
2167 lpfilename As LPWSTR
2168End Type
2169TypeDef PMCI_LOAD_PARMSW = *MCI_LOAD_PARMSW
2170TypeDef LPMCI_LOAD_PARMSW = *MCI_LOAD_PARMSW
2171
2172Type MCI_LOAD_PARMSA
2173 dwCallback As DWord
2174 lpfilename As LPSTR
2175End Type
2176TypeDef PMCI_LOAD_PARMSA = *MCI_LOAD_PARMSA
2177TypeDef LPMCI_LOAD_PARMSA = *MCI_LOAD_PARMSA
2178
2179#ifdef UNICODE
2180TypeDef MCI_LOAD_PARMS = MCI_LOAD_PARMSW
2181TypeDef PMCI_LOAD_PARMS = PMCI_LOAD_PARMSW
2182TypeDef LPMCI_LOAD_PARMS = LPMCI_LOAD_PARMSW
2183#else
2184TypeDef MCI_LOAD_PARMS = MCI_LOAD_PARMSA
2185TypeDef PMCI_LOAD_PARMS = PMCI_LOAD_PARMSA
2186TypeDef LPMCI_LOAD_PARMS = LPMCI_LOAD_PARMSA
2187#endif
2188
2189Type MCI_RECORD_PARMS
2190 dwCallback As DWord
2191 dwFrom As DWord
2192 dwTo As DWord
2193End Type
2194TypeDef PMCI_RECORD_PARMS = *MCI_RECORD_PARMS
2195TypeDef LPMCI_RECORD_PARMS = *MCI_RECORD_PARMS
2196
2197' MCI extensions for videodisc devices
2198Const MCI_VD_MODE_PARK = (MCI_VD_OFFSET + 1)
2199Const MCI_VD_MEDIA_CLV = (MCI_VD_OFFSET + 2)
2200Const MCI_VD_MEDIA_CAV = (MCI_VD_OFFSET + 3)
2201Const MCI_VD_MEDIA_OTHER = (MCI_VD_OFFSET + 4)
2202Const MCI_VD_FORMAT_TRACK = &H4001
2203Const MCI_VD_PLAY_REVERSE = &H00010000
2204Const MCI_VD_PLAY_FAST = &H00020000
2205Const MCI_VD_PLAY_SPEED = &H00040000
2206Const MCI_VD_PLAY_SCAN = &H00080000
2207Const MCI_VD_PLAY_SLOW = &H00100000
2208Const MCI_VD_SEEK_REVERSE = &H00010000
2209Const MCI_VD_STATUS_SPEED = &H00004002
2210Const MCI_VD_STATUS_FORWARD = &H00004003
2211Const MCI_VD_STATUS_MEDIA_TYPE = &H00004004
2212Const MCI_VD_STATUS_SIDE = &H00004005
2213Const MCI_VD_STATUS_DISC_SIZE = &H00004006
2214Const MCI_VD_GETDEVCAPS_CLV = &H00010000
2215Const MCI_VD_GETDEVCAPS_CAV = &H00020000
2216Const MCI_VD_SPIN_UP = &H00010000
2217Const MCI_VD_SPIN_DOWN = &H00020000
2218Const MCI_VD_GETDEVCAPS_CAN_REVERSE = &H00004002
2219Const MCI_VD_GETDEVCAPS_FAST_RATE = &H00004003
2220Const MCI_VD_GETDEVCAPS_SLOW_RATE = &H00004004
2221Const MCI_VD_GETDEVCAPS_NORMAL_RATE = &H00004005
2222Const MCI_VD_STEP_FRAMES = &H00010000
2223Const MCI_VD_STEP_REVERSE = &H00020000
2224Const MCI_VD_ESCAPE_STRING = &H00000100
2225
2226Type MCI_VD_PLAY_PARMS
2227 dwCallback As DWord
2228 dwFrom As DWord
2229 dwTo As DWord
2230 dwSpeed As DWord
2231End Type
2232TypeDef PMCI_VD_PLAY_PARMS = *MCI_VD_PLAY_PARMS
2233TypeDef LPMCI_VD_PLAY_PARMS = *MCI_VD_PLAY_PARMS
2234
2235Type MCI_VD_STEP_PARMS
2236 dwCallback As DWord
2237 dwFrames As DWord
2238End Type
2239TypeDef PMCI_VD_STEP_PARMS = *MCI_VD_STEP_PARMS
2240TypeDef LPMCI_VD_STEP_PARMS = *MCI_VD_STEP_PARMS
2241
2242Type MCI_VD_ESCAPE_PARMSW
2243 dwCallback As DWord
2244 lpstrCommand As LPWSTR
2245End Type
2246TypeDef PMCI_VD_ESCAPE_PARMSW = *MCI_VD_ESCAPE_PARMSW
2247TypeDef LPMCI_VD_ESCAPE_PARMSW = *MCI_VD_ESCAPE_PARMSW
2248
2249Type MCI_VD_ESCAPE_PARMSA
2250 dwCallback As DWord
2251 lpstrCommand As LPSTR
2252End Type
2253TypeDef PMCI_VD_ESCAPE_PARMSA = *MCI_VD_ESCAPE_PARMSA
2254TypeDef LPMCI_VD_ESCAPE_PARMSA = *MCI_VD_ESCAPE_PARMSA
2255
2256#ifdef UNICODE
2257TypeDef MCI_VD_ESCAPE_PARMS = MCI_VD_ESCAPE_PARMSW
2258TypeDef PMCI_VD_ESCAPE_PARMS = PMCI_VD_ESCAPE_PARMSW
2259TypeDef LPMCI_VD_ESCAPE_PARMS = LPMCI_VD_ESCAPE_PARMSW
2260#else
2261TypeDef MCI_VD_ESCAPE_PARMS = MCI_VD_ESCAPE_PARMSA
2262TypeDef PMCI_VD_ESCAPE_PARMS = PMCI_VD_ESCAPE_PARMSA
2263TypeDef LPMCI_VD_ESCAPE_PARMS = LPMCI_VD_ESCAPE_PARMSA
2264#endif
2265
2266' MCI extensions for CD audio devices
2267Const MCI_CDA_STATUS_TYPE_TRACK = &H00004001
2268Const MCI_CDA_TRACK_AUDIO = (MCI_CD_OFFSET + 0)
2269Const MCI_CDA_TRACK_OTHER = (MCI_CD_OFFSET + 1)
2270
2271' MCI extensions for waveform audio devices
2272Const MCI_WAVE_PCM = (MCI_WAVE_OFFSET + 0)
2273Const MCI_WAVE_MAPPER = (MCI_WAVE_OFFSET + 1)
2274Const MCI_WAVE_OPEN_BUFFER = &H00010000
2275Const MCI_WAVE_SET_FORMATTAG = &H00010000
2276Const MCI_WAVE_SET_CHANNELS = &H00020000
2277Const MCI_WAVE_SET_SAMPLESPERSEC = &H00040000
2278Const MCI_WAVE_SET_AVGBYTESPERSEC = &H00080000
2279Const MCI_WAVE_SET_BLOCKALIGN = &H00100000
2280Const MCI_WAVE_SET_BITSPERSAMPLE = &H00200000
2281Const MCI_WAVE_INPUT = &H00400000
2282Const MCI_WAVE_OUTPUT = &H00800000
2283Const MCI_WAVE_STATUS_FORMATTAG = &H00004001
2284Const MCI_WAVE_STATUS_CHANNELS = &H00004002
2285Const MCI_WAVE_STATUS_SAMPLESPERSEC = &H00004003
2286Const MCI_WAVE_STATUS_AVGBYTESPERSEC = &H00004004
2287Const MCI_WAVE_STATUS_BLOCKALIGN = &H00004005
2288Const MCI_WAVE_STATUS_BITSPERSAMPLE = &H00004006
2289Const MCI_WAVE_STATUS_LEVEL = &H00004007
2290Const MCI_WAVE_SET_ANYINPUT = &H04000000
2291Const MCI_WAVE_SET_ANYOUTPUT = &H08000000
2292Const MCI_WAVE_GETDEVCAPS_INPUTS = &H00004001
2293Const MCI_WAVE_GETDEVCAPS_OUTPUTS = &H00004002
2294
2295Type MCI_WAVE_OPEN_PARMSW
2296 dwCallback As DWord
2297 wDeviceID As MCIDEVICEID
2298 lpstrDeviceType As LPWSTR
2299 lpstrElementName As LPWSTR
2300 lpstrAlias As LPWSTR
2301 dwBufferSeconds As DWord
2302End Type
2303TypeDef PMCI_WAVE_OPEN_PARMSW = *MCI_WAVE_OPEN_PARMSW
2304TypeDef LPMCI_WAVE_OPEN_PARMSW = *MCI_WAVE_OPEN_PARMSW
2305
2306Type MCI_WAVE_OPEN_PARMSA
2307 dwCallback As DWord
2308 wDeviceID As MCIDEVICEID
2309 lpstrDeviceType As LPSTR
2310 lpstrElementName As LPSTR
2311 lpstrAlias As LPSTR
2312 dwBufferSeconds As DWord
2313End Type
2314TypeDef PMCI_WAVE_OPEN_PARMSA = *MCI_WAVE_OPEN_PARMSA
2315TypeDef LPMCI_WAVE_OPEN_PARMSA = *MCI_WAVE_OPEN_PARMSA
2316
2317#ifdef UNICODE
2318TypeDef MCI_WAVE_OPEN_PARMS = MCI_WAVE_OPEN_PARMSW
2319TypeDef PMCI_WAVE_OPEN_PARMS = PMCI_WAVE_OPEN_PARMSW
2320TypeDef LPMCI_WAVE_OPEN_PARMS = LPMCI_WAVE_OPEN_PARMSW
2321#else
2322TypeDef MCI_WAVE_OPEN_PARMS = MCI_WAVE_OPEN_PARMSA
2323TypeDef PMCI_WAVE_OPEN_PARMS = PMCI_WAVE_OPEN_PARMSA
2324TypeDef LPMCI_WAVE_OPEN_PARMS = LPMCI_WAVE_OPEN_PARMSA
2325#endif
2326
2327Type MCI_WAVE_DELETE_PARMS
2328 dwCallback As DWord
2329 dwFrom As DWord
2330 dwTo As DWord
2331End Type
2332TypeDef PMCI_WAVE_DELETE_PARMS = *MCI_WAVE_DELETE_PARMS
2333TypeDef LPMCI_WAVE_DELETE_PARMS = *MCI_WAVE_DELETE_PARMS
2334
2335Type MCI_WAVE_SET_PARMS
2336 dwCallback As DWord
2337 dwTimeFormat As DWord
2338 dwAudio As DWord
2339 wInput As DWord
2340 wOutput As DWord
2341 wFormatTag As Word
2342 wReserved2 As Word
2343 nChannels As Word
2344 wReserved3 As Word
2345 nSamplesPerSec As DWord
2346 nAvgBytesPerSec As DWord
2347 nBlockAlign As Word
2348 wReserved4 As Word
2349 wBitsPerSample As Word
2350 wReserved5 As Word
2351End Type
2352TypeDef PMCI_WAVE_SET_PARMS = *MCI_WAVE_SET_PARMS
2353TypeDef LPMCI_WAVE_SET_PARMS = *MCI_WAVE_SET_PARMS
2354
2355' MCI extensions for MIDI sequencer devices
2356Const MCI_SEQ_DIV_PPQN = (0 + MCI_SEQ_OFFSET)
2357Const MCI_SEQ_DIV_SMPTE_24 = (1 + MCI_SEQ_OFFSET)
2358Const MCI_SEQ_DIV_SMPTE_25 = (2 + MCI_SEQ_OFFSET)
2359Const MCI_SEQ_DIV_SMPTE_30DROP = (3 + MCI_SEQ_OFFSET)
2360Const MCI_SEQ_DIV_SMPTE_30 = (4 + MCI_SEQ_OFFSET)
2361Const MCI_SEQ_FORMAT_SONGPTR = &H4001
2362Const MCI_SEQ_FILE = &H4002
2363Const MCI_SEQ_MIDI = &H4003
2364Const MCI_SEQ_SMPTE = &H4004
2365Const MCI_SEQ_NONE = 65533
2366Const MCI_SEQ_MAPPER = 65535
2367Const MCI_SEQ_STATUS_TEMPO = &H00004002
2368Const MCI_SEQ_STATUS_PORT = &H00004003
2369Const MCI_SEQ_STATUS_SLAVE = &H00004007
2370Const MCI_SEQ_STATUS_MASTER = &H00004008
2371Const MCI_SEQ_STATUS_OFFSET = &H00004009
2372Const MCI_SEQ_STATUS_DIVTYPE = &H0000400A
2373Const MCI_SEQ_STATUS_NAME = &H0000400B
2374Const MCI_SEQ_STATUS_COPYRIGHT = &H0000400C
2375Const MCI_SEQ_SET_TEMPO = &H00010000
2376Const MCI_SEQ_SET_PORT = &H00020000
2377Const MCI_SEQ_SET_SLAVE = &H00040000
2378Const MCI_SEQ_SET_MASTER = &H00080000
2379Const MCI_SEQ_SET_OFFSET = &H01000000
2380
2381Type MCI_SEQ_SET_PARMS
2382 dwCallback As DWord
2383 dwTimeFormat As DWord
2384 dwAudio As DWord
2385 dwTempo As DWord
2386 dwPort As DWord
2387 dwSlave As DWord
2388 dwMaster As DWord
2389 dwOffset As DWord
2390End Type
2391TypeDef PMCI_SEQ_SET_PARMS = *MCI_SEQ_SET_PARMS
2392TypeDef LPMCI_SEQ_SET_PARMS = *MCI_SEQ_SET_PARMS
2393
2394' MCI extensions for animation devices
2395Const MCI_ANIM_OPEN_WS = &H00010000
2396Const MCI_ANIM_OPEN_PARENT = &H00020000
2397Const MCI_ANIM_OPEN_NOSTATIC = &H00040000
2398Const MCI_ANIM_PLAY_SPEED = &H00010000
2399Const MCI_ANIM_PLAY_REVERSE = &H00020000
2400Const MCI_ANIM_PLAY_FAST = &H00040000
2401Const MCI_ANIM_PLAY_SLOW = &H00080000
2402Const MCI_ANIM_PLAY_SCAN = &H00100000
2403Const MCI_ANIM_STEP_REVERSE = &H00010000
2404Const MCI_ANIM_STEP_FRAMES = &H00020000
2405Const MCI_ANIM_STATUS_SPEED = &H00004001
2406Const MCI_ANIM_STATUS_FORWARD = &H00004002
2407Const MCI_ANIM_STATUS_HWND = &H00004003
2408Const MCI_ANIM_STATUS_HPAL = &H00004004
2409Const MCI_ANIM_STATUS_STRETCH = &H00004005
2410Const MCI_ANIM_INFO_TEXT = &H00010000
2411Const MCI_ANIM_GETDEVCAPS_CAN_REVERSE = &H00004001
2412Const MCI_ANIM_GETDEVCAPS_FAST_RATE = &H00004002
2413Const MCI_ANIM_GETDEVCAPS_SLOW_RATE = &H00004003
2414Const MCI_ANIM_GETDEVCAPS_NORMAL_RATE = &H00004004
2415Const MCI_ANIM_GETDEVCAPS_PALETTES = &H00004006
2416Const MCI_ANIM_GETDEVCAPS_CAN_STRETCH = &H00004007
2417Const MCI_ANIM_GETDEVCAPS_MAX_WINDOWS = &H00004008
2418Const MCI_ANIM_REALIZE_NORM = &H00010000
2419Const MCI_ANIM_REALIZE_BKGD = &H00020000
2420Const MCI_ANIM_WINDOW_HWND = &H00010000
2421Const MCI_ANIM_WINDOW_STATE = &H00040000
2422Const MCI_ANIM_WINDOW_TEXT = &H00080000
2423Const MCI_ANIM_WINDOW_ENABLE_STRETCH = &H00100000
2424Const MCI_ANIM_WINDOW_DISABLE_STRETCH = &H00200000
2425Const MCI_ANIM_WINDOW_DEFAULT = &H00000000
2426Const MCI_ANIM_RECT = &H00010000
2427Const MCI_ANIM_PUT_SOURCE = &H00020000
2428Const MCI_ANIM_PUT_DESTINATION = &H00040000
2429Const MCI_ANIM_WHERE_SOURCE = &H00020000
2430Const MCI_ANIM_WHERE_DESTINATION = &H00040000
2431Const MCI_ANIM_UPDATE_HDC = &H00020000
2432
2433Type MCI_ANIM_OPEN_PARMSW
2434 dwCallback As DWord
2435 wDeviceID As MCIDEVICEID
2436 lpstrDeviceType As LPWSTR
2437 lpstrElementName As LPWSTR
2438 lpstrAlias As LPWSTR
2439 dwStyle As DWord
2440 hWndParent As HWND
2441End Type
2442TypeDef PMCI_ANIM_OPEN_PARMSW = *MCI_ANIM_OPEN_PARMSW
2443TypeDef LPMCI_ANIM_OPEN_PARMSW = *MCI_ANIM_OPEN_PARMSW
2444
2445Type MCI_ANIM_OPEN_PARMSA
2446 dwCallback As DWord
2447 wDeviceID As MCIDEVICEID
2448 lpstrDeviceType As LPSTR
2449 lpstrElementName As LPSTR
2450 lpstrAlias As LPSTR
2451 dwStyle As DWord
2452 hWndParent As HWND
2453End Type
2454TypeDef PMCI_ANIM_OPEN_PARMSA = *MCI_ANIM_OPEN_PARMSA
2455TypeDef LPMCI_ANIM_OPEN_PARMSA = *MCI_ANIM_OPEN_PARMSA
2456
2457#ifdef UNICODE
2458TypeDef MCI_ANIM_OPEN_PARMS = MCI_ANIM_OPEN_PARMSW
2459TypeDef PMCI_ANIM_OPEN_PARMS = PMCI_ANIM_OPEN_PARMSW
2460TypeDef LPMCI_ANIM_OPEN_PARMS = LPMCI_ANIM_OPEN_PARMSW
2461#else
2462TypeDef MCI_ANIM_OPEN_PARMS = MCI_ANIM_OPEN_PARMSA
2463TypeDef PMCI_ANIM_OPEN_PARMS = PMCI_ANIM_OPEN_PARMSA
2464TypeDef LPMCI_ANIM_OPEN_PARMS = LPMCI_ANIM_OPEN_PARMSA
2465#endif
2466
2467Type MCI_ANIM_PLAY_PARMS
2468 dwCallback As DWord
2469 dwFrom As DWord
2470 dwTo As DWord
2471 dwSpeed As DWord
2472End Type
2473TypeDef PMCI_ANIM_PLAY_PARMS = *MCI_ANIM_PLAY_PARMS
2474TypeDef LPMCI_ANIM_PLAY_PARMS = *MCI_ANIM_PLAY_PARMS
2475
2476Type MCI_ANIM_STEP_PARMS
2477 dwCallback As DWord
2478 dwFrames As DWord
2479End Type
2480TypeDef PMCI_ANIM_STEP_PARMS = *MCI_ANIM_STEP_PARMS
2481TypeDef LPMCI_ANIM_STEP_PARMS = *MCI_ANIM_STEP_PARMS
2482
2483Type MCI_ANIM_WINDOW_PARMSA
2484 dwCallback As DWord
2485 hWnd As HWND
2486 nCmdShow As DWord
2487 lpstrText As LPSTR
2488End Type
2489TypeDef PMCI_ANIM_WINDOW_PARMSA = *MCI_ANIM_WINDOW_PARMSA
2490TypeDef LPMCI_ANIM_WINDOW_PARMSA = *MCI_ANIM_WINDOW_PARMSA
2491TypeDef MCI_ANIM_WINDOW_PARMS = MCI_ANIM_WINDOW_PARMSA
2492TypeDef PMCI_ANIM_WINDOW_PARMS = PMCI_ANIM_WINDOW_PARMSA
2493TypeDef LPMCI_ANIM_WINDOW_PARMS = LPMCI_ANIM_WINDOW_PARMSA
2494
2495Type MCI_ANIM_RECT_PARMS
2496 dwCallback As DWord
2497 rc As RECT
2498End Type
2499TypeDef PMCI_ANIM_RECT_PARMS = *MCI_ANIM_RECT_PARMS
2500TypeDef LPMCI_ANIM_RECT_PARMS = *MCI_ANIM_RECT_PARMS
2501
2502Type MCI_ANIM_UPDATE_PARMS
2503 dwCallback As DWord
2504 rc As RECT
2505 hDC As HDC
2506End Type
2507TypeDef PMCI_ANIM_UPDATE_PARMS = *MCI_ANIM_UPDATE_PARMS
2508TypeDef LPMCI_ANIM_UPDATE_PARMS = *MCI_ANIM_UPDATE_PARMS
2509
2510' MCI extensions for video overlay devices
2511Const MCI_OVLY_OPEN_WS = &H00010000
2512Const MCI_OVLY_OPEN_PARENT = &H00020000
2513Const MCI_OVLY_STATUS_HWND = &H00004001
2514Const MCI_OVLY_STATUS_STRETCH = &H00004002
2515Const MCI_OVLY_INFO_TEXT = &H00010000
2516Const MCI_OVLY_GETDEVCAPS_CAN_STRETCH = &H00004001
2517Const MCI_OVLY_GETDEVCAPS_CAN_FREEZE = &H00004002
2518Const MCI_OVLY_GETDEVCAPS_MAX_WINDOWS = &H00004003
2519Const MCI_OVLY_WINDOW_HWND = &H00010000
2520Const MCI_OVLY_WINDOW_STATE = &H00040000
2521Const MCI_OVLY_WINDOW_TEXT = &H00080000
2522Const MCI_OVLY_WINDOW_ENABLE_STRETCH = &H00100000
2523Const MCI_OVLY_WINDOW_DISABLE_STRETCH = &H00200000
2524Const MCI_OVLY_WINDOW_DEFAULT = &H00000000
2525Const MCI_OVLY_RECT = &H00010000
2526Const MCI_OVLY_PUT_SOURCE = &H00020000
2527Const MCI_OVLY_PUT_DESTINATION = &H00040000
2528Const MCI_OVLY_PUT_FRAME = &H00080000
2529Const MCI_OVLY_PUT_VIDEO = &H00100000
2530Const MCI_OVLY_WHERE_SOURCE = &H00020000
2531Const MCI_OVLY_WHERE_DESTINATION = &H00040000
2532Const MCI_OVLY_WHERE_FRAME = &H00080000
2533Const MCI_OVLY_WHERE_VIDEO = &H00100000
2534
2535Type MCI_OVLY_OPEN_PARMSW
2536 dwCallback As DWord
2537 wDeviceID As MCIDEVICEID
2538 lpstrDeviceType As LPWSTR
2539 lpstrElementName As LPWSTR
2540 lpstrAlias As LPWSTR
2541 dwStyle As DWord
2542 hWndParent As HWND
2543End Type
2544TypeDef PMCI_OVLY_OPEN_PARMSW = *MCI_OVLY_OPEN_PARMSW
2545TypeDef LPMCI_OVLY_OPEN_PARMSW = *MCI_OVLY_OPEN_PARMSW
2546
2547Type MCI_OVLY_OPEN_PARMSA
2548 dwCallback As DWord
2549 wDeviceID As MCIDEVICEID
2550 lpstrDeviceType As LPSTR
2551 lpstrElementName As LPSTR
2552 lpstrAlias As LPSTR
2553 dwStyle As DWord
2554 hWndParent As HWND
2555End Type
2556TypeDef PMCI_OVLY_OPEN_PARMSA = *MCI_OVLY_OPEN_PARMSA
2557TypeDef LPMCI_OVLY_OPEN_PARMSA = *MCI_OVLY_OPEN_PARMSA
2558
2559#ifdef UNICODE
2560TypeDef MCI_OVLY_OPEN_PARMS = MCI_OVLY_OPEN_PARMSW
2561TypeDef PMCI_OVLY_OPEN_PARMS = PMCI_OVLY_OPEN_PARMSW
2562TypeDef LPMCI_OVLY_OPEN_PARMS = LPMCI_OVLY_OPEN_PARMSW
2563#else
2564TypeDef MCI_OVLY_OPEN_PARMS = MCI_OVLY_OPEN_PARMSA
2565TypeDef PMCI_OVLY_OPEN_PARMS = PMCI_OVLY_OPEN_PARMSA
2566TypeDef LPMCI_OVLY_OPEN_PARMS = LPMCI_OVLY_OPEN_PARMSA
2567#endif
2568
2569Type MCI_OVLY_WINDOW_PARMSA
2570 dwCallback As DWord
2571 hWnd As HWND
2572 nCmdShow As DWord
2573 lpstrText As LPSTR
2574End Type
2575TypeDef PMCI_OVLY_WINDOW_PARMSA = *MCI_OVLY_WINDOW_PARMSA
2576TypeDef LPMCI_OVLY_WINDOW_PARMSA = *MCI_OVLY_WINDOW_PARMSA
2577
2578Type MCI_OVLY_WINDOW_PARMSW
2579 dwCallback As DWord
2580 hWnd As HWND
2581 nCmdShow As DWord
2582 lpstrText As LPWSTR
2583End Type
2584TypeDef PMCI_OVLY_WINDOW_PARMSW = *MCI_OVLY_WINDOW_PARMSW
2585TypeDef LPMCI_OVLY_WINDOW_PARMSW = *MCI_OVLY_WINDOW_PARMSW
2586
2587#ifdef UNICODE
2588TypeDef MCI_OVLY_WINDOW_PARMS = MCI_OVLY_WINDOW_PARMSW
2589TypeDef PMCI_OVLY_WINDOW_PARMS = PMCI_OVLY_WINDOW_PARMSW
2590TypeDef LPMCI_OVLY_WINDOW_PARMS = LPMCI_OVLY_WINDOW_PARMSW
2591#else
2592TypeDef MCI_OVLY_WINDOW_PARMS = MCI_OVLY_WINDOW_PARMSA
2593TypeDef PMCI_OVLY_WINDOW_PARMS = PMCI_OVLY_WINDOW_PARMSA
2594TypeDef LPMCI_OVLY_WINDOW_PARMS = LPMCI_OVLY_WINDOW_PARMSA
2595#endif
2596
2597Type MCI_OVLY_RECT_PARMS
2598 dwCallback As DWord
2599 rc As RECT
2600End Type
2601TypeDef PMCI_OVLY_RECT_PARMS = *MCI_OVLY_RECT_PARMS
2602TypeDef LPMCI_OVLY_RECT_PARMS = *MCI_OVLY_RECT_PARMS
2603
2604Type MCI_OVLY_SAVE_PARMSW
2605 dwCallback As DWord
2606 lpfilename As LPWSTR
2607 rc As RECT
2608End Type
2609TypeDef PMCI_OVLY_SAVE_PARMSW = *MCI_OVLY_SAVE_PARMSW
2610TypeDef LPMCI_OVLY_SAVE_PARMSW = *MCI_OVLY_SAVE_PARMSW
2611
2612Type MCI_OVLY_SAVE_PARMSA
2613 dwCallback As DWord
2614 lpfilename As LPSTR
2615 rc As RECT
2616End Type
2617TypeDef PMCI_OVLY_SAVE_PARMSA = *MCI_OVLY_SAVE_PARMSA
2618TypeDef LPMCI_OVLY_SAVE_PARMSA = *MCI_OVLY_SAVE_PARMSA
2619
2620#ifdef UNICODE
2621TypeDef MCI_OVLY_SAVE_PARMS = MCI_OVLY_SAVE_PARMSW
2622TypeDef PMCI_OVLY_SAVE_PARMS = PMCI_OVLY_SAVE_PARMSW
2623TypeDef LPMCI_OVLY_SAVE_PARMS = LPMCI_OVLY_SAVE_PARMSW
2624#else
2625TypeDef MCI_OVLY_SAVE_PARMS = MCI_OVLY_SAVE_PARMSA
2626TypeDef PMCI_OVLY_SAVE_PARMS = PMCI_OVLY_SAVE_PARMSA
2627TypeDef LPMCI_OVLY_SAVE_PARMS = LPMCI_OVLY_SAVE_PARMSA
2628#endif
2629
2630Type MCI_OVLY_LOAD_PARMSW
2631 dwCallback As DWord
2632 lpfilename As LPWSTR
2633 rc As RECT
2634End Type
2635TypeDef PMCI_OVLY_LOAD_PARMSW = *MCI_OVLY_LOAD_PARMSW
2636TypeDef LPMCI_OVLY_LOAD_PARMSW = *MCI_OVLY_LOAD_PARMSW
2637
2638Type MCI_OVLY_LOAD_PARMSA
2639 dwCallback As DWord
2640 lpfilename As LPSTR
2641 rc As RECT
2642End Type
2643TypeDef PMCI_OVLY_LOAD_PARMSA = *MCI_OVLY_LOAD_PARMSA
2644TypeDef LPMCI_OVLY_LOAD_PARMSA = *MCI_OVLY_LOAD_PARMSA
2645
2646#ifdef UNICODE
2647TypeDef MCI_OVLY_LOAD_PARMS = MCI_OVLY_LOAD_PARMSW
2648TypeDef PMCI_OVLY_LOAD_PARMS = PMCI_OVLY_LOAD_PARMSW
2649TypeDef LPMCI_OVLY_LOAD_PARMS = LPMCI_OVLY_LOAD_PARMSW
2650#else
2651TypeDef MCI_OVLY_LOAD_PARMS = MCI_OVLY_LOAD_PARMSA
2652TypeDef PMCI_OVLY_LOAD_PARMS = PMCI_OVLY_LOAD_PARMSA
2653TypeDef LPMCI_OVLY_LOAD_PARMS = LPMCI_OVLY_LOAD_PARMSA
2654#endif
2655
2656' DISPLAY Driver extensions
2657Const NEWTRANSPARENT = 3
2658Const QUERYROPSUPPORT = 40
2659
2660' DIB Driver extensions
2661Const SELECTDIB = 41
2662Const DIBINDEX(n) = MAKELONG(n,&H10FF)
2663
2664#endif '_INC_MMSYS
Note: See TracBrowser for help on using the repository browser.