Index: Include/api_mmsys.sbp
===================================================================
--- Include/api_mmsys.sbp	(revision 141)
+++ Include/api_mmsys.sbp	(revision 158)
@@ -6,55 +6,4 @@
 #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
@@ -312,5 +261,9 @@
 ' Sound support
 
-Declare Function sndPlaySound Lib "winmm" Alias _FuncName_sndPlaySound (pszSound As PCTSTR, fuSound As DWord) As BOOL
+#ifdef UNICODE
+Declare Function sndPlaySound Lib "winmm" Alias "sndPlaySoundW" (pszSound As PCWSTR, fuSound As DWord) As BOOL
+#else
+Declare Function sndPlaySound Lib "winmm" Alias "sndPlaySoundA" (pszSound As PCSTR, fuSound As DWord) As BOOL
+#endif
 
 Const SND_SYNC = &H0000
@@ -340,5 +293,9 @@
 Const SND_ALIAS_SYSTEMDEFAULT = sndAlias(&H53, &H44)
 
-Declare Function PlaySound Lib "winmm" Alias _FuncName_PlaySound (pszSound As PCTSTR, hmod As HMODULE, fdwSound As DWord) As BOOL
+#ifdef UNICODE
+Declare Function PlaySound Lib "winmm" Alias "PlaySoundW" (pszSound As PCWSTR, hmod As HMODULE, fdwSound As DWord) As BOOL
+#else
+Declare Function PlaySound Lib "winmm" Alias "PlaySoundA" (pszSound As PCSTR, hmod As HMODULE, fdwSound As DWord) As BOOL
+#endif
 
 
@@ -416,4 +373,5 @@
 TypeDef PWAVEOUTCAPSW = *WAVEOUTCAPSW
 TypeDef LPWAVEOUTCAPSW = *WAVEOUTCAPSW
+
 Type WAVEOUTCAPSA
 	wMid As Word
@@ -428,11 +386,14 @@
 TypeDef PWAVEOUTCAPSA = *WAVEOUTCAPSA
 TypeDef LPWAVEOUTCAPSA = *WAVEOUTCAPSA
+
 #ifdef UNICODE
 TypeDef WAVEOUTCAPS = WAVEOUTCAPSW
+TypeDef PWAVEOUTCAPS = PWAVEOUTCAPSW
+TypeDef LPWAVEOUTCAPS = LPWAVEOUTCAPSW
 #else
 TypeDef WAVEOUTCAPS = WAVEOUTCAPSA
-#endif
-TypeDef PWAVEOUTCAPS = *WAVEOUTCAPS
-TypeDef LPWAVEOUTCAPS = *WAVEOUTCAPS
+TypeDef PWAVEOUTCAPS = PWAVEOUTCAPSA
+TypeDef LPWAVEOUTCAPS = LPWAVEOUTCAPSA
+#endif
 
 ' flags for dwSupport field of WAVEOUTCAPS
@@ -457,4 +418,5 @@
 TypeDef PWAVEINCAPSW = *WAVEINCAPSW
 TypeDef LPWAVEINCAPSW = *WAVEINCAPSW
+
 Type WAVEINCAPSA
 	wMid As Word
@@ -468,24 +430,27 @@
 TypeDef PWAVEINCAPSA = *WAVEINCAPSA
 TypeDef LPWAVEINCAPSA = *WAVEINCAPSA
+
 #ifdef UNICODE
 TypeDef WAVEINCAPS = WAVEINCAPSW
+TypeDef PWAVEINCAPS = PWAVEINCAPSW
+TypeDef LPWAVEINCAPS = LPWAVEINCAPSW
 #else
 TypeDef WAVEINCAPS = WAVEINCAPSA
-#endif
-TypeDef PWAVEINCAPS = *WAVEINCAPS
-TypeDef LPWAVEINCAPS = *WAVEINCAPS
+TypeDef PWAVEINCAPS = PWAVEINCAPSA
+TypeDef LPWAVEINCAPS = LPWAVEINCAPSA
+#endif
 
 ' 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
@@ -528,8 +493,16 @@
 ' waveform audio function prototypes
 Declare Function waveOutGetNumDevs Lib "winmm" () As DWord
-Declare Function waveOutGetDevCaps Lib "winmm" Alias _FuncName_waveOutGetDevCaps (uDeviceID As DWord, ByRef woc As WAVEOUTCAPS, cbwoc As DWord) As MMRESULT
+#ifdef UNICODE
+Declare Function waveOutGetDevCaps Lib "winmm" Alias "waveOutGetDevCapsW" (uDeviceID As DWord, ByRef pwoc As WAVEOUTCAPSW, cbwoc As DWord) As MMRESULT
+#else
+Declare Function waveOutGetDevCaps Lib "winmm" Alias "waveOutGetDevCapsA" (uDeviceID As DWord, ByRef pwoc As WAVEOUTCAPS, cbwoc As DWord) As MMRESULT
+#endif
 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 _FuncName_waveOutGetErrorText (mmrError As MMRESULT, pszText As LPTSTR, cchText As DWord) As MMRESULT
+#ifdef UNICODE
+Declare Function waveOutGetErrorText Lib "winmm" Alias "waveOutGetErrorTextW" (mmrError As MMRESULT, pszText As LPWSTR, cchText As DWord) As MMRESULT
+#else
+Declare Function waveOutGetErrorText Lib "winmm" Alias "waveOutGetErrorTextA" (mmrError As MMRESULT, pszText As LPSTR, cchText As DWord) As MMRESULT
+#endif
 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
