Index: Include/api_mmsys.sbp
===================================================================
--- Include/api_mmsys.sbp	(revision 95)
+++ Include/api_mmsys.sbp	(revision 141)
@@ -6,4 +6,55 @@
 #define _INC_MMSYS
 
+#ifdef UNICODE
+Const _FuncName_sndPlaySound = "sndPlaySoundW"
+Const _FuncName_PlaySound = "PlaySoundW"
+Const _FuncName_waveOutGetDevCaps = "waveOutGetDevCapsW"
+Const _FuncName_waveOutGetErrorText = "waveOutGetErrorTextW"
+Const _FuncName_waveInGetDevCaps = "waveInGetDevCapsW"
+Const _FuncName_waveInGetErrorText = "waveInGetErrorTextW"
+Const _FuncName_midiOutGetDevCaps = "midiOutGetDevCapsW"
+Const _FuncName_midiOutGetErrorText = "midiOutGetErrorTextW"
+Const _FuncName_midiInGetDevCaps = "midiInGetDevCapsW"
+Const _FuncName_midiInGetErrorText = "midiInGetErrorTextW"
+Const _FuncName_auxGetDevCaps = "auxGetDevCapsW"
+Const _FuncName_mixerGetDevCaps = "mixerGetDevCapsW"
+Const _FuncName_mixerGetLineInfo = "mixerGetLineInfoW"
+Const _FuncName_mixerGetLineControls = "mixerGetLineControlsW"
+Const _FuncName_mixerGetControlDetails = "mixerGetControlDetailsW"
+Const _FuncName_joyGetDevCaps = "joyGetDevCapsW"
+Const _FuncName_mmioStringToFOURCC = "mmioStringToFOURCCW"
+Const _FuncName_mmioInstallIOProc = "mmioInstallIOProcW"
+Const _FuncName_mmioOpen = "mmioOpenW"
+Const _FuncName_mmioRename = "mmioRenameW"
+Const _FuncName_mciSendCommand = "mciSendCommandW"
+Const _FuncName_mciSendString = "mciSendStringW"
+Const _FuncName_mciGetDeviceID = "mciGetDeviceIDW"
+Const _FuncName_mciGetErrorString = "mciGetErrorStringW"
+#else
+Const _FuncName_sndPlaySound = "sndPlaySoundA"
+Const _FuncName_PlaySound = "PlaySoundA"
+Const _FuncName_waveOutGetDevCaps = "waveOutGetDevCapsA"
+Const _FuncName_waveOutGetErrorText = "waveOutGetErrorTextA"
+Const _FuncName_waveInGetDevCaps = "waveInGetDevCapsA"
+Const _FuncName_waveInGetErrorText = "waveInGetErrorTextA"
+Const _FuncName_midiOutGetDevCaps = "midiOutGetDevCapsA"
+Const _FuncName_midiOutGetErrorText = "midiOutGetErrorTextA"
+Const _FuncName_midiInGetDevCaps = "midiInGetDevCapsA"
+Const _FuncName_midiInGetErrorText = "midiInGetErrorTextA"
+Const _FuncName_auxGetDevCaps = "auxGetDevCapsA"
+Const _FuncName_mixerGetDevCaps = "mixerGetDevCapsA"
+Const _FuncName_mixerGetLineInfo = "mixerGetLineInfoA"
+Const _FuncName_mixerGetLineControls = "mixerGetLineControlsA"
+Const _FuncName_mixerGetControlDetails = "mixerGetControlDetailsA"
+Const _FuncName_joyGetDevCaps = "joyGetDevCapsA"
+Const _FuncName_mmioStringToFOURCC = "mmioStringToFOURCCA"
+Const _FuncName_mmioInstallIOProc = "mmioInstallIOProcA"
+Const _FuncName_mmioOpen = "mmioOpenA"
+Const _FuncName_mmioRename = "mmioRenameA"
+Const _FuncName_mciSendCommand = "mciSendCommandA"
+Const _FuncName_mciSendString = "mciSendStringA"
+Const _FuncName_mciGetDeviceID = "mciGetDeviceIDA"
+Const _FuncName_mciGetErrorString = "mciGetErrorStringA"
+#endif
 
 ' general constants
@@ -261,5 +312,5 @@
 ' Sound support
 
-Declare Function sndPlaySound Lib "winmm" Alias "sndPlaySoundA" (pszSound As PCSTR, fuSound As DWord) As BOOL
+Declare Function sndPlaySound Lib "winmm" Alias _FuncName_sndPlaySound (pszSound As PCTSTR, fuSound As DWord) As BOOL
 
 Const SND_SYNC = &H0000
@@ -289,5 +340,5 @@
 Const SND_ALIAS_SYSTEMDEFAULT = sndAlias(&H53, &H44)
 
-Declare Function PlaySound Lib "winmm" Alias "PlaySoundA" (pszSound As PCSTR, hmod As HMODULE, fdwSound As DWord) As BOOL
+Declare Function PlaySound Lib "winmm" Alias _FuncName_PlaySound (pszSound As PCTSTR, hmod As HMODULE, fdwSound As DWord) As BOOL
 
 
@@ -353,9 +404,21 @@
 
 ' waveform output device capabilities structure
+Type WAVEOUTCAPSW
+	wMid As Word
+	wPid As Word
+	vDriverVersion As MMVERSION
+	szPname[ELM(MAXPNAMELEN)] As WCHAR
+	dwFormats As DWord
+	wChannels As Word
+	wReserved1 As Word
+	dwSupport As DWord
+End Type
+TypeDef PWAVEOUTCAPSW = *WAVEOUTCAPSW
+TypeDef LPWAVEOUTCAPSW = *WAVEOUTCAPSW
 Type WAVEOUTCAPSA
 	wMid As Word
 	wPid As Word
 	vDriverVersion As MMVERSION
-	szPname[ELM(MAXPNAMELEN)] As Char
+	szPname[ELM(MAXPNAMELEN)] As SByte
 	dwFormats As DWord
 	wChannels As Word
@@ -365,8 +428,11 @@
 TypeDef PWAVEOUTCAPSA = *WAVEOUTCAPSA
 TypeDef LPWAVEOUTCAPSA = *WAVEOUTCAPSA
-
+#ifdef UNICODE
+TypeDef WAVEOUTCAPS = WAVEOUTCAPSW
+#else
 TypeDef WAVEOUTCAPS = WAVEOUTCAPSA
-TypeDef PWAVEOUTCAPS = PWAVEOUTCAPSA
-TypeDef LPWAVEOUTCAPS = LPWAVEOUTCAPSA
+#endif
+TypeDef PWAVEOUTCAPS = *WAVEOUTCAPS
+TypeDef LPWAVEOUTCAPS = *WAVEOUTCAPS
 
 ' flags for dwSupport field of WAVEOUTCAPS
@@ -380,9 +446,20 @@
 
 ' waveform input device capabilities structure
+Type WAVEINCAPSW
+	wMid As Word
+	wPid As Word
+	vDriverVersion As MMVERSION
+	szPname[ELM(MAXPNAMELEN)] As WCHAR
+	dwFormats As DWord
+	wChannels As Word
+	wReserved1 As Word
+End Type
+TypeDef PWAVEINCAPSW = *WAVEINCAPSW
+TypeDef LPWAVEINCAPSW = *WAVEINCAPSW
 Type WAVEINCAPSA
 	wMid As Word
 	wPid As Word
 	vDriverVersion As MMVERSION
-	szPname[ELM(MAXPNAMELEN)] As Char
+	szPname[ELM(MAXPNAMELEN)] As SByte
 	dwFormats As DWord
 	wChannels As Word
@@ -391,21 +468,24 @@
 TypeDef PWAVEINCAPSA = *WAVEINCAPSA
 TypeDef LPWAVEINCAPSA = *WAVEINCAPSA
-
+#ifdef UNICODE
+TypeDef WAVEINCAPS = WAVEINCAPSW
+#else
 TypeDef WAVEINCAPS = WAVEINCAPSA
