source: branch/egtra-gdiplus/api_mmsys.sbp@ 374

Last change on this file since 374 was 181, checked in by dai, 18 years ago

MCI_OVLY_WINDOW_PARMSAの定義漏れを修正。

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