@@ -550,6 +523,11 @@
 
 Declare Function waveInGetNumDevs Lib "winmm" () As DWord
-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
+#ifdef UNICODE
+Declare Function waveInGetDevCaps Lib "winmm" Alias "waveInGetDevCapsW" (uDeviceID As DWord, ByRef pwic As WAVEINCAPSW, cbwic As DWord) As MMRESULT
+Declare Function waveInGetErrorText Lib "winmm" Alias "waveInGetErrorTextW" (mmrError As MMRESULT, pszText As LPWSTR, cchText As DWord) As MMRESULT
+#else
+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
+#endif
 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
@@ -637,4 +615,5 @@
 TypeDef PMIDIOUTCAPSW = *MIDIOUTCAPSW
 TypeDef LPMIDIOUTCAPSW = *MIDIOUTCAPSW
+
 Type MIDIOUTCAPSA
 	wMid As Word
@@ -653,9 +632,11 @@
 #ifdef UNICODE
 TypeDef MIDIOUTCAPS = MIDIOUTCAPSW
+TypeDef PMIDIOUTCAPS = PMIDIOUTCAPSW
+TypeDef LPMIDIOUTCAPS = LPMIDIOUTCAPSW
 #else
 TypeDef MIDIOUTCAPS = MIDIOUTCAPSA
-#endif
-TypeDef PMIDIOUTCAPS = *MIDIOUTCAPS
-TypeDef LPMIDIOUTCAPS = *MIDIOUTCAPS
+TypeDef PMIDIOUTCAPS = PMIDIOUTCAPSA
+TypeDef LPMIDIOUTCAPS = LPMIDIOUTCAPSA
+#endif
 
 ' flags for wTechnology field of MIDIOUTCAPS structure
@@ -677,25 +658,29 @@
 	wPid As Word
 	vDriverVersion As MMVERSION
-	szPname[ELM(MAXPNAMELEN)] As WCHAR
+	szPname[ELM(MAXPNAMELEN)] As Char
 	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 SByte
+	szPname[ELM(MAXPNAMELEN)] As Char
 	dwSupport As DWord
 End Type
 TypeDef PMIDIINCAPSA = *MIDIINCAPSA
 TypeDef LPMIDIINCAPSA = *MIDIINCAPSA
+
 #ifdef UNICODE
 TypeDef MIDIINCAPS = MIDIINCAPSW
+TypeDef PMIDIINCAPS = PMIDIINCAPSW
+TypeDef LPMIDIINCAPS = LPMIDIINCAPSW
 #else
 TypeDef MIDIINCAPS = MIDIINCAPSA
-#endif
-TypeDef PMIDIINCAPS = *MIDIINCAPS
-TypeDef LPMIDIINCAPS = *MIDIINCAPS
+TypeDef PMIDIINCAPS = PMIDIINCAPSA
+TypeDef LPMIDIINCAPS = LPMIDIINCAPSA
+#endif
 
 ' MIDI data block header
@@ -779,8 +764,16 @@
 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 _FuncName_midiOutGetDevCaps (uDeviceID As DWord, ByRef moc As MIDIOUTCAPS, cbmoc As DWord) As MMRESULT
+#ifdef UNICODE
+Declare Function midiOutGetDevCaps Lib "winmm" Alias "midiOutGetDevCapsW" (uDeviceID As DWord, ByRef pmoc  As MIDIOUTCAPSW, cbmoc As DWord) As MMRESULT
+#else
+Declare Function midiOutGetDevCaps Lib "winmm" Alias "midiOutGetDevCapsA" (uDeviceID As DWord, ByRef pmoc  As MIDIOUTCAPS, cbmoc As DWord) As MMRESULT
+#endif
 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 _FuncName_midiOutGetErrorText (mmrError As MMRESULT, pszText As LPTSTR, cchText As DWord) As MMRESULT
+#ifdef UNICODE
+Declare Function midiOutGetErrorText Lib "winmm" Alias "midiOutGetErrorTextW" (mmrError As MMRESULT, pszText As LPWSTR, cchText As DWord) As MMRESULT
+#else
+Declare Function midiOutGetErrorText Lib "winmm" Alias "midiOutGetErrorTextA" (mmrError As MMRESULT, pszText As LPSTR, cchText As DWord) As MMRESULT
+#endif
 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
@@ -796,6 +789,11 @@
 
 Declare Function midiInGetNumDevs Lib "winmm" () As DWord
-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
+#ifdef UNICODE
+Declare Function midiInGetDevCaps Lib "winmm" Alias "midiInGetDevCapsW" (uDeviceID As DWord, ByRef pmic As MIDIINCAPSW, cbmic As DWord) As MMRESULT
+Declare Function midiInGetErrorText Lib "winmm" Alias "midiInGetErrorTextW" (mmrError As MMRESULT, pszText As LPWSTR, cchText As DWord) As MMRESULT
+#else
+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
+#endif
 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
@@ -829,4 +827,5 @@
 TypeDef NPAUXCAPSW = *AUXCAPSW
 TypeDef LPAUXCAPSW = *AUXCAPSW
+
 Type AUXCAPSA
 	wMid As Word
@@ -841,12 +840,16 @@
 TypeDef NPAUXCAPSA = *AUXCAPSA
 TypeDef LPAUXCAPSA = *AUXCAPSA