-TypeDef PWAVEINCAPS = PWAVEINCAPSA
-TypeDef LPWAVEINCAPS = LPWAVEINCAPSA
+#endif
+TypeDef PWAVEINCAPS = *WAVEINCAPS
+TypeDef LPWAVEINCAPS = *WAVEINCAPS
 
 ' defines for dwFormat field of WAVEINCAPS and WAVEOUTCAPS
 Const WAVE_INVALIDFORMAT     = &H00000000       ' invalid format
-Const WAVE_FORMAT_1M08       = &H00000001       ' 11.025 kHz, Mono,   8-bit 
-Const WAVE_FORMAT_1S08       = &H00000002       ' 11.025 kHz, Stereo, 8-bit 
+Const WAVE_FORMAT_1M08       = &H00000001       ' 11.025 kHz, Mono,   8-bit
+Const WAVE_FORMAT_1S08       = &H00000002       ' 11.025 kHz, Stereo, 8-bit
 Const WAVE_FORMAT_1M16       = &H00000004       ' 11.025 kHz, Mono,   16-bit
 Const WAVE_FORMAT_1S16       = &H00000008       ' 11.025 kHz, Stereo, 16-bit
-Const WAVE_FORMAT_2M08       = &H00000010       ' 22.05  kHz, Mono,   8-bit 
-Const WAVE_FORMAT_2S08       = &H00000020       ' 22.05  kHz, Stereo, 8-bit 
+Const WAVE_FORMAT_2M08       = &H00000010       ' 22.05  kHz, Mono,   8-bit
+Const WAVE_FORMAT_2S08       = &H00000020       ' 22.05  kHz, Stereo, 8-bit
 Const WAVE_FORMAT_2M16       = &H00000040       ' 22.05  kHz, Mono,   16-bit
 Const WAVE_FORMAT_2S16       = &H00000080       ' 22.05  kHz, Stereo, 16-bit
-Const WAVE_FORMAT_4M08       = &H00000100       ' 44.1   kHz, Mono,   8-bit 
-Const WAVE_FORMAT_4S08       = &H00000200       ' 44.1   kHz, Stereo, 8-bit 
+Const WAVE_FORMAT_4M08       = &H00000100       ' 44.1   kHz, Mono,   8-bit
+Const WAVE_FORMAT_4S08       = &H00000200       ' 44.1   kHz, Stereo, 8-bit
 Const WAVE_FORMAT_4M16       = &H00000400       ' 44.1   kHz, Mono,   16-bit
 Const WAVE_FORMAT_4S16       = &H00000800       ' 44.1   kHz, Stereo, 16-bit
@@ -448,8 +528,8 @@
 ' waveform audio function prototypes
 Declare Function waveOutGetNumDevs Lib "winmm" () As DWord
-Declare Function waveOutGetDevCaps Lib "winmm" Alias "waveOutGetDevCapsA" (uDeviceID As DWord, ByRef pwoc As WAVEOUTCAPS, cbwoc As DWord) As MMRESULT
+Declare Function waveOutGetDevCaps Lib "winmm" Alias _FuncName_waveOutGetDevCaps (uDeviceID As DWord, ByRef woc As WAVEOUTCAPS, cbwoc As DWord) As MMRESULT
 Declare Function waveOutGetVolume Lib "winmm" (hwo As HWAVEOUT, ByRef pdwVolume As DWord) As MMRESULT
 Declare Function waveOutSetVolume Lib "winmm" (hwo As HWAVEOUT, dwVolume As DWord) As MMRESULT
-Declare Function waveOutGetErrorText Lib "winmm" Alias "waveOutGetErrorTextA" (mmrError As MMRESULT, pszText As LPSTR, cchText As DWord) As MMRESULT
+Declare Function waveOutGetErrorText Lib "winmm" Alias _FuncName_waveOutGetErrorText (mmrError As MMRESULT, pszText As LPTSTR, cchText As DWord) As MMRESULT
 Declare 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
 Declare Function waveOutClose Lib "winmm" (hwo As HWAVEOUT) As MMRESULT
@@ -470,6 +550,6 @@
 
 Declare Function waveInGetNumDevs Lib "winmm" () As DWord
-Declare Function waveInGetDevCaps Lib "winmm" Alias "waveInGetDevCapsA" (uDeviceID As DWord, ByRef pwic As WAVEINCAPS, cbwic As DWord) As MMRESULT
-Declare Function waveInGetErrorText Lib "winmm" Alias "waveInGetErrorTextA" (mmrError As MMRESULT, pszText As LPSTR, cchText As DWord) As MMRESULT
+Declare Function waveInGetDevCaps Lib "winmm" Alias _FuncName_waveInGetDevCaps (uDeviceID As DWord, ByRef pwic As WAVEINCAPS, cbwic As DWord) As MMRESULT
+Declare Function waveInGetErrorText Lib "winmm" Alias _FuncName_waveInGetErrorText (mmrError As MMRESULT, pszText As LPTSTR, cchText As DWord) As MMRESULT
 Declare 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
 Declare Function waveInClose Lib "winmm" (hwi As HWAVEIN) As MMRESULT
@@ -544,9 +624,9 @@
 
 ' MIDI output device capabilities structure
-Type MIDIOUTCAPSA
+Type MIDIOUTCAPSW
 	wMid As Word
 	wPid As Word
 	vDriverVersion As MMVERSION
-	szPname[ELM(MAXPNAMELEN)] As Char
+	szPname[ELM(MAXPNAMELEN)] As WCHAR
 	wTechnology As Word
 	wVoices As Word
@@ -555,10 +635,27 @@
 	dwSupport As DWord
 End Type
+TypeDef PMIDIOUTCAPSW = *MIDIOUTCAPSW
+TypeDef LPMIDIOUTCAPSW = *MIDIOUTCAPSW
+Type MIDIOUTCAPSA
+	wMid As Word
+	wPid As Word
+	vDriverVersion As MMVERSION
+	szPname[ELM(MAXPNAMELEN)] As SByte
+	wTechnology As Word
+	wVoices As Word
+	wNotes As Word
+	wChannelMask As Word
+	dwSupport As DWord
+End Type
 TypeDef PMIDIOUTCAPSA = *MIDIOUTCAPSA
 TypeDef LPMIDIOUTCAPSA = *MIDIOUTCAPSA
 
+#ifdef UNICODE
+TypeDef MIDIOUTCAPS = MIDIOUTCAPSW
+#else
 TypeDef MIDIOUTCAPS = MIDIOUTCAPSA
-TypeDef PMIDIOUTCAPS = PMIDIOUTCAPSA
-TypeDef LPMIDIOUTCAPS = LPMIDIOUTCAPSA
+#endif
+TypeDef PMIDIOUTCAPS = *MIDIOUTCAPS
+TypeDef LPMIDIOUTCAPS = *MIDIOUTCAPS
 
 ' flags for wTechnology field of MIDIOUTCAPS structure
@@ -576,17 +673,29 @@
 
 ' MIDI input device capabilities structure
+Type MIDIINCAPSW
+	wMid As Word
+	wPid As Word
+	vDriverVersion As MMVERSION
+	szPname[ELM(MAXPNAMELEN)] As WCHAR
+	dwSupport As DWord
+End Type
+TypeDef PMIDIINCAPSW = *MIDIINCAPSW
+TypeDef LPMIDIINCAPSW = *MIDIINCAPSW
 Type MIDIINCAPSA
 	wMid As Word
 	wPid As Word
 	vDriverVersion As MMVERSION
-	szPname[ELM(MAXPNAMELEN)] As Char
+	szPname[ELM(MAXPNAMELEN)] As SByte
 	dwSupport As DWord
 End Type
 TypeDef PMIDIINCAPSA = *MIDIINCAPSA
 TypeDef LPMIDIINCAPSA = *MIDIINCAPSA
-
+#ifdef UNICODE
+TypeDef MIDIINCAPS = MIDIINCAPSW
+#else
 TypeDef MIDIINCAPS = MIDIINCAPSA