-#ifdef UNICODE
+
+#ifdef UNICODE
+TypeDef AUXCAPS = AUXCAPSW
+TypeDef PAUXCAPS = PAUXCAPSW
+TypeDef NPAUXCAPS = NPAUXCAPSW
+TypeDef LPAUXCAPS = LPAUXCAPSW
+#else
 TypeDef AUXCAPS = AUXCAPSA
-#else
-TypeDef AUXCAPS = AUXCAPSA
-#endif
-TypeDef PAUXCAPS = *AUXCAPS
-TypeDef NPAUXCAPS = *AUXCAPS
-TypeDef LPAUXCAPS = *AUXCAPS
+TypeDef PAUXCAPS = PAUXCAPSA
+TypeDef NPAUXCAPS = NPAUXCAPSA
+TypeDef LPAUXCAPS = LPAUXCAPSA
+#endif
 
 Const AUXCAPS_CDAUDIO = 1
@@ -858,5 +861,9 @@
 ' auxiliary audio function prototypes
 Declare Function auxGetNumDevs Lib "winmm" () As DWord
-Declare Function auxGetDevCaps Lib "winmm" Alias _FuncName_auxGetDevCaps (uDeviceID As DWord, pac As *AUXCAPS, cbac As DWord) As MMRESULT
+#ifdef UNICODE
+Declare Function auxGetDevCaps Lib "winmm" Alias "auxGetDevCapsW" (uDeviceID As DWord, pac As *AUXCAPSW, cbac As DWord) As MMRESULT
+#else
+Declare Function auxGetDevCaps Lib "winmm" Alias "auxGetDevCapsA" (uDeviceID As DWord, pac As *AUXCAPS, cbac As DWord) As MMRESULT
+#endif
 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
@@ -905,9 +912,10 @@
 TypeDef PMIXERCAPSW = *MIXERCAPSW
 TypeDef LPMIXERCAPSW = *MIXERCAPSW
+
 Type MIXERCAPSA
 	wMid As Word
 	wPid As Word
 	vDriverVersion As MMVERSION
-	szPname[ELM(MAXPNAMELEN)] As Char
+	szPname[ELM(MAXPNAMELEN)] As SByte
 	fdwSupport As DWord
 	cDestinations As DWord
@@ -915,18 +923,23 @@
 TypeDef PMIXERCAPSA = *MIXERCAPSA
 TypeDef LPMIXERCAPSA = *MIXERCAPSA
+
 #ifdef UNICODE
 TypeDef MIXERCAPS = MIXERCAPSW
+TypeDef PMIXERCAPS = PMIXERCAPSW
+TypeDef LPMIXERCAPS = LPMIXERCAPSW
+Declare Function mixerGetDevCaps Lib "winmm" Alias "mixerGetDevCapsW" (uMxId As DWord, pmxcaps As *MIXERCAPSW, cbmxcaps As DWord) As MMRESULT
 #else
 TypeDef MIXERCAPS = MIXERCAPSA
-#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
+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
+
 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 _MMSYSTEM_TARGETW
+#ifdef UNICODE
+Type TARGET
 	dwType As DWord
 	dwDeviceID As DWord
@@ -936,4 +949,14 @@
 	szPname[ELM(MAXPNAMELEN)] As WCHAR
 End Type
+#else
+Type TARGET
+	dwType As DWord
+	dwDeviceID As DWord
+	wMid As Word
+	wPid As Word
+	vDriverVersion As MMVERSION
+	szPname[ELM(MAXPNAMELEN)] As SByte
+End Type
+#endif
 
 Type MIXERLINEW
@@ -950,17 +973,8 @@
 	szShortName[ELM(MIXER_SHORT_NAME_CHARS)] As WCHAR
 	szName[ELM(MIXER_LONG_NAME_CHARS)] As WCHAR
-	Target As _MMSYSTEM_TARGETW
+	Target As TARGET
 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
 
 Type MIXERLINEA
@@ -977,15 +991,18 @@
 	szShortName[ELM(MIXER_SHORT_NAME_CHARS)] As SByte
 	szName[ELM(MIXER_LONG_NAME_CHARS)] As SByte
-	Target As _MMSYSTEM_TARGETA
+	Target As TARGET
 End Type
 TypeDef PMIXERLINEA = *MIXERLINEA
 TypeDef LPMIXERLINEA = *MIXERLINEA
-#ifdef UNICODE
+
+#ifdef UNICODE
+TypeDef MIXERLINE = MIXERLINEA
+TypeDef PMIXERLINE = PMIXERLINEA
+TypeDef LPMIXERLINE = LPMIXERLINEA
+#else
 TypeDef MIXERLINE = MIXERLINEW
-#else
-TypeDef MIXERLINE = MIXERLINEA
-#endif
-TypeDef PMIXERLINE = *MIXERLINE
-TypeDef LPMIXERLINE = *MIXERLINE
+TypeDef PMIXERLINE = PMIXERLINEW
+TypeDef LPMIXERLINE = LPMIXERLINEW
+#endif
 
 ' MIXERLINE.fdwLine
@@ -1029,5 +1046,9 @@
 Const MIXERLINE_TARGETTYPE_AUX = 5
 
-Declare Function mixerGetLineInfo Lib "winmm" Alias _FuncName_mixerGetLineInfo (hmxobj As HMIXEROBJ, pmxl As *MIXERLINE, fdwInfo As DWord) As MMRESULT
+#ifdef UNICODE
+Declare Function mixerGetLineInfo Lib "winmm" Alias "mixerGetLineInfoW" (hmxobj As HMIXEROBJ, pmxl As *MIXERLINEW, fdwInfo As DWord) As MMRESULT
+#else
+Declare Function mixerGetLineInfo Lib "winmm" Alias "mixerGetLineInfoA" (hmxobj As HMIXEROBJ, pmxl As *MIXERLINE, fdwInfo As DWord) As MMRESULT
+#endif
 
 Const MIXER_GETLINEINFOF_DESTINATION = &H00000000
@@ -1053,4 +1074,5 @@
 TypeDef PMIXERCONTROLW = *MIXERCONTROLW
 TypeDef LPMIXERCONTROLW = *MIXERCONTROLW
+
 Type MIXERCONTROLA
 	cbStruct As DWord
@@ -1066,11 +1088,14 @@
 TypeDef PMIXERCONTROLA = *MIXERCONTROLA
 TypeDef LPMIXERCONTROLA = *MIXERCONTROLA
+
 #ifdef UNICODE
 TypeDef MIXERCONTROL = MIXERCONTROLW
+TypeDef PMIXERCONTROL = PMIXERCONTROLW
+TypeDef LPMIXERCONTROL = LPMIXERCONTROLW
 #else
 TypeDef MIXERCONTROL = MIXERCONTROLA
-#endif
-TypeDef PMIXERCONTROL = *MIXERCONTROL
-TypeDef LPMIXERCONTROL = *MIXERCONTROL
+TypeDef PMIXERCONTROL = PMIXERCONTROLA
+TypeDef LPMIXERCONTROL = LPMIXERCONTROLA
+#endif
 
 ' MIXERCONTROL.fdwControl
@@ -1147,4 +1172,5 @@
 TypeDef PMIXERLINECONTROLSW = *MIXERLINECONTROLSW
 TypeDef LPMIXERLINECONTROLSW = *MIXERLINECONTROLSW
+
 Type MIXERLINECONTROLSA
 	cbStruct As DWord
@@ -1153,17 +1179,20 @@
 	cControls As DWord
 	cbmxctrl As DWord
-	pamxctrl As *MIXERCONTROLA
+	pamxctrl As *MIXERCONTROL
 End Type
 TypeDef PMIXERLINECONTROLSA = *MIXERLINECONTROLSA
 TypeDef LPMIXERLINECONTROLSA = *MIXERLINECONTROLSA
-#ifdef UNICODE
+
+#ifdef UNICODE
+TypeDef MIXERLINECONTROLS = MIXERLINECONTROLSW
+TypeDef PMIXERLINECONTROLS = PMIXERLINECONTROLSW
+TypeDef LPMIXERLINECONTROLS = LPMIXERLINECONTROLSW
+Declare Function mixerGetLineControls Lib "winmm" Alias "mixerGetLineControlsA" (hmxobj As HMIXEROBJ, pmxlc As *MIXERLINECONTROLSW, fdwControls As DWord) As MMRESULT
+#else
 TypeDef MIXERLINECONTROLS = MIXERLINECONTROLSA
-#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
+TypeDef PMIXERLINECONTROLS = PMIXERLINECONTROLSA
+TypeDef LPMIXERLINECONTROLS = LPMIXERLINECONTROLSA
+Declare Function mixerGetLineControls Lib "winmm" Alias "mixerGetLineControlsA" (hmxobj As HMIXEROBJ, pmxlc As *MIXERLINECONTROLS, fdwControls As DWord) As MMRESULT
+#endif
 
 Const MIXER_GETLINECONTROLSF_ALL = &H00000000
@@ -1190,4 +1219,5 @@
 TypeDef PMIXERCONTROLDETAILS_LISTTEXTW = *MIXERCONTROLDETAILS_LISTTEXTW
 TypeDef LPMIXERCONTROLDETAILS_LISTTEXTW = *MIXERCONTROLDETAILS_LISTTEXTW
+
 Type MIXERCONTROLDETAILS_LISTTEXTA
 	dwParam1 As DWord
@@ -1197,11 +1227,14 @@
 TypeDef PMIXERCONTROLDETAILS_LISTTEXTA = *MIXERCONTROLDETAILS_LISTTEXTA
 TypeDef LPMIXERCONTROLDETAILS_LISTTEXTA = *MIXERCONTROLDETAILS_LISTTEXTA
+
 #ifdef UNICODE
 TypeDef MIXERCONTROLDETAILS_LISTTEXT = MIXERCONTROLDETAILS_LISTTEXTW
+TypeDef PMIXERCONTROLDETAILS_LISTTEXT = PMIXERCONTROLDETAILS_LISTTEXTW
+TypeDef LPMIXERCONTROLDETAILS_LISTTEXT = LPMIXERCONTROLDETAILS_LISTTEXTW
 #else
 TypeDef MIXERCONTROLDETAILS_LISTTEXT = MIXERCONTROLDETAILS_LISTTEXTA
-#endif
-TypeDef PMIXERCONTROLDETAILS_LISTTEXT = *MIXERCONTROLDETAILS_LISTTEXT
-TypeDef LPMIXERCONTROLDETAILS_LISTTEXT = *MIXERCONTROLDETAILS_LISTTEXT
+TypeDef PMIXERCONTROLDETAILS_LISTTEXT = PMIXERCONTROLDETAILS_LISTTEXTA
+TypeDef LPMIXERCONTROLDETAILS_LISTTEXT = LPMIXERCONTROLDETAILS_LISTTEXTA
+#endif
 
 Type MIXERCONTROLDETAILS_BOOLEAN