-TypeDef PMIDIINCAPS = PMIDIINCAPSA
-TypeDef LPMIDIINCAPS = LPMIDIINCAPSA
+#endif
+TypeDef PMIDIINCAPS = *MIDIINCAPS
+TypeDef LPMIDIINCAPS = *MIDIINCAPS
 
 ' MIDI data block header
@@ -670,8 +779,8 @@
 Declare Function midiConnect Lib "winmm" (hmi As HMIDI, hmo As HMIDIOUT, pReserved As VoidPtr) As MMRESULT
 Declare Function midiDisconnect Lib "winmm" (hmi As HMIDI, hmo As HMIDIOUT, pReserved As VoidPtr) As MMRESULT
-Declare Function midiOutGetDevCaps Lib "winmm" Alias "midiOutGetDevCapsA" (uDeviceID As DWord, ByRef pmoc  As MIDIOUTCAPS, cbmoc As DWord) As MMRESULT
+Declare Function midiOutGetDevCaps Lib "winmm" Alias _FuncName_midiOutGetDevCaps (uDeviceID As DWord, ByRef moc As MIDIOUTCAPS, cbmoc As DWord) As MMRESULT
 Declare Function midiOutGetVolume Lib "winmm" (hmo As HMIDIOUT, ByRef pdwVolume As DWord) As MMRESULT
 Declare Function midiOutSetVolume Lib "winmm" (hmo As HMIDIOUT, dwVolume As DWord) As MMRESULT
-Declare Function midiOutGetErrorText Lib "winmm" Alias "midiOutGetErrorTextA" (mmrError As MMRESULT, pszText As LPSTR, cchText As DWord) As MMRESULT
+Declare Function midiOutGetErrorText Lib "winmm" Alias _FuncName_midiOutGetErrorText (mmrError As MMRESULT, pszText As LPTSTR, cchText As DWord) As MMRESULT
 Declare Function midiOutOpen Lib "winmm" (ByRef phmo As HMIDIOUT, uDeviceID As DWord, dwCallback As DWord, dwInstance As DWord, fdwOpen As DWord) As MMRESULT
 Declare Function midiOutClose Lib "winmm" (hmo As HMIDIOUT) As MMRESULT
@@ -687,6 +796,6 @@
 
 Declare Function midiInGetNumDevs Lib "winmm" () As DWord
-Declare Function midiInGetDevCaps Lib "winmm" Alias "midiInGetDevCapsA" (uDeviceID As DWord, ByRef pmic As MIDIINCAPS, cbmic As DWord) As MMRESULT
-Declare Function midiInGetErrorText Lib "winmm" Alias "midiInGetErrorTextA" (mmrError As MMRESULT, pszText As LPSTR, cchText As DWord) As MMRESULT
+Declare Function midiInGetDevCaps Lib "winmm" Alias _FuncName_midiInGetDevCaps (uDeviceID As DWord, ByRef pmic As MIDIINCAPS, cbmic As DWord) As MMRESULT
+Declare Function midiInGetErrorText Lib "winmm" Alias _FuncName_midiInGetErrorText (mmrError As MMRESULT, pszText As LPCTSTR, cchText As DWord) As MMRESULT
 Declare Function midiInOpen Lib "winmm" (ByRef phmi As HMIDIIN, uDeviceID As DWord, dwCallback As DWord, dwInstance As DWord, fdwOpen As DWord) As MMRESULT
 Declare Function midiInClose Lib "winmm" (hmi As HMIDIIN) As MMRESULT
@@ -708,9 +817,21 @@
 
 ' Auxiliary audio device capabilities structure
+Type AUXCAPSW
+	wMid As Word
+	wPid As Word
+	vDriverVersion As MMVERSION
+	szPname[ELM(MAXPNAMELEN)] As WCHAR
+	wTechnology As Word
+	wReserved1 As Word
+	dwSupport As DWord
+End Type
+TypeDef PAUXCAPSW = *AUXCAPSW
+TypeDef NPAUXCAPSW = *AUXCAPSW
+TypeDef LPAUXCAPSW = *AUXCAPSW
 Type AUXCAPSA
 	wMid As Word
 	wPid As Word
 	vDriverVersion As MMVERSION
-	szPname[ELM(MAXPNAMELEN)] As Char
+	szPname[ELM(MAXPNAMELEN)] As SByte
 	wTechnology As Word
 	wReserved1 As Word
@@ -720,9 +841,12 @@
 TypeDef NPAUXCAPSA = *AUXCAPSA
 TypeDef LPAUXCAPSA = *AUXCAPSA
-
+#ifdef UNICODE
 TypeDef AUXCAPS = AUXCAPSA
-TypeDef PAUXCAPS = PAUXCAPSA
-TypeDef NPAUXCAPS = NPAUXCAPSA
-TypeDef LPAUXCAPS = LPAUXCAPSA
+#else
+TypeDef AUXCAPS = AUXCAPSA
+#endif
+TypeDef PAUXCAPS = *AUXCAPS
+TypeDef NPAUXCAPS = *AUXCAPS
+TypeDef LPAUXCAPS = *AUXCAPS
 
 Const AUXCAPS_CDAUDIO = 1
@@ -734,5 +858,5 @@
 ' auxiliary audio function prototypes
 Declare Function auxGetNumDevs Lib "winmm" () As DWord
-Declare Function auxGetDevCaps Lib "winmm" Alias "auxGetDevCapsA" (uDeviceID As DWord, pac As *AUXCAPS, cbac As DWord) As MMRESULT
+Declare Function auxGetDevCaps Lib "winmm" Alias _FuncName_auxGetDevCaps (uDeviceID As DWord, pac As *AUXCAPS, cbac As DWord) As MMRESULT
 Declare Function auxSetVolume Lib "winmm" (uDeviceID As DWord, dwVolume As DWord) As MMRESULT
 Declare Function auxGetVolume Lib "winmm" (uDeviceID As DWord, pdwVolume As *DWord) As MMRESULT
@@ -771,4 +895,14 @@
 Declare Function mixerGetNumDevs Lib "winmm" () As DWord
 
+Type MIXERCAPSW
+	wMid As Word
+	wPid As Word
+	vDriverVersion As MMVERSION
+	szPname[ELM(MAXPNAMELEN)] As WCHAR
+	fdwSupport As DWord
+	cDestinations As DWord
+End Type
+TypeDef PMIXERCAPSW = *MIXERCAPSW
+TypeDef LPMIXERCAPSW = *MIXERCAPSW
 Type MIXERCAPSA
 	wMid As Word
@@ -781,15 +915,18 @@
 TypeDef PMIXERCAPSA = *MIXERCAPSA
 TypeDef LPMIXERCAPSA = *MIXERCAPSA
-
+#ifdef UNICODE
+TypeDef MIXERCAPS = MIXERCAPSW
+#else
 TypeDef MIXERCAPS = MIXERCAPSA
-TypeDef PMIXERCAPS = PMIXERCAPSA
-TypeDef LPMIXERCAPS = LPMIXERCAPSA
-
-Declare Function mixerGetDevCaps Lib "winmm" Alias "mixerGetDevCapsA" (uMxId As DWord, pmxcaps As *MIXERCAPS, cbmxcaps As DWord) As MMRESULT
+#endif
+TypeDef PMIXERCAPS = *MIXERCAPS
+TypeDef LPMIXERCAPS = *MIXERCAPS
+
+Declare Function mixerGetDevCaps Lib "winmm" Alias _FuncName_mixerGetDevCaps (uMxId As DWord, pmxcaps As *MIXERCAPS, cbmxcaps As DWord) As MMRESULT
 Declare Function mixerOpen Lib "winmm" (phmx As *HMIXER, uMxId As DWord, dwCallback As DWord, dwInstance As DWord, fdwOpen As DWord) As MMRESULT
 Declare Function mixerClose Lib "winmm" (hmx As HMIXER) As MMRESULT
 Declare Function mixerMessage Lib "winmm" (hmx As HMIXER, uMsg As DWord, dwParam1 As DWord, dwParam2 As DWord) As DWord
 