@@ -1225,5 +1258,9 @@
 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 _FuncName_mixerGetControlDetails (hmxobj As HMIXEROBJ, pmxcd As *MIXERCONTROLDETAILS, fdwDetails As DWord) As MMRESULT
+#ifdef UNICODE
+Declare Function mixerGetControlDetails Lib "winmm" Alias "mixerGetControlDetailsW" (hmxobj As HMIXEROBJ, pmxcd As *MIXERCONTROLDETAILS, fdwDetails As DWord) As MMRESULT
+#else
+Declare Function mixerGetControlDetails Lib "winmm" Alias "mixerGetControlDetailsA" (hmxobj As HMIXEROBJ, pmxcd As *MIXERCONTROLDETAILS, fdwDetails As DWord) As MMRESULT
+#endif
 
 Const MIXER_GETCONTROLDETAILSF_VALUE = &H00000000
@@ -1398,4 +1435,5 @@
 TypeDef NPJOYCAPSW = *JOYCAPSW
 TypeDef LPJOYCAPSW = *JOYCAPSW
+
 Type JOYCAPSA
 	wMid As Word
@@ -1427,12 +1465,16 @@
 TypeDef NPJOYCAPSA = *JOYCAPSA
 TypeDef LPJOYCAPSA = *JOYCAPSA
+
 #ifdef UNICODE
 TypeDef JOYCAPS = JOYCAPSW
+TypeDef PJOYCAPS = PJOYCAPSW
+TypeDef NPJOYCAPS = NPJOYCAPSW
+TypeDef LPJOYCAPS = LPJOYCAPSW
 #else
 TypeDef JOYCAPS = JOYCAPSA
-#endif
 TypeDef PJOYCAPS = PJOYCAPSA
 TypeDef NPJOYCAPS = NPJOYCAPSA
 TypeDef LPJOYCAPS = LPJOYCAPSA
+#endif
 
 Type JOYINFO
@@ -1467,5 +1509,9 @@
 ' joystick function prototypes
 Declare Function joyGetNumDevs Lib "winmm" () As DWord
-Declare Function joyGetDevCaps Lib "winmm" Alias _FuncName_joyGetDevCaps (uJoyID As DWord, pjc As *JOYCAPS, cbjc As DWord) As MMRESULT
+#ifdef UNICODE
+Declare Function joyGetDevCaps Lib "winmm" Alias "joyGetDevCapsW" (uJoyID As DWord, pjc As *JOYCAPSW, cbjc As DWord) As MMRESULT
+#else
+Declare Function joyGetDevCaps Lib "winmm" Alias "joyGetDevCapsA" (uJoyID As DWord, pjc As *JOYCAPS, cbjc As DWord) As MMRESULT
+#endif
 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
@@ -1597,8 +1643,15 @@
 
 ' MMIO function prototypes
-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
+#ifdef UNICODE
+Declare Function mmioStringToFOURCC Lib "winmm" Alias "mmioStringToFOURCCW" (sz As LPWSTR, uFlags As DWord) As FOURCC
+Declare Function mmioInstallIOProc Lib "winmm" Alias "mmioInstallIOProcW" (fccIOProc As FOURCC, pIOProc As LPMMIOPROC, dwFlags As DWord) As LPMMIOPROC
+Declare Function mmioOpen Lib "winmm" Alias "mmioOpenW" (pszFileName As LPWSTR, pmmioinfo As *MMIOINFO, fdwOpen As DWord) As HMMIO
+Declare Function mmioRename Lib "winmm" Alias "mmioRenameW" (pszFileName As LPSTR, pszNewFileName As LPWSTR, pmmioinfo As *MMIOINFO, fdwRename As DWord) As MMRESULT
+#else
+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
+#endif
 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
@@ -1624,9 +1677,16 @@
 
 ' MCI Functions
-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
+#ifdef UNICODE
+Declare Function mciSendCommand Lib "winmm" Alias "mciSendCommandW" (mciId As MCIDEVICEID, uMsg As DWord, dwParam1 As DWord, ByRef dwParam2 As Any) As MCIERROR
+Declare Function mciSendString Lib "winmm" Alias "mciSendStringW" (lpstrCommand As LPWSTR, lpstrReturnString As LPWSTR, uReturnLength As DWord, hwndCallback As HWND) As MCIERROR
+Declare Function mciGetDeviceID Lib "winmm" Alias "mciGetDeviceIDW" (pszDevice As LPWSTR) As MCIDEVICEID
+Declare Function mciGetErrorString Lib "winmm" Alias "mciGetErrorStringA" (mcierr As MCIERROR, pszText As LPWSTR, cchText As DWord) As BOOL
+#else
+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
+#endif
+
 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
@@ -1942,27 +2002,11 @@
 TypeDef LPMCI_GENERIC_PARMS = *MCI_GENERIC_PARMS
 
-Type MCI_OPEN_PARMSW
+Type MCI_OPEN_PARMS
 	dwCallback As DWord
 	wDeviceID As DWord
-	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
+	lpstrDeviceType As LPSTR
+	lpstrElementName As LPSTR
+	lpstrAlias As LPSTR
+End Type
 TypeDef PMCI_OPEN_PARMS = *MCI_OPEN_PARMS
 TypeDef LPMCI_OPEN_PARMS = *MCI_OPEN_PARMS
@@ -1999,4 +2043,5 @@
 TypeDef PMCI_INFO_PARMSW = *MCI_INFO_PARMSW
 TypeDef LPMCI_INFO_PARMSW = *MCI_INFO_PARMSW
+
 Type MCI_INFO_PARMSA
 	dwCallback As DWord
@@ -2006,11 +2051,14 @@
 TypeDef PMCI_INFO_PARMSA = *MCI_INFO_PARMSA
 TypeDef LPMCI_INFO_PARMSA = *MCI_INFO_PARMSA
+
 #ifdef UNICODE
 TypeDef MCI_INFO_PARMS = MCI_INFO_PARMSW
+TypeDef PMCI_INFO_PARMS = PMCI_INFO_PARMSW
+TypeDef LPMCI_INFO_PARMS = LPMCI_INFO_PARMSW
 #else
 TypeDef MCI_INFO_PARMS = MCI_INFO_PARMSA
-#endif
-TypeDef PMCI_INFO_PARMS = *MCI_INFO_PARMS
-TypeDef LPMCI_INFO_PARMS = *MCI_INFO_PARMS
+TypeDef PMCI_INFO_PARMS = PMCI_INFO_PARMSA
+TypeDef LPMCI_INFO_PARMS = LPMCI_INFO_PARMSA
+#endif
 
 Type MCI_GETDEVCAPS_PARMS
@@ -2031,4 +2079,5 @@
 TypeDef PMCI_SYSINFO_PARMSW = *MCI_SYSINFO_PARMSW
 TypeDef LPMCI_SYSINFO_PARMSW = *MCI_SYSINFO_PARMSW
+
 Type MCI_SYSINFO_PARMSA
 	dwCallback As DWord
@@ -2040,11 +2089,14 @@
 TypeDef PMCI_SYSINFO_PARMSA = *MCI_SYSINFO_PARMSA
 TypeDef LPMCI_SYSINFO_PARMSA = *MCI_SYSINFO_PARMSA
-#ifdef UNICODE
+
+#ifdef UNICODE
+TypeDef MCI_SYSINFO_PARMS = MCI_SYSINFO_PARMSW
+TypeDef PMCI_SYSINFO_PARMS = PMCI_SYSINFO_PARMSW
+TypeDef LPMCI_SYSINFO_PARMS = LPMCI_SYSINFO_PARMSW
+#else
 TypeDef MCI_SYSINFO_PARMS = MCI_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
+TypeDef PMCI_SYSINFO_PARMS = PMCI_SYSINFO_PARMSA
+TypeDef LPMCI_SYSINFO_PARMS = LPMCI_SYSINFO_PARMSA
+#endif
 
 Type MCI_SET_PARMS
@@ -2066,41 +2118,49 @@
 Type MCI_SAVE_PARMSW
 	dwCallback As DWord
-	lpfilename As LPCWSTR
+	lpfilename As LPWSTR
 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 LPCSTR
+	lpfilename As LPSTR
 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
+TypeDef PMCI_SAVE_PARMS = PMCI_SAVE_PARMSW
+TypeDef LPMCI_SAVE_PARMS = LPMCI_SAVE_PARMSW
 #else
 TypeDef MCI_SAVE_PARMS = MCI_SAVE_PARMSA
-#endif
-TypeDef PMCI_SAVE_PARMS = *MCI_SAVE_PARMS
-TypeDef LPMCI_SAVE_PARMS = *MCI_SAVE_PARMS
+TypeDef PMCI_SAVE_PARMS = PMCI_SAVE_PARMSA
+TypeDef LPMCI_SAVE_PARMS = LPMCI_SAVE_PARMSA
+#endif
 
 Type MCI_LOAD_PARMSW
 	dwCallback As DWord
-	lpfilename As LPCWSTR
+	lpfilename As LPWSTR
 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 LPCSTR
+	lpfilename As LPSTR
 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
+TypeDef PMCI_LOAD_PARMS = PMCI_LOAD_PARMSW
+TypeDef LPMCI_LOAD_PARMS = LPMCI_LOAD_PARMSW
 #else
 TypeDef MCI_LOAD_PARMS = MCI_LOAD_PARMSA
-#endif
-TypeDef PMCI_LOAD_PARMS = *MCI_LOAD_PARMS
-TypeDef LPMCI_LOAD_PARMS = *MCI_LOAD_PARMS
+TypeDef PMCI_LOAD_PARMS = PMCI_LOAD_PARMSA
+TypeDef LPMCI_LOAD_PARMS = LPMCI_LOAD_PARMSA
+#endif
 
 Type MCI_RECORD_PARMS
@@ -2159,21 +2219,25 @@
 Type MCI_VD_ESCAPE_PARMSW
 	dwCallback As DWord
-	lpstrCommand As LPCWSTR
+	lpstrCommand As LPWSTR
 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 LPCSTR
+	lpstrCommand As LPSTR
 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
+TypeDef PMCI_VD_ESCAPE_PARMS = PMCI_VD_ESCAPE_PARMSW
+TypeDef LPMCI_VD_ESCAPE_PARMS = LPMCI_VD_ESCAPE_PARMSW
 #else
 TypeDef MCI_VD_ESCAPE_PARMS = MCI_VD_ESCAPE_PARMSA