-Type TARGET
+Type _MMSYSTEM_TARGETW
 	dwType As DWord
 	dwDeviceID As DWord
@@ -797,5 +934,32 @@
 	wPid As Word
 	vDriverVersion As MMVERSION
-	szPname[ELM(MAXPNAMELEN)] As Char
+	szPname[ELM(MAXPNAMELEN)] As WCHAR
+End Type
+
+Type MIXERLINEW
+	cbStruct As DWord
+	dwDestination As DWord
+	dwSource As DWord
+	dwLineID As DWord
+	fdwLine As DWord
+	dwUser As DWord
+	dwComponentType As DWord
+	cChannels As DWord
+	cConnections As DWord
+	cControls As DWord
+	szShortName[ELM(MIXER_SHORT_NAME_CHARS)] As WCHAR
+	szName[ELM(MIXER_LONG_NAME_CHARS)] As WCHAR
+	Target As _MMSYSTEM_TARGETW
+End Type
+TypeDef PMIXERLINEW = *MIXERLINEW
+TypeDef LPMIXERLINEW = *MIXERLINEW
+
+Type _MMSYSTEM_TARGETA
+	dwType As DWord
+	dwDeviceID As DWord
+	wMid As Word
+	wPid As Word
+	vDriverVersion As MMVERSION
+	szPname[ELM(MAXPNAMELEN)] As SByte
 End Type
 
@@ -811,14 +975,17 @@
 	cConnections As DWord
 	cControls As DWord
-	szShortName[ELM(MIXER_SHORT_NAME_CHARS)] As Char
-	szName[ELM(MIXER_LONG_NAME_CHARS)] As Char
-	Target As TARGET
+	szShortName[ELM(MIXER_SHORT_NAME_CHARS)] As SByte
+	szName[ELM(MIXER_LONG_NAME_CHARS)] As SByte
+	Target As _MMSYSTEM_TARGETA
 End Type
 TypeDef PMIXERLINEA = *MIXERLINEA
 TypeDef LPMIXERLINEA = *MIXERLINEA
-
+#ifdef UNICODE
+TypeDef MIXERLINE = MIXERLINEW
+#else
 TypeDef MIXERLINE = MIXERLINEA
-TypeDef PMIXERLINE = PMIXERLINEA
-TypeDef LPMIXERLINE = LPMIXERLINEA
+#endif
+TypeDef PMIXERLINE = *MIXERLINE
+TypeDef LPMIXERLINE = *MIXERLINE
 
 ' MIXERLINE.fdwLine
@@ -862,5 +1029,5 @@
 Const MIXERLINE_TARGETTYPE_AUX = 5
 
-Declare Function mixerGetLineInfo Lib "winmm" Alias "mixerGetLineInfoA" (hmxobj As HMIXEROBJ, pmxl As *MIXERLINE, fdwInfo As DWord) As MMRESULT
+Declare Function mixerGetLineInfo Lib "winmm" Alias _FuncName_mixerGetLineInfo (hmxobj As HMIXEROBJ, pmxl As *MIXERLINE, fdwInfo As DWord) As MMRESULT
 
 Const MIXER_GETLINEINFOF_DESTINATION = &H00000000
@@ -873,4 +1040,17 @@
 Declare Function mixerGetID Lib "winmm" (hmxobj As HMIXEROBJ, puMxId As *DWord, fdwId As DWord) As MMRESULT
 
+Type MIXERCONTROLW
+	cbStruct As DWord
+	dwControlID As DWord
+	dwControlType As DWord
+	fdwControl As DWord
+	cMultipleItems As DWord
+	szShortName[ELM(MIXER_SHORT_NAME_CHARS)] As WCHAR
+	szName[ELM(MIXER_LONG_NAME_CHARS)] As WCHAR
+	Bounds[ELM(6)] As DWord
+	Metrics[ELM(6)] As DWord
+End Type
+TypeDef PMIXERCONTROLW = *MIXERCONTROLW
+TypeDef LPMIXERCONTROLW = *MIXERCONTROLW
 Type MIXERCONTROLA
 	cbStruct As DWord
@@ -879,6 +1059,6 @@
 	fdwControl As DWord
 	cMultipleItems As DWord
-	szShortName[ELM(MIXER_SHORT_NAME_CHARS)] As Char
-	szName[ELM(MIXER_LONG_NAME_CHARS)] As Char
+	szShortName[ELM(MIXER_SHORT_NAME_CHARS)] As SByte
+	szName[ELM(MIXER_LONG_NAME_CHARS)] As SByte
 	Bounds[ELM(6)] As DWord
 	Metrics[ELM(6)] As DWord
@@ -886,8 +1066,11 @@
 TypeDef PMIXERCONTROLA = *MIXERCONTROLA
 TypeDef LPMIXERCONTROLA = *MIXERCONTROLA
-
+#ifdef UNICODE
+TypeDef MIXERCONTROL = MIXERCONTROLW
+#else
 TypeDef MIXERCONTROL = MIXERCONTROLA
-TypeDef PMIXERCONTROL = PMIXERCONTROLA
-TypeDef LPMIXERCONTROL = LPMIXERCONTROLA
+#endif
+TypeDef PMIXERCONTROL = *MIXERCONTROL
+TypeDef LPMIXERCONTROL = *MIXERCONTROL
 
 ' MIXERCONTROL.fdwControl
@@ -954,4 +1137,14 @@
 Const MIXERCONTROL_CONTROLTYPE_MILLITIME = (MIXERCONTROL_CT_CLASS_TIME OR MIXERCONTROL_CT_SC_TIME_MILLISECS OR MIXERCONTROL_CT_UNITS_UNSIGNED)
 
+Type MIXERLINECONTROLSW
+	cbStruct As DWord
+	dwLineID As DWord
+	dwControl_ID_Type As DWord
+	cControls As DWord
+	cbmxctrl As DWord
+	pamxctrl As *MIXERCONTROLW
+End Type
+TypeDef PMIXERLINECONTROLSW = *MIXERLINECONTROLSW
+TypeDef LPMIXERLINECONTROLSW = *MIXERLINECONTROLSW
 Type MIXERLINECONTROLSA
 	cbStruct As DWord
@@ -960,14 +1153,17 @@
 	cControls As DWord
 	cbmxctrl As DWord
-	pamxctrl As *MIXERCONTROL
+	pamxctrl As *MIXERCONTROLA
 End Type
 TypeDef PMIXERLINECONTROLSA = *MIXERLINECONTROLSA
 TypeDef LPMIXERLINECONTROLSA = *MIXERLINECONTROLSA
-
+#ifdef UNICODE
 TypeDef MIXERLINECONTROLS = MIXERLINECONTROLSA
-TypeDef PMIXERLINECONTROLS = PMIXERLINECONTROLSA
-TypeDef LPMIXERLINECONTROLS = LPMIXERLINECONTROLSA
-
-Declare Function mixerGetLineControls Lib "winmm" Alias "mixerGetLineControlsA" (hmxobj As HMIXEROBJ, pmxlc As *MIXERLINECONTROLS, fdwControls As DWord) As MMRESULT
+#else
+TypeDef MIXERLINECONTROLS = MIXERLINECONTROLSA
+#endif
+TypeDef PMIXERLINECONTROLS = *MIXERLINECONTROLS
+TypeDef LPMIXERLINECONTROLS = *MIXERLINECONTROLS
+
+Declare Function mixerGetLineControls Lib "winmm" Alias _FuncName_mixerGetLineControls (hmxobj As HMIXEROBJ, pmxlc As *MIXERLINECONTROLS, fdwControls As DWord) As MMRESULT
 
 Const MIXER_GETLINECONTROLSF_ALL = &H00000000
@@ -987,15 +1183,25 @@
 TypeDef LPMIXERCONTROLDETAILS = *MIXERCONTROLDETAILS
 