-#endif
-TypeDef PMCI_VD_ESCAPE_PARMS = *MCI_VD_ESCAPE_PARMS
-TypeDef LPMCI_VD_ESCAPE_PARMS = *MCI_VD_ESCAPE_PARMS
+TypeDef PMCI_VD_ESCAPE_PARMS = PMCI_VD_ESCAPE_PARMSA
+TypeDef LPMCI_VD_ESCAPE_PARMS = LPMCI_VD_ESCAPE_PARMSA
+#endif
 
 ' MCI extensions for CD audio devices
@@ -2209,28 +2273,32 @@
 	dwCallback As DWord
 	wDeviceID As MCIDEVICEID
-	lpstrDeviceType As LPCWSTR
-	lpstrElementName As LPCWSTR
-	lpstrAlias As LPCWSTR
+	lpstrDeviceType As LPWSTR
+	lpstrElementName As LPWSTR
+	lpstrAlias As LPWSTR
 	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 LPCSTR
-	lpstrElementName As LPCSTR
-	lpstrAlias As LPCSTR
+	lpstrDeviceType As LPSTR
+	lpstrElementName As LPSTR
+	lpstrAlias As LPSTR
 	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
+TypeDef PMCI_WAVE_OPEN_PARMS = PMCI_WAVE_OPEN_PARMSW
+TypeDef LPMCI_WAVE_OPEN_PARMS = LPMCI_WAVE_OPEN_PARMSW
 #else
 TypeDef MCI_WAVE_OPEN_PARMS = MCI_WAVE_OPEN_PARMSA
-#endif
-TypeDef PMCI_WAVE_OPEN_PARMS = *MCI_WAVE_OPEN_PARMS
-TypeDef LPMCI_WAVE_OPEN_PARMS = *MCI_WAVE_OPEN_PARMS
+TypeDef PMCI_WAVE_OPEN_PARMS = PMCI_WAVE_OPEN_PARMSA
+TypeDef LPMCI_WAVE_OPEN_PARMS = LPMCI_WAVE_OPEN_PARMSA
+#endif
 
 Type MCI_WAVE_DELETE_PARMS
@@ -2343,7 +2411,7 @@
 	dwCallback As DWord
 	wDeviceID As MCIDEVICEID
-	lpstrDeviceType As LPCWSTR
-	lpstrElementName As LPCWSTR
-	lpstrAlias As LPCWSTR
+	lpstrDeviceType As LPWSTR
+	lpstrElementName As LPWSTR
+	lpstrAlias As LPWSTR
 	dwStyle As DWord
 	hWndParent As HWND
@@ -2351,10 +2419,11 @@
 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
+	lpstrDeviceType As LPSTR
+	lpstrElementName As LPSTR
+	lpstrAlias As LPSTR
 	dwStyle As DWord
 	hWndParent As HWND
@@ -2362,11 +2431,14 @@
 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
+TypeDef PMCI_ANIM_OPEN_PARMS = PMCI_ANIM_OPEN_PARMSW
+TypeDef LPMCI_ANIM_OPEN_PARMS = LPMCI_ANIM_OPEN_PARMSW
 #else
 TypeDef MCI_ANIM_OPEN_PARMS = MCI_ANIM_OPEN_PARMSA
-#endif
-TypeDef PMCI_ANIM_OPEN_PARMS = *MCI_ANIM_OPEN_PARMS
-TypeDef LPMCI_ANIM_OPEN_PARMS = *MCI_ANIM_OPEN_PARMS
+TypeDef PMCI_ANIM_OPEN_PARMS = PMCI_ANIM_OPEN_PARMSA
+TypeDef LPMCI_ANIM_OPEN_PARMS = LPMCI_ANIM_OPEN_PARMSA
+#endif
 
 Type MCI_ANIM_PLAY_PARMS
@@ -2386,27 +2458,15 @@
 TypeDef LPMCI_ANIM_STEP_PARMS = *MCI_ANIM_STEP_PARMS
 
-Type MCI_ANIM_WINDOW_PARMSW
+Type MCI_ANIM_WINDOW_PARMSA
 	dwCallback As DWord
 	hWnd As HWND
 	nCmdShow As DWord
-	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
+	lpstrText As LPSTR
 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
-#endif
-TypeDef PMCI_ANIM_WINDOW_PARMS = *MCI_ANIM_WINDOW_PARMS
-TypeDef LPMCI_ANIM_WINDOW_PARMS = *MCI_ANIM_WINDOW_PARMS
+TypeDef PMCI_ANIM_WINDOW_PARMS = PMCI_ANIM_WINDOW_PARMSA
+TypeDef LPMCI_ANIM_WINDOW_PARMS = LPMCI_ANIM_WINDOW_PARMSA
 
 Type MCI_ANIM_RECT_PARMS
@@ -2450,10 +2510,10 @@
 Const MCI_OVLY_WHERE_VIDEO =            &H00100000
 
-Type MCI_OVLY_OPEN_PARMSAW
+Type MCI_OVLY_OPEN_PARMSW
 	dwCallback As DWord
 	wDeviceID As MCIDEVICEID
-	lpstrDeviceType As LPCWSTR
-	lpstrElementName As LPCWSTR
-	lpstrAlias As LPCWSTR
+	lpstrDeviceType As LPWSTR
+	lpstrElementName As LPWSTR
+	lpstrAlias As LPWSTR
 	dwStyle As DWord
 	hWndParent As HWND
@@ -2461,10 +2521,11 @@
 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
+	lpstrDeviceType As LPSTR
+	lpstrElementName As LPSTR
+	lpstrAlias As LPSTR
 	dwStyle As DWord
 	hWndParent As HWND
@@ -2472,11 +2533,14 @@
 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
+TypeDef PMCI_OVLY_OPEN_PARMS = PMCI_OVLY_OPEN_PARMSW
+TypeDef LPMCI_OVLY_OPEN_PARMS = LPMCI_OVLY_OPEN_PARMSW
 #else
 TypeDef MCI_OVLY_OPEN_PARMS = MCI_OVLY_OPEN_PARMSA
-#endif
-TypeDef PMCI_OVLY_OPEN_PARMS = *MCI_OVLY_OPEN_PARMS
-TypeDef LPMCI_OVLY_OPEN_PARMS = *MCI_OVLY_OPEN_PARMS
+TypeDef PMCI_OVLY_OPEN_PARMS = PMCI_OVLY_OPEN_PARMSA
+TypeDef LPMCI_OVLY_OPEN_PARMS = LPMCI_OVLY_OPEN_PARMSA
+#endif
 
 Type MCI_OVLY_WINDOW_PARMSW
@@ -2484,23 +2548,18 @@
 	hWnd As HWND
 	nCmdShow As DWord
-	lpstrText As LPCWSTR
+	lpstrText As LPWSTR
 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
+TypeDef PMCI_OVLY_WINDOW_PARMS = PMCI_OVLY_WINDOW_PARMSW
+TypeDef LPMCI_OVLY_WINDOW_PARMS = LPMCI_OVLY_WINDOW_PARMSW
 #else
 TypeDef MCI_OVLY_WINDOW_PARMS = MCI_OVLY_WINDOW_PARMSA
-#endif
-TypeDef PMCI_OVLY_WINDOW_PARMS = *MCI_OVLY_WINDOW_PARMS
-TypeDef LPMCI_OVLY_WINDOW_PARMS = *MCI_OVLY_WINDOW_PARMS
+TypeDef PMCI_OVLY_WINDOW_PARMS = PMCI_OVLY_WINDOW_PARMSA
+TypeDef LPMCI_OVLY_WINDOW_PARMS = LPMCI_OVLY_WINDOW_PARMSA
+#endif
 
 Type MCI_OVLY_RECT_PARMS
@@ -2513,23 +2572,35 @@
 Type MCI_OVLY_SAVE_PARMSW
 	dwCallback As DWord
-	lpfilename As LPCWSTR
+	lpfilename As LPWSTR
 	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 LPCSTR
+	lpfilename As LPSTR
 	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
+TypeDef PMCI_OVLY_SAVE_PARMS = PMCI_OVLY_SAVE_PARMSW
+TypeDef LPMCI_OVLY_SAVE_PARMS = LPMCI_OVLY_SAVE_PARMSW
 #else
 TypeDef MCI_OVLY_SAVE_PARMS = MCI_OVLY_SAVE_PARMSA
-#endif
-TypeDef PMCI_OVLY_SAVE_PARMS = *MCI_OVLY_SAVE_PARMS
-TypeDef LPMCI_OVLY_SAVE_PARMS = *MCI_OVLY_SAVE_PARMS
+TypeDef PMCI_OVLY_SAVE_PARMS = PMCI_OVLY_SAVE_PARMSA
+TypeDef LPMCI_OVLY_SAVE_PARMS = LPMCI_OVLY_SAVE_PARMSA
+#endif
+
+Type MCI_OVLY_LOAD_PARMSW
+	dwCallback As DWord
+	lpfilename As LPWSTR
+	rc As RECT
+End Type
+TypeDef PMCI_OVLY_LOAD_PARMSW = *MCI_OVLY_LOAD_PARMSW
+TypeDef LPMCI_OVLY_LOAD_PARMSW = *MCI_OVLY_LOAD_PARMSW
 
 Type MCI_OVLY_LOAD_PARMSA
@@ -2540,7 +2611,14 @@
 TypeDef PMCI_OVLY_LOAD_PARMSA = *MCI_OVLY_LOAD_PARMSA
 TypeDef LPMCI_OVLY_LOAD_PARMSA = *MCI_OVLY_LOAD_PARMSA
+
+#ifdef UNICODE
+TypeDef MCI_OVLY_LOAD_PARMS = MCI_OVLY_LOAD_PARMSW
+TypeDef PMCI_OVLY_LOAD_PARMS = PMCI_OVLY_LOAD_PARMSW
+TypeDef LPMCI_OVLY_LOAD_PARMS = LPMCI_OVLY_LOAD_PARMSW
+#else
 TypeDef MCI_OVLY_LOAD_PARMS = MCI_OVLY_LOAD_PARMSA
 TypeDef PMCI_OVLY_LOAD_PARMS = PMCI_OVLY_LOAD_PARMSA
 TypeDef LPMCI_OVLY_LOAD_PARMS = LPMCI_OVLY_LOAD_PARMSA
+#endif
 
 ' DISPLAY Driver extensions
@@ -2550,5 +2628,5 @@
 ' DIB Driver extensions
 Const SELECTDIB = 41
-Const DIBINDEX(n) = MAKELONG(n, &H10FF)
+Const DIBINDEX(n) = MAKELONG(n,&H10FF)
 
 #endif '_INC_MMSYS