+Type MIXERCONTROLDETAILS_LISTTEXTW
+	dwParam1 As DWord
+	dwParam2 As DWord
+	szName[ELM(MIXER_LONG_NAME_CHARS)] As WCHAR
+End Type
+TypeDef PMIXERCONTROLDETAILS_LISTTEXTW = *MIXERCONTROLDETAILS_LISTTEXTW
+TypeDef LPMIXERCONTROLDETAILS_LISTTEXTW = *MIXERCONTROLDETAILS_LISTTEXTW
 Type MIXERCONTROLDETAILS_LISTTEXTA
 	dwParam1 As DWord
 	dwParam2 As DWord
-	szName[ELM(MIXER_LONG_NAME_CHARS)] As Char
+	szName[ELM(MIXER_LONG_NAME_CHARS)] As SByte
 End Type
 TypeDef PMIXERCONTROLDETAILS_LISTTEXTA = *MIXERCONTROLDETAILS_LISTTEXTA
 TypeDef LPMIXERCONTROLDETAILS_LISTTEXTA = *MIXERCONTROLDETAILS_LISTTEXTA
-
+#ifdef UNICODE
+TypeDef MIXERCONTROLDETAILS_LISTTEXT = MIXERCONTROLDETAILS_LISTTEXTW
+#else
 TypeDef MIXERCONTROLDETAILS_LISTTEXT = MIXERCONTROLDETAILS_LISTTEXTA
-TypeDef PMIXERCONTROLDETAILS_LISTTEXT = PMIXERCONTROLDETAILS_LISTTEXTA
-TypeDef LPMIXERCONTROLDETAILS_LISTTEXT = LPMIXERCONTROLDETAILS_LISTTEXTA
+#endif
+TypeDef PMIXERCONTROLDETAILS_LISTTEXT = *MIXERCONTROLDETAILS_LISTTEXT
+TypeDef LPMIXERCONTROLDETAILS_LISTTEXT = *MIXERCONTROLDETAILS_LISTTEXT
 
 Type MIXERCONTROLDETAILS_BOOLEAN
@@ -1019,5 +1225,5 @@
 Declare Function mixerGetControlDetailsA Lib "winmm" (hmxobj As HMIXEROBJ, pmxcd As *MIXERCONTROLDETAILS, fdwDetails As DWord) As MMRESULT
 Declare Function mixerGetControlDetailsW Lib "winmm" (hmxobj As HMIXEROBJ, pmxcd As *MIXERCONTROLDETAILS, fdwDetails As DWord) As MMRESULT
-Declare Function mixerGetControlDetails Lib "winmm" Alias "mixerGetControlDetailsA" (hmxobj As HMIXEROBJ, pmxcd As *MIXERCONTROLDETAILS, fdwDetails As DWord) As MMRESULT
+Declare Function mixerGetControlDetails Lib "winmm" Alias _FuncName_mixerGetControlDetails (hmxobj As HMIXEROBJ, pmxcd As *MIXERCONTROLDETAILS, fdwDetails As DWord) As MMRESULT
 
 Const MIXER_GETCONTROLDETAILSF_VALUE = &H00000000
@@ -1163,8 +1369,8 @@
 Const JOYCAPS_POVCTS = &H0040
 
-Type JOYCAPSA
+Type JOYCAPSW
 	wMid As Word
 	wPid As Word
-	szPname[ELM(MAXPNAMELEN)] As Char
+	szPname[ELM(MAXPNAMELEN)] As WCHAR
 	wXmin As DWord
 	wXmax As DWord
@@ -1186,12 +1392,44 @@
 	wNumAxes As DWord
 	wMaxButtons As DWord
-	szRegKey[ELM(MAXPNAMELEN)] As Char
-	szOEMVxD[ELM(MAX_JOYSTICKOEMVXDNAME)] As Char
+	szRegKey[ELM(MAXPNAMELEN)] As WCHAR
+	szOEMVxD[ELM(MAX_JOYSTICKOEMVXDNAME)] As WCHAR
+End Type
+TypeDef PJOYCAPSW = *JOYCAPSW
+TypeDef NPJOYCAPSW = *JOYCAPSW
+TypeDef LPJOYCAPSW = *JOYCAPSW
+Type JOYCAPSA
+	wMid As Word
+	wPid As Word
+	szPname[ELM(MAXPNAMELEN)] As SByte
+	wXmin As DWord
+	wXmax As DWord
+	wYmin As DWord
+	wYmax As DWord
+	wZmin As DWord
+	wZmax As DWord
+	wNumButtons As DWord
+	wPeriodMin As DWord
+	wPeriodMax As DWord
+	wRmin As DWord
+	wRmax As DWord
+	wUmin As DWord
+	wUmax As DWord
+	wVmin As DWord
+	wVmax As DWord
+	wCaps As DWord
+	wMaxAxes As DWord
+	wNumAxes As DWord
+	wMaxButtons As DWord
+	szRegKey[ELM(MAXPNAMELEN)] As SByte
+	szOEMVxD[ELM(MAX_JOYSTICKOEMVXDNAME)] As SByte
 End Type
 TypeDef PJOYCAPSA = *JOYCAPSA
 TypeDef NPJOYCAPSA = *JOYCAPSA
 TypeDef LPJOYCAPSA = *JOYCAPSA
-
+#ifdef UNICODE
+TypeDef JOYCAPS = JOYCAPSW
+#else
 TypeDef JOYCAPS = JOYCAPSA
+#endif
 TypeDef PJOYCAPS = PJOYCAPSA
 TypeDef NPJOYCAPS = NPJOYCAPSA
@@ -1229,5 +1467,5 @@
 ' joystick function prototypes
 Declare Function joyGetNumDevs Lib "winmm" () As DWord
-Declare Function joyGetDevCaps Lib "winmm" Alias "joyGetDevCapsA" (uJoyID As DWord, pjc As *JOYCAPS, cbjc As DWord) As MMRESULT
+Declare Function joyGetDevCaps Lib "winmm" Alias _FuncName_joyGetDevCaps (uJoyID As DWord, pjc As *JOYCAPS, cbjc As DWord) As MMRESULT
 Declare Function joyGetPos Lib "winmm" (uJoyID As DWord, pji As *JOYINFO) As MMRESULT
 Declare Function joyGetPosEx Lib "winmm" (uJoyID As DWord, pji As *JOYINFOEX) As MMRESULT
@@ -1359,8 +1597,8 @@
 
 ' MMIO function prototypes
-Declare Function mmioStringToFOURCC Lib "winmm" Alias "mmioStringToFOURCCA" (sz As LPSTR, uFlags As DWord) As FOURCC
-Declare Function mmioInstallIOProc Lib "winmm" Alias "mmioInstallIOProcA" (fccIOProc As FOURCC, pIOProc As LPMMIOPROC, dwFlags As DWord) As LPMMIOPROC
-Declare Function mmioOpen Lib "winmm" Alias "mmioOpenA" (pszFileName As LPSTR, pmmioinfo As *MMIOINFO, fdwOpen As DWord) As HMMIO
-Declare Function mmioRename Lib "winmm" Alias "mmioRenameA" (pszFileName As LPSTR, pszNewFileName As LPSTR, pmmioinfo As *MMIOINFO, fdwRename As DWord) As MMRESULT
+Declare Function mmioStringToFOURCC Lib "winmm" Alias _FuncName_mmioStringToFOURCC (sz As LPCTSTR, uFlags As DWord) As FOURCC
+Declare Function mmioInstallIOProc Lib "winmm" Alias _FuncName_mmioInstallIOProc (fccIOProc As FOURCC, pIOProc As LPMMIOPROC, dwFlags As DWord) As LPMMIOPROC
+Declare Function mmioOpen Lib "winmm" Alias _FuncName_mmioOpen (pszFileName As LPTSTR, pmmioinfo As *MMIOINFO, fdwOpen As DWord) As HMMIO
+Declare Function mmioRename Lib "winmm" Alias _FuncName_mmioRename (pszFileName As LPCTSTR, pszNewFileName As LPCTSTR, pmmioinfo As *MMIOINFO, fdwRename As DWord) As MMRESULT
 Declare Function mmioClose Lib "winmm" (hmmio As HMMIO, fuClose As DWord) As MMRESULT
 Declare Function mmioRead Lib "winmm" (hmmio As HMMIO, pch As HPSTR, cch As Long) As Long
@@ -1386,9 +1624,9 @@
 
 ' MCI Functions
-Declare Function mciSendCommand Lib "winmm" Alias "mciSendCommandA" (mciId As MCIDEVICEID, uMsg As DWord, dwParam1 As DWord, ByRef dwParam2 As Any) As MCIERROR
-Declare Function mciSendString Lib "winmm" Alias "mciSendStringA" (lpstrCommand As LPSTR, lpstrReturnString As LPSTR, uReturnLength As DWord, hwndCallback As HWND) As MCIERROR
-Declare Function mciGetDeviceID Lib "winmm" Alias "mciGetDeviceIDA" (pszDevice As LPSTR) As MCIDEVICEID
-
-Declare Function mciGetErrorString Lib "winmm" Alias "mciGetErrorStringA" (mcierr As MCIERROR, pszText As LPSTR, cchText As DWord) As BOOL
+Declare Function mciSendCommand Lib "winmm" Alias _FuncName_mciSendCommand (mciId As MCIDEVICEID, uMsg As DWord, dwParam1 As ULONG_PTR, ByRef dwParam2 As Any) As MCIERROR
+Declare Function mciSendString Lib "winmm" Alias _FuncName_mciSendString (lpstrCommand As LPTSTR, lpstrReturnString As LPTSTR, uReturnLength As DWord, hwndCallback As HWND) As MCIERROR
+Declare Function mciGetDeviceID Lib "winmm" Alias _FuncName_mciGetDeviceID (pszDevice As LPCTSTR) As MCIDEVICEID
+
+Declare Function mciGetErrorString Lib "winmm" Alias _FuncName_mciGetErrorString (mcierr As MCIERROR, pszText As LPSTR, cchText As DWord) As BOOL
 Declare Function mciSetYieldProc Lib "winmm" (mciId As MCIDEVICEID, fpYieldProc As YIELDPROC, dwYieldData As DWord) As BOOL
 Declare Function mciGetCreatorTask Lib "winmm" (mciId As MCIDEVICEID) As HTASK
@@ -1704,11 +1942,27 @@
 TypeDef LPMCI_GENERIC_PARMS = *MCI_GENERIC_PARMS
 
-Type MCI_OPEN_PARMS
+Type MCI_OPEN_PARMSW
 	dwCallback As DWord
 	wDeviceID As DWord
-	lpstrDeviceType As LPSTR
-	lpstrElementName As LPSTR
-	lpstrAlias As LPSTR
-End Type
+	lpstrDeviceType As LPCWSTR
+	lpstrElementName As LPCWSTR
+	lpstrAlias As LPCWSTR
+End Type
+TypeDef PMCI_OPEN_PARMSW = *MCI_OPEN_PARMSW
+TypeDef LPMCI_OPEN_PARMSW = *MCI_OPEN_PARMSW
+Type MCI_OPEN_PARMSA
+	dwCallback As DWord
+	wDeviceID As DWord
+	lpstrDeviceType As LPCSTR
+	lpstrElementName As LPCSTR
+	lpstrAlias As LPCSTR
+End Type
+TypeDef PMCI_OPEN_PARMSA = *MCI_OPEN_PARMSA
+TypeDef LPMCI_OPEN_PARMSA = *MCI_OPEN_PARMSA
+#ifdef UNICODE
+TypeDef MCI_OPEN_PARMS = MCI_OPEN_PARMSW
+#else
+TypeDef MCI_OPEN_PARMS = MCI_OPEN_PARMSA
+#endif
 TypeDef PMCI_OPEN_PARMS = *MCI_OPEN_PARMS
 TypeDef LPMCI_OPEN_PARMS = *MCI_OPEN_PARMS
@@ -1738,4 +1992,11 @@
 TypeDef LPMCI_STATUS_PARMS = *MCI_STATUS_PARMS
 
+Type MCI_INFO_PARMSW
+	dwCallback As DWord
+	lpstrReturn As LPWSTR
+	dwRetSize As DWord
+End Type
+TypeDef PMCI_INFO_PARMSW = *MCI_INFO_PARMSW
+TypeDef LPMCI_INFO_PARMSW = *MCI_INFO_PARMSW
 Type MCI_INFO_PARMSA
 	dwCallback As DWord
@@ -1745,7 +2006,11 @@
 TypeDef PMCI_INFO_PARMSA = *MCI_INFO_PARMSA
 TypeDef LPMCI_INFO_PARMSA = *MCI_INFO_PARMSA
+#ifdef UNICODE
+TypeDef MCI_INFO_PARMS = MCI_INFO_PARMSW
+#else
 TypeDef MCI_INFO_PARMS = MCI_INFO_PARMSA
-TypeDef PMCI_INFO_PARMS = PMCI_INFO_PARMSA
-TypeDef LPMCI_INFO_PARMS = LPMCI_INFO_PARMSA
+#endif
+TypeDef PMCI_INFO_PARMS = *MCI_INFO_PARMS
+TypeDef LPMCI_INFO_PARMS = *MCI_INFO_PARMS
 
 Type MCI_GETDEVCAPS_PARMS
@@ -1757,4 +2022,13 @@
 TypeDef LPMCI_GETDEVCAPS_PARMS = *MCI_GETDEVCAPS_PARMS
 
+Type MCI_SYSINFO_PARMSW
+	dwCallback As DWord
+	lpstrReturn As LPWSTR
+	dwRetSize As DWord
+	dwNumber As DWord
+	wDeviceType As DWord
+End Type
+TypeDef PMCI_SYSINFO_PARMSW = *MCI_SYSINFO_PARMSW
+TypeDef LPMCI_SYSINFO_PARMSW = *MCI_SYSINFO_PARMSW
 Type MCI_SYSINFO_PARMSA
 	dwCallback As DWord
@@ -1766,7 +2040,11 @@
 TypeDef PMCI_SYSINFO_PARMSA = *MCI_SYSINFO_PARMSA
 TypeDef LPMCI_SYSINFO_PARMSA = *MCI_SYSINFO_PARMSA
+#ifdef UNICODE
 TypeDef MCI_SYSINFO_PARMS = MCI_SYSINFO_PARMSA
-TypeDef PMCI_SYSINFO_PARMS = PMCI_SYSINFO_PARMSA
-TypeDef LPMCI_SYSINFO_PARMS = LPMCI_SYSINFO_PARMSA
+#else
+TypeDef MCI_SYSINFO_PARMS = MCI_SYSINFO_PARMSW
+#endif
+TypeDef PMCI_SYSINFO_PARMS = *MCI_SYSINFO_PARMS
+TypeDef LPMCI_SYSINFO_PARMS = *MCI_SYSINFO_PARMS
 
 Type MCI_SET_PARMS
@@ -1786,23 +2064,43 @@
 TypeDef LPMCI_BREAK_PARMS = *MCI_BREAK_PARMS
 
+Type MCI_SAVE_PARMSW
+	dwCallback As DWord
+	lpfilename As LPCWSTR
+End Type
+TypeDef PMCI_SAVE_PARMSW = *MCI_SAVE_PARMSW
+TypeDef LPMCI_SAVE_PARMSW = *MCI_SAVE_PARMSW
 Type MCI_SAVE_PARMSA
 	dwCallback As DWord
-	lpfilename As LPSTR
+	lpfilename As LPCSTR
 End Type
 TypeDef PMCI_SAVE_PARMSA = *MCI_SAVE_PARMSA
 TypeDef LPMCI_SAVE_PARMSA = *MCI_SAVE_PARMSA
+#ifdef UNICODE
+TypeDef MCI_SAVE_PARMS = MCI_SAVE_PARMSW
+#else
 TypeDef MCI_SAVE_PARMS = MCI_SAVE_PARMSA
-TypeDef PMCI_SAVE_PARMS = PMCI_SAVE_PARMSA
-TypeDef LPMCI_SAVE_PARMS = LPMCI_SAVE_PARMSA
-
+#endif
+TypeDef PMCI_SAVE_PARMS = *MCI_SAVE_PARMS
+TypeDef LPMCI_SAVE_PARMS = *MCI_SAVE_PARMS
+
+Type MCI_LOAD_PARMSW
+	dwCallback As DWord
+	lpfilename As LPCWSTR
+End Type
+TypeDef PMCI_LOAD_PARMSW = *MCI_LOAD_PARMSW
+TypeDef LPMCI_LOAD_PARMSW = *MCI_LOAD_PARMSW
 Type MCI_LOAD_PARMSA
 	dwCallback As DWord
-	lpfilename As LPSTR
+	lpfilename As LPCSTR
 End Type
 TypeDef PMCI_LOAD_PARMSA = *MCI_LOAD_PARMSA
 TypeDef LPMCI_LOAD_PARMSA = *MCI_LOAD_PARMSA
+#ifdef UNICODE
+TypeDef MCI_LOAD_PARMS = MCI_LOAD_PARMSW
+#else
 TypeDef MCI_LOAD_PARMS = MCI_LOAD_PARMSA
-TypeDef PMCI_LOAD_PARMS = PMCI_LOAD_PARMSA
-TypeDef LPMCI_LOAD_PARMS = LPMCI_LOAD_PARMSA
+#endif
+TypeDef PMCI_LOAD_PARMS = *MCI_LOAD_PARMS
+TypeDef LPMCI_LOAD_PARMS = *MCI_LOAD_PARMS
 
 Type MCI_RECORD_PARMS
@@ -1859,13 +2157,23 @@
 TypeDef LPMCI_VD_STEP_PARMS = *MCI_VD_STEP_PARMS
 
+Type MCI_VD_ESCAPE_PARMSW
+	dwCallback As DWord
+	lpstrCommand As LPCWSTR
+End Type
+TypeDef PMCI_VD_ESCAPE_PARMSW = *MCI_VD_ESCAPE_PARMSW
+TypeDef LPMCI_VD_ESCAPE_PARMSW = *MCI_VD_ESCAPE_PARMSW
 Type MCI_VD_ESCAPE_PARMSA
 	dwCallback As DWord
-	lpstrCommand As LPSTR
+	lpstrCommand As LPCSTR
 End Type
 TypeDef PMCI_VD_ESCAPE_PARMSA = *MCI_VD_ESCAPE_PARMSA
 TypeDef LPMCI_VD_ESCAPE_PARMSA = *MCI_VD_ESCAPE_PARMSA
+#ifdef UNICODE
+TypeDef MCI_VD_ESCAPE_PARMS = MCI_VD_ESCAPE_PARMSW
+#else
 TypeDef MCI_VD_ESCAPE_PARMS = MCI_VD_ESCAPE_PARMSA
-TypeDef PMCI_VD_ESCAPE_PARMS = PMCI_VD_ESCAPE_PARMSA
-TypeDef LPMCI_VD_ESCAPE_PARMS = LPMCI_VD_ESCAPE_PARMSA
+#endif
+TypeDef PMCI_VD_ESCAPE_PARMS = *MCI_VD_ESCAPE_PARMS
+TypeDef LPMCI_VD_ESCAPE_PARMS = *MCI_VD_ESCAPE_PARMS
 
 ' MCI extensions for CD audio devices
@@ -1898,17 +2206,31 @@
 Const MCI_WAVE_GETDEVCAPS_OUTPUTS =    &H00004002
 
+Type MCI_WAVE_OPEN_PARMSW
+	dwCallback As DWord
+	wDeviceID As MCIDEVICEID
+	lpstrDeviceType As LPCWSTR
+	lpstrElementName As LPCWSTR
+	lpstrAlias As LPCWSTR
+	dwBufferSeconds As DWord
+End Type
+TypeDef PMCI_WAVE_OPEN_PARMSW = *MCI_WAVE_OPEN_PARMSW
+TypeDef LPMCI_WAVE_OPEN_PARMSW = *MCI_WAVE_OPEN_PARMSW
 Type MCI_WAVE_OPEN_PARMSA
 	dwCallback As DWord
 	wDeviceID As MCIDEVICEID
-	lpstrDeviceType As LPSTR
-	lpstrElementName As LPSTR
-	lpstrAlias As LPSTR
+	lpstrDeviceType As LPCSTR
+	lpstrElementName As LPCSTR
+	lpstrAlias As LPCSTR
 	dwBufferSeconds As DWord
 End Type
 TypeDef PMCI_WAVE_OPEN_PARMSA = *MCI_WAVE_OPEN_PARMSA
 TypeDef LPMCI_WAVE_OPEN_PARMSA = *MCI_WAVE_OPEN_PARMSA
+#ifdef UNICODE
+TypeDef MCI_WAVE_OPEN_PARMS = MCI_WAVE_OPEN_PARMSW
+#else
 TypeDef MCI_WAVE_OPEN_PARMS = MCI_WAVE_OPEN_PARMSA
-TypeDef PMCI_WAVE_OPEN_PARMS = PMCI_WAVE_OPEN_PARMSA
-TypeDef LPMCI_WAVE_OPEN_PARMS = LPMCI_WAVE_OPEN_PARMSA
+#endif
+TypeDef PMCI_WAVE_OPEN_PARMS = *MCI_WAVE_OPEN_PARMS
+TypeDef LPMCI_WAVE_OPEN_PARMS = *MCI_WAVE_OPEN_PARMS
 
 Type MCI_WAVE_DELETE_PARMS
@@ -2018,18 +2340,33 @@
 Const MCI_ANIM_UPDATE_HDC =             &H00020000
 
-Type MCI_ANIM_OPEN_PARMSA
+Type MCI_ANIM_OPEN_PARMSW
 	dwCallback As DWord
 	wDeviceID As MCIDEVICEID
-	lpstrDeviceType As LPSTR
-	lpstrElementName As LPSTR
-	lpstrAlias As LPSTR
+	lpstrDeviceType As LPCWSTR
+	lpstrElementName As LPCWSTR
+	lpstrAlias As LPCWSTR
 	dwStyle As DWord
 	hWndParent As HWND
 End Type
+TypeDef PMCI_ANIM_OPEN_PARMSW = *MCI_ANIM_OPEN_PARMSW
+TypeDef LPMCI_ANIM_OPEN_PARMSW = *MCI_ANIM_OPEN_PARMSW
+Type MCI_ANIM_OPEN_PARMSA
+	dwCallback As DWord
+	wDeviceID As MCIDEVICEID
+	lpstrDeviceType As LPCSTR
+	lpstrElementName As LPCSTR
+	lpstrAlias As LPCSTR
+	dwStyle As DWord
+	hWndParent As HWND
+End Type
 TypeDef PMCI_ANIM_OPEN_PARMSA = *MCI_ANIM_OPEN_PARMSA
 TypeDef LPMCI_ANIM_OPEN_PARMSA = *MCI_ANIM_OPEN_PARMSA
+#ifdef UNICODE
+TypeDef MCI_ANIM_OPEN_PARMS = MCI_ANIM_OPEN_PARMSW
+#else
 TypeDef MCI_ANIM_OPEN_PARMS = MCI_ANIM_OPEN_PARMSA
-TypeDef PMCI_ANIM_OPEN_PARMS = PMCI_ANIM_OPEN_PARMSA
-TypeDef LPMCI_ANIM_OPEN_PARMS = LPMCI_ANIM_OPEN_PARMSA
+#endif
+TypeDef PMCI_ANIM_OPEN_PARMS = *MCI_ANIM_OPEN_PARMS
+TypeDef LPMCI_ANIM_OPEN_PARMS = *MCI_ANIM_OPEN_PARMS
 
 Type MCI_ANIM_PLAY_PARMS
@@ -2049,15 +2386,27 @@
 TypeDef LPMCI_ANIM_STEP_PARMS = *MCI_ANIM_STEP_PARMS
 
-Type MCI_ANIM_WINDOW_PARMSA
+Type MCI_ANIM_WINDOW_PARMSW
 	dwCallback As DWord
 	hWnd As HWND
 	nCmdShow As DWord
-	lpstrText As LPSTR
+	lpstrText As LPCWSTR
+End Type
+TypeDef PMCI_ANIM_WINDOW_PARMSW = *MCI_ANIM_WINDOW_PARMSW
+TypeDef LPMCI_ANIM_WINDOW_PARMSW = *MCI_ANIM_WINDOW_PARMSW
+Type MCI_ANIM_WINDOW_PARMSA
+	dwCallback As DWord
+	hWnd As HWND
+	nCmdShow As DWord
+	lpstrText As LPCSTR
 End Type
 TypeDef PMCI_ANIM_WINDOW_PARMSA = *MCI_ANIM_WINDOW_PARMSA
 TypeDef LPMCI_ANIM_WINDOW_PARMSA = *MCI_ANIM_WINDOW_PARMSA
+#ifdef UNICODE
+TypeDef MCI_ANIM_WINDOW_PARMS = MCI_ANIM_WINDOW_PARMSW
+#else
 TypeDef MCI_ANIM_WINDOW_PARMS = MCI_ANIM_WINDOW_PARMSA
-TypeDef PMCI_ANIM_WINDOW_PARMS = PMCI_ANIM_WINDOW_PARMSA
-TypeDef LPMCI_ANIM_WINDOW_PARMS = LPMCI_ANIM_WINDOW_PARMSA
+#endif
+TypeDef PMCI_ANIM_WINDOW_PARMS = *MCI_ANIM_WINDOW_PARMS
+TypeDef LPMCI_ANIM_WINDOW_PARMS = *MCI_ANIM_WINDOW_PARMS
 
 Type MCI_ANIM_RECT_PARMS
@@ -2101,30 +2450,57 @@
 Const MCI_OVLY_WHERE_VIDEO =            &H00100000
 
-Type MCI_OVLY_OPEN_PARMSA
+Type MCI_OVLY_OPEN_PARMSAW
 	dwCallback As DWord
 	wDeviceID As MCIDEVICEID
-	lpstrDeviceType As LPSTR
-	lpstrElementName As LPSTR
-	lpstrAlias As LPSTR
+	lpstrDeviceType As LPCWSTR
+	lpstrElementName As LPCWSTR
+	lpstrAlias As LPCWSTR
 	dwStyle As DWord
 	hWndParent As HWND
 End Type
+TypeDef PMCI_OVLY_OPEN_PARMSW = *MCI_OVLY_OPEN_PARMSW
+TypeDef LPMCI_OVLY_OPEN_PARMSW = *MCI_OVLY_OPEN_PARMSW
+Type MCI_OVLY_OPEN_PARMSA
+	dwCallback As DWord
+	wDeviceID As MCIDEVICEID
+	lpstrDeviceType As LPCSTR
+	lpstrElementName As LPCSTR
+	lpstrAlias As LPCSTR
+	dwStyle As DWord
+	hWndParent As HWND
+End Type
 TypeDef PMCI_OVLY_OPEN_PARMSA = *MCI_OVLY_OPEN_PARMSA
 TypeDef LPMCI_OVLY_OPEN_PARMSA = *MCI_OVLY_OPEN_PARMSA
+#ifdef UNICODE
+TypeDef MCI_OVLY_OPEN_PARMS = MCI_OVLY_OPEN_PARMSW
+#else
 TypeDef MCI_OVLY_OPEN_PARMS = MCI_OVLY_OPEN_PARMSA
-TypeDef PMCI_OVLY_OPEN_PARMS = PMCI_OVLY_OPEN_PARMSA
-TypeDef LPMCI_OVLY_OPEN_PARMS = LPMCI_OVLY_OPEN_PARMSA
-
-Type MCI_OVLY_WINDOW_PARMSA
+#endif
+TypeDef PMCI_OVLY_OPEN_PARMS = *MCI_OVLY_OPEN_PARMS
+TypeDef LPMCI_OVLY_OPEN_PARMS = *MCI_OVLY_OPEN_PARMS
+
+Type MCI_OVLY_WINDOW_PARMSW
 	dwCallback As DWord
 	hWnd As HWND
 	nCmdShow As DWord
-	lpstrText As LPSTR
+	lpstrText As LPCWSTR
+End Type
+TypeDef PMCI_OVLY_WINDOW_PARMSW = *MCI_OVLY_WINDOW_PARMSW
+TypeDef LPMCI_OVLY_WINDOW_PARMSW = *MCI_OVLY_WINDOW_PARMSW
+Type MCI_OVLY_WINDOW_PARMSA
+	dwCallback As DWord
+	hWnd As HWND
+	nCmdShow As DWord
+	lpstrText As LPCSTR
 End Type
 TypeDef PMCI_OVLY_WINDOW_PARMSA = *MCI_OVLY_WINDOW_PARMSA
 TypeDef LPMCI_OVLY_WINDOW_PARMSA = *MCI_OVLY_WINDOW_PARMSA
+#ifdef UNICODE
+TypeDef MCI_OVLY_WINDOW_PARMS = MCI_OVLY_WINDOW_PARMSW
+#else
 TypeDef MCI_OVLY_WINDOW_PARMS = MCI_OVLY_WINDOW_PARMSA
-TypeDef PMCI_OVLY_WINDOW_PARMS = PMCI_OVLY_WINDOW_PARMSA
-TypeDef LPMCI_OVLY_WINDOW_PARMS = LPMCI_OVLY_WINDOW_PARMSA
+#endif
+TypeDef PMCI_OVLY_WINDOW_PARMS = *MCI_OVLY_WINDOW_PARMS
+TypeDef LPMCI_OVLY_WINDOW_PARMS = *MCI_OVLY_WINDOW_PARMS
 
 Type MCI_OVLY_RECT_PARMS
@@ -2135,14 +2511,25 @@
 TypeDef LPMCI_OVLY_RECT_PARMS = *MCI_OVLY_RECT_PARMS
 
+Type MCI_OVLY_SAVE_PARMSW
+	dwCallback As DWord
+	lpfilename As LPCWSTR
+	rc As RECT
+End Type
+TypeDef PMCI_OVLY_SAVE_PARMSW = *MCI_OVLY_SAVE_PARMSW
+TypeDef LPMCI_OVLY_SAVE_PARMSW = *MCI_OVLY_SAVE_PARMSW
 Type MCI_OVLY_SAVE_PARMSA
 	dwCallback As DWord
-	lpfilename As LPSTR
+	lpfilename As LPCSTR
 	rc As RECT
 End Type
 TypeDef PMCI_OVLY_SAVE_PARMSA = *MCI_OVLY_SAVE_PARMSA
 TypeDef LPMCI_OVLY_SAVE_PARMSA = *MCI_OVLY_SAVE_PARMSA
+#ifdef UNICODE
+TypeDef MCI_OVLY_SAVE_PARMS = MCI_OVLY_SAVE_PARMSW
+#else
 TypeDef MCI_OVLY_SAVE_PARMS = MCI_OVLY_SAVE_PARMSA
-TypeDef PMCI_OVLY_SAVE_PARMS = PMCI_OVLY_SAVE_PARMSA
-TypeDef LPMCI_OVLY_SAVE_PARMS = LPMCI_OVLY_SAVE_PARMSA
+#endif
+TypeDef PMCI_OVLY_SAVE_PARMS = *MCI_OVLY_SAVE_PARMS
+TypeDef LPMCI_OVLY_SAVE_PARMS = *MCI_OVLY_SAVE_PARMS
 
 Type MCI_OVLY_LOAD_PARMSA
@@ -2163,5 +2550,5 @@
 ' DIB Driver extensions
 Const SELECTDIB = 41
-Const DIBINDEX(n) = MAKELONG(n,&H10FF)
+Const DIBINDEX(n) = MAKELONG(n, &H10FF)
 
 #endif '_INC_MMSYS
