Index: /Include/api_commctrl.sbp
===================================================================
--- /Include/api_commctrl.sbp	(revision 140)
+++ /Include/api_commctrl.sbp	(revision 141)
@@ -2,4 +2,10 @@
 #ifndef _INC_COMMCTRL
 #define _INC_COMMCTRL
+
+#ifdef UNICODE
+Const _FuncName_CreateStatusWindow = "CreateStatusWindowW"
+#else
+Const _FuncName_CreateStatusWindow = "CreateStatusWindowA"
+#endif
 
 
@@ -28,5 +34,5 @@
 	dwICC As DWord
 End Type
-Declare Function InitCommonControlsEx Lib "comctl32" (ByRef lpInitCtrls As INITCOMMONCONTROLSEX) As BOOL
+Declare Function InitCommonControlsEx Lib "comctl32" (ByRef InitCtrls As INITCOMMONCONTROLSEX) As BOOL
 
 Declare Sub InitCommonControls Lib "comctl32" ()
@@ -481,5 +487,5 @@
 Const SBN_SIMPLEMODECHANGE = 880
 
-Declare Function CreateStatusWindow Lib "comctl32" Alias "CreateStatusWindowA" (style As Long, lpszText As LPSTR, hwndParent As HWND, wID As DWord) As HWND
+Declare Function CreateStatusWindow Lib "comctl32" Alias _FuncName_CreateStatusWindow (style As Long, lpszText As LPCTSTR, hwndParent As HWND, wID As DWord) As HWND
 
 
Index: /Include/api_commdlg.sbp
===================================================================
--- /Include/api_commdlg.sbp	(revision 140)
+++ /Include/api_commdlg.sbp	(revision 141)
@@ -3,4 +3,24 @@
 #ifndef _INC_COMMDLG
 #define _INC_COMMDLG
+
+#ifdef UNICODE
+Const _FuncName_ChooseColor = "ChooseColorW"
+Const _FuncName_ChooseFont = "ChooseFontW"
+Const _FuncName_FindText = "FindTextW"
+Const _FuncName_GetOpenFileName = "GetOpenFileNameW"
+Const _FuncName_GetSaveFileName = "GetSaveFileNameW"
+Const _FuncName_GetFileTitle = "GetFileTitleW"
+Const _FuncName_PageSetupDlg = "PageSetupDlgW"
+Const _FuncName_PrintDlg = "PrintDlgW"
+#else
+Const _FuncName_ChooseColor = "ChooseColorA"
+Const _FuncName_ChooseFont = "ChooseFontA"
+Const _FuncName_FindText = "FindTextA"
+Const _FuncName_GetOpenFileName = "GetOpenFileNameA"
+Const _FuncName_GetSaveFileName = "GetSaveFileNameA"
+Const _FuncName_GetFileTitle = "GetFileTitleA"
+Const _FuncName_PageSetupDlg = "PageSetupDlgA"
+Const _FuncName_PrintDlg = "PrintDlgA"
+#endif
 
 TypeDef LPCOMMDLGHOOKPROC = *Function(hdlg As HWND, uiMsg As DWord, wp As WPARAM, lp As LPARAM) As ULONG_PTR
@@ -66,5 +86,16 @@
 Const CC_ANYCOLOR =             &H00000100
 TypeDef LPCCHOOKPROC = LPCOMMDLGHOOKPROC
-Type CHOOSECOLOR
+Type CHOOSECOLORW
+	lStructSize    As DWord
+	hwndOwner      As HWND
+	hInstance      As HINSTANCE
+	rgbResult      As DWord
+	lpCustColors   As *DWord
+	Flags          As DWord
+	lCustData      As DWord
+	lpfnHook       As LPCCHOOKPROC
+	lpTemplateName As LPCWSTR
+End Type
+Type CHOOSECOLORA
 	lStructSize    As DWord
 	hwndOwner      As HWND
@@ -77,5 +108,10 @@
 	lpTemplateName As LPCSTR
 End Type
-Declare Function ChooseColor Lib "comdlg32" Alias "ChooseColorA" (ByRef lpcc As CHOOSECOLOR) As BOOL
+#ifdef UNICODE
+TypeDef CHOOSECOLOR = CHOOSECOLORW
+#else
+TypeDef CHOOSECOLOR = CHOOSECOLORA
+#endif
+Declare Function ChooseColor Lib "comdlg32" Alias _FuncName_ChooseColor (ByRef cc As CHOOSECOLOR) As BOOL
 
 
@@ -118,9 +154,27 @@
 Const REGULAR_FONTTYPE =    &H0400
 TypeDef LPCFHOOKPROC = LPCOMMDLGHOOKPROC
-Type CHOOSEFONT
+Type CHOOSEFONTW
 	lStructSize            As DWord
 	hwndOwner              As HWND
 	hDC                    As HDC
-	lpLogFont              As *LOGFONT
+	lpLogFont              As *LOGFONTW
+	iPointSize             As Long
+	Flags                  As DWord
+	rgbColors              As DWord
+	lCustData              As LPARAM
+	lpfnHook               As LPCFHOOKPROC
+	lpTemplateName         As LPCWSTR
+	hInstance              As HINSTANCE
+	lpszStyle              As LPWSTR
+	nFontType              As Word
+	___MISSING_ALIGNMENT__ As Word
+	nSizeMin               As Long
+	nSizeMax               As Long
+End Type
+Type CHOOSEFONTA
+	lStructSize            As DWord
+	hwndOwner              As HWND
+	hDC                    As HDC
+	lpLogFont              As *LOGFONTA
 	iPointSize             As Long
 	Flags                  As DWord
@@ -136,5 +190,10 @@
 	nSizeMax               As Long
 End Type
-Declare Function ChooseFont Lib "comdlg32" Alias "ChooseFontA" (ByRef lpcf As CHOOSEFONT) As BOOL
+#ifdef UNICODE
+TypeDef CHOOSEFONT = CHOOSEFONTW
+#else
+TypeDef CHOOSEFONT = CHOOSEFONTA
+#endif
+Declare Function ChooseFont Lib "comdlg32" Alias _FuncName_ChooseFont (ByRef cf As CHOOSEFONT) As BOOL
 
 
@@ -160,5 +219,18 @@
 Const FR_HIDEWHOLEWORD =              &H00010000
 TypeDef LPFRHOOKPROC = LPCOMMDLGHOOKPROC
-Type FINDREPLACE
+Type FINDREPLACEW
+	lStructSize      As DWord
+	hwndOwner        As HWND
+	hInstance        As HINSTANCE
+	Flags            As DWord
+	lpstrFindWhat    As LPWSTR
+	lpstrReplaceWith As LPWSTR
+	wFindWhatLen     As Word
+	wReplaceWithLen  As Word
+	lCustData        As LPARAM
+	lpfnHook         As LPFRHOOKPROC
+	lpTemplateName   As LPCWSTR
+End Type
+Type FINDREPLACEA
 	lStructSize      As DWord
 	hwndOwner        As HWND
@@ -173,5 +245,10 @@
 	lpTemplateName   As LPCSTR
 End Type
-Declare Function FindText Lib "comdlg32" Alias "FindTextA" (ByRef lpfr As FINDREPLACE) As BOOL
+#ifdef UNICODE
+TypeDef FINDREPLACE = FINDREPLACEW
+#else
+TypeDef FINDREPLACE = FINDREPLACEA
+#endif
+Declare Function FindText Lib "comdlg32" Alias _FuncName_FindText (ByRef fr As FINDREPLACE) As BOOL
 
 
@@ -204,5 +281,27 @@
 Const OFN_ENABLESIZING =           &H00800000
 TypeDef LPOFNHOOKPROC = LPCOMMDLGHOOKPROC
-Type OPENFILENAME
+Type OPENFILENAMEW
+	lStructSize       As DWord
+	hwndOwner         As HWND
+	hInstance         As HINSTANCE
+	lpstrFilter       As LPCWSTR
+	lpstrCustomFilter As LPWSTR
+	nMaxCustFilter    As DWord
+	nFilterIndex      As DWord
+	lpstrFile         As LPWSTR
+	nMaxFile          As DWord
+	lpstrFileTitle    As LPWSTR
+	nMaxFileTitle     As DWord
+	lpstrInitialDir   As LPCWSTR
+	lpstrTitle        As LPCWSTR
+	Flags             As DWord
+	nFileOffset       As Word
+	nFileExtension    As Word
+	lpstrDefExt       As LPCWSTR
+	lCustData         As LPARAM
+	lpfnHook          As LPOFNHOOKPROC
+	lpTemplateName    As LPCWSTR
+End Type
+Type OPENFILENAMEA
 	lStructSize       As DWord
 	hwndOwner         As HWND
@@ -226,7 +325,12 @@
 	lpTemplateName    As LPCSTR
 End Type
-Declare Function GetOpenFileName Lib "comdlg32" Alias "GetOpenFileNameA" (ByRef lpofn As OPENFILENAME) As BOOL
-Declare Function GetSaveFileName Lib "comdlg32" Alias "GetSaveFileNameA" (ByRef lpofn As OPENFILENAME) As BOOL
-Declare Function GetFileTitle Lib "comdlg32" Alias "GetFileTitleA" (lpszFile As LPCSTR, lpszTitle As LPSTR, cbBuf As Word) As Integer
+#ifdef UNICODE
+TypeDef OPENFILENAME = OPENFILENAMEW
+#else
+TypeDef OPENFILENAME = OPENFILENAMEA
+#endif
+Declare Function GetOpenFileName Lib "comdlg32" Alias _FuncName_GetOpenFileName (ByRef ofn As OPENFILENAME) As BOOL
+Declare Function GetSaveFileName Lib "comdlg32" Alias _FuncName_GetSaveFileName (ByRef ofn As OPENFILENAME) As BOOL
+Declare Function GetFileTitle Lib "comdlg32" Alias _FuncName_GetFileTitle (lpszFile As LPCTSTR, lpszTitle As LPTSTR, cbBuf As Word) As Integer
 
 
@@ -255,5 +359,21 @@
 TypeDef LPPAGESETUPHOOK = LPCOMMDLGHOOKPROC
 TypeDef LPPAGEPAINTHOOK = LPCOMMDLGHOOKPROC
-Type PAGESETUPDLG 
+Type PAGESETUPDLGW
+	lStructSize             As DWord
+	hwndOwner               As HWND
+	hDevMode                As HGLOBAL
+	hDevNames               As HGLOBAL
+	Flags                   As DWord
+	ptPaperSize             As POINTAPI
+	rtMinMargin             As RECT
+	rtMargin                As RECT
+	hInstance               As HINSTANCE
+	lCustData               As LPARAM
+	lpfnPageSetupHook       As LPPAGESETUPHOOK
+	lpfnPagePaintHook       As LPPAGEPAINTHOOK
+	lpPageSetupTemplateName As LPCWSTR
+	hPageSetupTemplate      As HGLOBAL
+End Type
+Type PAGESETUPDLGA
 	lStructSize             As DWord
 	hwndOwner               As HWND
@@ -271,5 +391,11 @@
 	hPageSetupTemplate      As HGLOBAL
 End Type
-Declare Function PageSetupDlg Lib "comdlg32" Alias "PageSetupDlgA" (ByRef lppsd As PAGESETUPDLG) As BOOL
+#ifdef UNICODE
+TypeDef PAGESETUPDLG = PAGESETUPDLGW
+#else
+TypeDef PAGESETUPDLG = PAGESETUPDLGA
+#endif
+
+Declare Function PageSetupDlg Lib "comdlg32" Alias _FuncName_PageSetupDlg (ByRef psd As PAGESETUPDLG) As BOOL
 
 
@@ -304,7 +430,32 @@
 TypeDef LPSETUPHOOKPROC = LPCOMMDLGHOOKPROC
 #ifdef _WIN64
-Type PRINTDLG
-#else
-Type Align(1) PRINTDLG
+Type PRINTDLGW
+#else
+Type Align(1) PRINTDLGW
+#endif
+	lStructSize         As DWord
+	hwndOwner           As HWND
+	hDevMode            As HGLOBAL
+	hDevNames           As HGLOBAL
+	hDC                 As HDC
+	Flags               As DWord
+	nFromPage           As Word
+	nToPage             As Word
+	nMinPage            As Word
+	nMaxPage            As Word
+	nCopies             As Word
+	hInstance           As HINSTANCE
+	lCustData           As LPARAM
+	lpfnPrintHook       As LPPAGEPAINTHOOK
+	lpfnSetupHook       As LPSETUPHOOKPROC
+	lpPrintTemplateName As LPCWSTR
+	lpSetupTemplateName As LPCWSTR
+	hPrintTemplate      As HGLOBAL
+	hSetupTemplate      As HGLOBAL
+End Type
+#ifdef _WIN64
+Type PRINTDLGA
+#else
+Type Align(1) PRINTDLGA
 #endif
 	lStructSize         As DWord
@@ -328,5 +479,10 @@
 	hSetupTemplate      As HGLOBAL
 End Type
-Declare Function PrintDlg Lib "comdlg32" Alias "PrintDlgA" (ByRef lppd As PRINTDLG) As BOOL
+#ifdef UNICODE
+TypeDef PRINTDLG = PRINTDLGW
+#else
+TypeDef PRINTDLG = PRINTDLGA
+#endif
+Declare Function PrintDlg Lib "comdlg32" Alias _FuncName_PrintDlg (ByRef pd As PRINTDLG) As BOOL
 
 
Index: /Include/api_console.sbp
===================================================================
--- /Include/api_console.sbp	(revision 140)
+++ /Include/api_console.sbp	(revision 141)
@@ -98,5 +98,5 @@
 Type CHAR_INFO
 '	Union Char
-'		UnicodeChar As Word
+'		UnicodeChar As WCHAR
 		AsciiChar[1] As SByte
 '	End Union
Index: /Include/api_gdi.sbp
===================================================================
--- /Include/api_gdi.sbp	(revision 140)
+++ /Include/api_gdi.sbp	(revision 141)
@@ -6,7 +6,35 @@
 
 #ifdef UNICODE
+Const _FuncName_CopyEnhMetaFile = "CopyEnhMetaFileW"
+Const _FuncName_CopyMetaFile = "CopyMetaFileW"
+Const _FuncName_CreateDC = "CreateDCW"
+Const _FuncName_CreateEnhMetaFile = "CreateEnhMetaFileW"
+Const _FuncName_CreateMetaFile = "CreateMetaFileW"
+Const _FuncName_CreateFont = "CreateFontW"
 Const _FuncName_CreateFontIndirect = "CreateFontIndirectW"
+Const _FuncName_GetEnhMetaFile = "GetEnhMetaFileW"
+Const _FuncName_GetEnhMetaFileDescription = "GetEnhMetaFileDescriptionW"
+Const _FuncName_GetObject = "GetObjectW"
+Const _FuncName_GetTextMetrics = "GetTextMetricsW"
+Const _FuncName_ResetDC = "ResetDCW"
+Const _FuncName_StartDoc = "StartDocW"
+Const _FuncName_wglUseFontBitmaps = "wglUseFontBitmapsW"
+Const _FuncName_wglUseFontOutlines = "wglUseFontOutlinesW"
 #else
+Const _FuncName_CopyEnhMetaFile = "CopyEnhMetaFileA"
+Const _FuncName_CopyMetaFile = "CopyMetaFileA"
+Const _FuncName_CreateDC = "CreateDCA"
+Const _FuncName_CreateEnhMetaFile = "CreateEnhMetaFileA"
+Const _FuncName_CreateMetaFile = "CreateMetaFileA"
+Const _FuncName_CreateFont = "CreateFontA"
 Const _FuncName_CreateFontIndirect = "CreateFontIndirectA"
+Const _FuncName_GetEnhMetaFile = "GetEnhMetaFileA"
+Const _FuncName_GetEnhMetaFileDescription = "GetEnhMetaFileDescriptionA"
+Const _FuncName_GetObject = "GetObjectA"
+Const _FuncName_GetTextMetrics = "GetTextMetricsA"
+Const _FuncName_ResetDC = "ResetDCA"
+Const _FuncName_StartDoc = "StartDocA"
+Const _FuncName_wglUseFontBitmaps = "wglUseFontBitmapsA"
+Const _FuncName_wglUseFontOutlines = "wglUseFontOutlinesA"
 #endif
 
@@ -402,6 +430,6 @@
 Const CCHDEVICENAME = 32
 Const CCHFORMNAME = 32
-Type _devicemodeA
-	dmDeviceName[ELM(CCHDEVICENAME)] As Byte
+Type DEVMODEW
+	dmDeviceName[ELM(CCHDEVICENAME)] As WCHAR
 	dmSpecVersion As Word
 	dmDriverVersion As Word
@@ -422,5 +450,5 @@
 	dmTTOption As Integer
 	dmCollate As Integer
-	dmFormName[ELM(CCHFORMNAME)] As Byte
+	dmFormName[ELM(CCHFORMNAME)] As WCHAR
 	dmLogPixels As Word
 	dmBitsPerPel As DWord
@@ -438,7 +466,45 @@
 	dmPanningHeight As DWord
 End Type
-TypeDef DEVMODEA = _devicemodeA
+Type DEVMODEA
+	dmDeviceName[ELM(CCHDEVICENAME)] As SByte
+	dmSpecVersion As Word
+	dmDriverVersion As Word
+	dmSize As Word
+	dmDriverExtra As Word
+	dmFields As DWord
+	dmOrientation As Integer
+	dmPaperSize As Integer
+	dmPaperLength As Integer
+	dmPaperWidth As Integer
+	dmScale As Integer
+	dmCopies As Integer
+	dmDefaultSource As Integer
+	dmPrintQuality As Integer
+	dmColor As Integer
+	dmDuplex As Integer
+	dmYResolution As Integer
+	dmTTOption As Integer
+	dmCollate As Integer
+	dmFormName[ELM(CCHFORMNAME)] As SByte
+	dmLogPixels As Word
+	dmBitsPerPel As DWord
+	dmPelsWidth As DWord
+	dmPelsHeight As DWord
+	dmDisplayFlags As DWord
+	dmDisplayFrequency As DWord
+	dmICMMethod As DWord
+	dmICMIntent As DWord
+	dmMediaType As DWord
+	dmDitherType As DWord
+	dmReserved1 As DWord
+	dmReserved2 As DWord
+	dmPanningWidth As DWord
+	dmPanningHeight As DWord
+End Type
+#ifdef UNICODE
+TypeDef DEVMODE = DEVMODEW
+#else
 TypeDef DEVMODE = DEVMODEA
-
+#endif
 
 ' Binary raster ops
@@ -480,5 +546,12 @@
 End Type
 
-Type DOCINFO
+Type DOCINFOW
+	cbSize As Long
+	lpszDocName As LPCWSTR
+	lpszOutput As LPCWSTR
+	lpszDatatype As LPCWSTR
+	fwType As DWord
+End Type
+Type DOCINFOA
 	cbSize As Long
 	lpszDocName As LPCSTR
@@ -487,4 +560,9 @@
 	fwType As DWord
 End Type
+#ifdef UNICODE
+TypeDef DOCINFO = DOCINFOW
+#else
+TypeDef DOCINFO = DOCINFOA
+#endif
 
 '-------------------
@@ -508,8 +586,8 @@
 Const RGN_COPY = 5
 Declare Function CombineRgn Lib "gdi32" (hrgnDest As HRGN, hrgnSrc1 As HRGN, hrgnSrc2 As HRGN, fnCombineMode As Long) As Long
-Declare Function CopyEnhMetaFile Lib "gdi32" Alias "CopyEnhMetaFileA" (hemfSrc As HENHMETAFILE, pszFile As PCSTR) As HENHMETAFILE
-Declare Function CopyMetaFile Lib "gdi32" Alias "CopyMetaFileA" (hmfSrc As HMETAFILE, pszFile As PCSTR) As HMETAFILE
+Declare Function CopyEnhMetaFile Lib "gdi32" Alias _FuncName_CopyEnhMetaFile (hemfSrc As HENHMETAFILE, pszFile As PCTSTR) As HENHMETAFILE
+Declare Function CopyMetaFile Lib "gdi32" Alias _FuncName_CopyMetaFile (hmfSrc As HMETAFILE, pszFile As PCTSTR) As HMETAFILE
 Declare Function CreateBitmap Lib "gdi32" (nWidth As Long, nHeight As Long, cPlanes As Long, cBitsPerPel As Long, lpvBits As VoidPtr) As HBITMAP
-Declare Function CreateBitmapIndirect Lib "gdi32" (ByRef lpbm As BITMAP) As HBITMAP
+Declare Function CreateBitmapIndirect Lib "gdi32" (ByRef bm As BITMAP) As HBITMAP
 
 Const BS_SOLID =          0
@@ -541,8 +619,8 @@
 Declare Function CreateCompatibleBitmap Lib "gdi32" (hdc As HDC, nWidth As Long, nHeight As Long) As HBITMAP
 Declare Function CreateCompatibleDC Lib "gdi32" (hdc As HDC) As HDC
-Declare Function CreateDC Lib "gdi32" Alias "CreateDCA" (lpszDriver As PCSTR, lpszDevice As PCSTR, lpszOutput As PCSTR, ByRef lpInitData As DEVMODE) As HDC
+Declare Function CreateDC Lib "gdi32" Alias _FuncName_CreateDC (pszDriver As PCTSTR, pszDevice As PCTSTR, pszOutput As PCTSTR, ByRef InitData As DEVMODE) As HDC
 
 Const CBM_INIT = &H04
-Declare Function CreateDIBitmap Lib "gdi32" (hdc As HDC, ByRef lpbmih As BITMAPINFOHEADER, fdwInit As Long, lpbInit As VoidPtr, ByRef lpbmi As BITMAPINFO, fuUsage As Long) As HBITMAP
+Declare Function CreateDIBitmap Lib "gdi32" (hdc As HDC, ByRef bmih As BITMAPINFOHEADER, fdwInit As Long, lpbInit As VoidPtr, ByRef bmi As BITMAPINFO, fuUsage As Long) As HBITMAP
 
 Declare Function CreateDIBPatternBrushPt Lib "gdi32" (lpPackedDIB As VoidPtr, iUsage As Long) As HBRUSH
@@ -550,6 +628,6 @@
 Declare Function CreateEllipticRgn Lib "gdi32" (nLeftRect As Long, nTopRect As Long, nRightRect As Long, nBottomRect As Long) As HRGN
 Declare Function CreateEllipticRgnIndirect Lib "gdi32" (ByRef lpRect As RECT) As HRGN
-Declare Function CreateEnhMetaFile Lib "gdi32" Alias "CreateEnhMetaFileA" (hdcRef As HDC, pFileName As PCTSTR, ByRef Rect As RECT, pDescription As PCTSTR) As HDC 
-Declare Function CreateMetaFile Lib "gdi32" Alias "CreateMetaFileA" (pFileName As PCTSTR) As HDC 
+Declare Function CreateEnhMetaFile Lib "gdi32" Alias _FuncName_CreateEnhMetaFile (hdcRef As HDC, pFileName As PCTSTR, ByRef Rect As RECT, pDescription As PCTSTR) As HDC
+Declare Function CreateMetaFile Lib "gdi32" Alias _FuncName_CreateMetaFile (pFileName As PCTSTR) As HDC
 
 Const FW_DONTCARE =       0
@@ -625,5 +703,5 @@
 Const FF_SCRIPT =         &H00040000
 Const FF_DECORATIVE =     &H00050000
-Declare Function CreateFont Lib "gdi32" Alias "CreateFontA" (nHeight As Long, nWidth As Long, nEscapement As Long, nOrientation As Long, fnWeight As Long, fdwItalic As DWord, fdwUnderline As DWord, fdwStrikeOut As DWord, fdwCharSet As DWord, fdwOutputPrecision As DWord, fdwClipPrecision As DWord, fdwQuality As DWord, fdwPitchAndFamily As DWord, lpszFace As PCSTR) As HFONT
+Declare Function CreateFont Lib "gdi32" Alias _FuncName_CreateFont (nHeight As Long, nWidth As Long, nEscapement As Long, nOrientation As Long, fnWeight As Long, fdwItalic As DWord, fdwUnderline As DWord, fdwStrikeOut As DWord, fdwCharSet As DWord, fdwOutputPrecision As DWord, fdwClipPrecision As DWord, fdwQuality As DWord, fdwPitchAndFamily As DWord, lpszFace As PCTSTR) As HFONT
 
 Const LF_FACESIZE = 32
@@ -642,5 +720,5 @@
 	lfQuality As Byte
 	lfPitchAndFamily As Byte
-	lfFaceName[ELM(LF_FACESIZE)] As Byte
+	lfFaceName[ELM(LF_FACESIZE)] As SByte
 End Type
 Type LOGFONTW
@@ -726,7 +804,7 @@
 Declare Function ExtTextOutW Lib "gdi32" (hdc As HDC, x As Long, y As Long, fuOptions As DWord, ByRef rc As RECT, lpString As PCWSTR, cbCount As Long, pDx As *Long) As Long
 #ifdef UNICODE
-Declare Function ExtTextOut Lib "gdi32" Alias "ExtTextOutW" (hdc As HDC, x As Long, y As Long, fuOptions As DWord, ByRef rc As RECT, lpString As PCTSTR, cbCount As Long, pDx As *Long) As Long
+Declare Function ExtTextOut Lib "gdi32" Alias "ExtTextOutW" (hdc As HDC, x As Long, y As Long, fuOptions As DWord, ByRef rc As RECT, pString As PCWSTR, cbCount As Long, pDx As *Long) As Long
 #else
-Declare Function ExtTextOut Lib "gdi32" Alias "ExtTextOutA" (hdc As HDC, x As Long, y As Long, fuOptions As DWord, ByRef rc As RECT, lpString As PCTSTR, cbCount As Long, pDx As *Long) As Long
+Declare Function ExtTextOut Lib "gdi32" Alias "ExtTextOutA" (hdc As HDC, x As Long, y As Long, fuOptions As DWord, ByRef rc As RECT, pString As PCSTR, cbCount As Long, pDx As *Long) As Long
 #endif
 Declare Function FillPath Lib "gdi32" (hdc As HDC) As Long
@@ -738,9 +816,10 @@
 Declare Function GetBkMode Lib "gdi32" (hdc As HDC) As Long
 Declare Function GetBrushOrgEx Lib "gdi32" (hdc As HDC, ByRef lppt As POINTAPI) As Long
-Declare Function GetCharWidth32 Lib "gdi32" Alias "GetCharWidth32A" (hdc As HDC, iFirstChar As Long, iLastChar As Long, lpBuffer As DWordPtr) As Long
+' only WinNT
+'Declare Function GetCharWidth32 Lib "gdi32" Alias "GetCharWidth32A" (hdc As HDC, iFirstChar As DWord, iLastChar As DWord, pBuffer As *DWord) As Long
 Declare Function GetClipBox Lib "gdi32" (hdc As HDC, ByRef lpRect As RECT) As Long
 Declare Function GetClipRgn Lib "gdi32" (hdc As HDC, hRgn As HRGN) As Long
 Declare Function GetCurrentObject Lib "gdi32" (hdc As HDC, dwObjectType As DWord) As HANDLE
-Declare Function GetCurrentPositionEx Lib "gdi32" (hdc As HDC, ByRef lpPoint As POINTAPI) As Long
+Declare Function GetCurrentPositionEx Lib "gdi32" (hdc As HDC, ByRef Point As POINTAPI) As Long
 
 Const DRIVERVERSION =   0
@@ -864,7 +943,7 @@
 
 Declare Function GetDIBits Lib "gdi32" (hdc As HDC, hbmp As HBITMAP, uStartScan As DWord, cScanLines As DWord, lpvBits As VoidPtr, ByRef lpbi As BITMAPINFO, uUsage As DWord) As Long
-Declare Function GetEnhMetaFile Lib "gdi32" Alias "GetEnhMetaFileA" (pszMetaFile As PCSTR) As HENHMETAFILE
+Declare Function GetEnhMetaFile Lib "gdi32" Alias _FuncName_GetEnhMetaFile (pszMetaFile As PCTSTR) As HENHMETAFILE
 Declare Function GetEnhMetaFileBits Lib "gdi32" (hemf As HENHMETAFILE, cbBuffer As DWord, pbBuffer As *Byte) As DWord
-Declare Function GetEnhMetaFileDescription Lib "gdi32" Alias "GetEnhMetaFileDescriptionA" (hemf As HENHMETAFILE, cbBuffer As DWord, pszDescription As PTSTR) As DWord
+Declare Function GetEnhMetaFileDescription Lib "gdi32" Alias _FuncName_GetEnhMetaFileDescription (hemf As HENHMETAFILE, cbBuffer As DWord, pszDescription As PTSTR) As DWord
 Declare Function GetEnhMetaFileHeader Lib "gdi32" (hemf As HENHMETAFILE, cbBuffer As DWord, ByRef emh As ENHMETAHEADER) As DWord
 Declare Function GetEnhMetaFilePaletteEntries Lib "gdi32" (hemf As HENHMETAFILE, cEntries As DWord, ByRef pe As PALETTEENTRY) As DWord
@@ -881,5 +960,5 @@
 Declare Function GetMetaFileBitsEx Lib "gdi32" (hmf As HMETAFILE, nSize As DWord, pvData As VoidPtr) As DWord
 Declare Function GetMiterLimit Lib "gdi32" (hdc As HDC, peLimit As SinglePtr) As Long
-Declare Function GetObject Lib "gdi32" Alias "GetObjectA" (hgdiobj As HANDLE, cbBuffer As Long, ByRef lpvObject As Any) As Long
+Declare Function GetObject Lib "gdi32" Alias _FuncName_GetObject (hgdiobj As HANDLE, cbBuffer As Long, ByRef pvObject As Any) As Long
 Declare Function GetObjectType Lib "gdi32" (hObject As HANDLE) As Long
 
@@ -931,7 +1010,7 @@
 Declare Function GetTextExtentPoint32W Lib "gdi32" (hdc As HDC, pString As PCWSTR, cbString As Long, ByRef Size As SIZE) As Long
 #ifdef UNICODE
-Declare Function GetTextExtentPoint32 Lib "gdi32" Alias "GetTextExtentPoint32W" (hdc As HDC, pString As PCTSTR, cbString As Long, ByRef Size As SIZE) As Long
+Declare Function GetTextExtentPoint32 Lib "gdi32" Alias "GetTextExtentPoint32W" (hdc As HDC, pString As PCWSTR, cbString As Long, ByRef Size As SIZE) As Long
 #else
-Declare Function GetTextExtentPoint32 Lib "gdi32" Alias "GetTextExtentPoint32A" (hdc As HDC, pString As PCTSTR, cbString As Long, ByRef Size As SIZE) As Long
+Declare Function GetTextExtentPoint32 Lib "gdi32" Alias "GetTextExtentPoint32A" (hdc As HDC, pString As PCSTR, cbString As Long, ByRef Size As SIZE) As Long
 #endif
 
@@ -940,5 +1019,5 @@
 Const TMPF_DEVICE =      &H08
 Const TMPF_TRUETYPE =    &H04
-Type TEXTMETRIC
+Type TEXTMETRICW
 	tmHeight As Long
 	tmAscent As Long
@@ -952,8 +1031,8 @@
 	tmDigitizedAspectX As Long
 	tmDigitizedAspectY As Long
-	tmFirstChar As Byte
-	tmLastChar As Byte
-	tmDefaultChar As Byte
-	tmBreakChar As Byte
+	tmFirstChar As WCHAR
+	tmLastChar As WCHAR
+	tmDefaultChar As WCHAR
+	tmBreakChar As WCHAR
 	tmItalic As Byte
 	tmUnderlined As Byte
@@ -962,5 +1041,32 @@
 	tmCharSet As Byte
 End Type
-Declare Function GetTextMetrics Lib "gdi32" Alias "GetTextMetricsA" (hdc As HDC, ByRef lptm As TEXTMETRIC) As Long
+Type TEXTMETRICA
+	tmHeight As Long
+	tmAscent As Long
+	tmDescent As Long
+	tmInternalLeading As Long
+	tmExternalLeading As Long
+	tmAveCharWidth As Long
+	tmMaxCharWidth As Long
+	tmWeight As Long
+	tmOverhang As Long
+	tmDigitizedAspectX As Long
+	tmDigitizedAspectY As Long
+	tmFirstChar As SByte
+	tmLastChar As SByte
+	tmDefaultChar As SByte
+	tmBreakChar As SByte
+	tmItalic As Byte
+	tmUnderlined As Byte
+	tmStruckOut As Byte
+	tmPitchAndFamily As Byte
+	tmCharSet As Byte
+End Type
+#ifdef UNICODE
+TypeDef TEXTMETRIC = TEXTMETRICW
+#else
+TypeDef TEXTMETRIC = TEXTMETRICA
+#endif
+Declare Function GetTextMetrics Lib "gdi32" Alias _FuncName_GetTextMetrics (hdc As HDC, ByRef tm As TEXTMETRIC) As Long
 
 Declare Function GetViewportExtEx Lib "gdi32" (hdc As HDC, ByRef lpSize As SIZE) As Long
@@ -998,5 +1104,5 @@
 Declare Function RectInRegion Lib "gdi32" (hRgn As HRGN, ByRef lpRect As RECT) As Long
 Declare Function RectVisible Lib "gdi32" (hdc As HDC, ByRef lpRect As RECT) As Long
-Declare Function ResetDC Lib "gdi32" Alias "ResetDCA" (hdc As HDC, ByRef lpInitData As DEVMODE) As HDC
+Declare Function ResetDC Lib "gdi32" Alias _FuncName_ResetDC (hdc As HDC, ByRef InitData As DEVMODE) As HDC
 Declare Function RestoreDC Lib "gdi32" (hdc As HDC, nSavedDC As Long) As Long
 Declare Function RoundRect Lib "gdi32" (hdc As HDC, nLeftRect As Long, nTopRect As Long, nRightRect As Long, nBottomRect As Long, nWidth As Long, nHeight As Long) As Long
@@ -1042,5 +1148,5 @@
 Declare Function SetWindowOrgEx Lib "gdi32" (hdc As HDC, x As Long, y As Long, ByRef lpPoint As POINTAPI) As Long
 Declare Function SetWinMetaFileBits Lib "gdi32" (cbBuffer As DWord, pbBuffer As *Byte, hdcRef As HDC, ByRef mfp As METAFILEPICT) As HENHMETAFILE
-Declare Function StartDoc Lib "gdi32" Alias "StartDocA" (hdc As HDC, ByRef ref_di As DOCINFO) As Long
+Declare Function StartDoc Lib "gdi32" Alias _FuncName_StartDoc (hdc As HDC, ByRef di As DOCINFO) As Long
 Declare Function StartPage Lib "gdi32" (hdc As HDC) As Long
 Declare Function StretchBlt Lib "gdi32" (hdcDest As HDC, nXOriginDest As Long, nYOriginDest As Long, nWidthDest As Long, nHeightDest As Long, hdcSrc As HDC, nXOriginSrc As Long, nYOriginSrc As Long, nWidthSrc As Long, nHeightSrc As Long, dwRop As DWord) As Long
@@ -1051,7 +1157,7 @@
 Declare Function TextOutW Lib "gdi32" (hdc As HDC, nXStart As Long, nYStart As Long, pString As PCWSTR, cbString As Long) As Long
 #ifdef UNICODE
-Declare Function TextOut Lib "gdi32" Alias "TextOutW" (hdc As HDC, nXStart As Long, nYStart As Long, pString As PCTSTR, cbString As Long) As Long
+Declare Function TextOut Lib "gdi32" Alias "TextOutW" (hdc As HDC, nXStart As Long, nYStart As Long, pString As PCWSTR, cbString As Long) As Long
 #else
-Declare Function TextOut Lib "gdi32" Alias "TextOutA" (hdc As HDC, nXStart As Long, nYStart As Long, pString As PCTSTR, cbString As Long) As Long
+Declare Function TextOut Lib "gdi32" Alias "TextOutA" (hdc As HDC, nXStart As Long, nYStart As Long, pString As PCSTR, cbString As Long) As Long
 #endif
 
@@ -1133,5 +1239,5 @@
 Declare Function wglMakeCurrent Lib "opengl32" (hdc As HDC, hglrc As HGLRC) As BOOL
 Declare Function wglShareLists Lib "opengl32" (hglrc1 As HGLRC, hglrc2 As HGLRC) As BOOL
-Declare Function wglUseFontBitmaps Lib "opengl32" Alias "wglUseFontBitmapsA" (hdc As HDC, first As DWord, count As DWord, listbase As DWord) As BOOL
+Declare Function wglUseFontBitmaps Lib "opengl32" Alias _FuncName_wglUseFontBitmaps (hdc As HDC, first As DWord, count As DWord, listbase As DWord) As BOOL
 Declare Function SwapBuffers Lib "gdi32" (hdc As HDC) As BOOL
 
@@ -1155,5 +1261,5 @@
 Const WGL_FONT_POLYGONS = 1
 
-Declare Function wglUseFontOutlines Lib "opengl32" Alias "wglUseFontOutlinesA" (hdc As HDC, first As DWord, count As DWord, listbase As DWord, deviation As Single, extrusion As Single, format As Long, ByRef lpgmf As GLYPHMETRICSFLOAT) As BOOL
+Declare Function wglUseFontOutlines Lib "opengl32" Alias _FuncName_wglUseFontOutlines (hdc As HDC, first As DWord, count As DWord, listbase As DWord, deviation As Single, extrusion As Single, format As Long, ByRef lpgmf As GLYPHMETRICSFLOAT) As BOOL
 
 Type LAYERPLANEDESCRIPTOR
Index: /Include/api_mmsys.sbp
===================================================================
--- /Include/api_mmsys.sbp	(revision 140)
+++ /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
Index: /Include/api_msg.sbp
===================================================================
--- /Include/api_msg.sbp	(revision 140)
+++ /Include/api_msg.sbp	(revision 141)
@@ -612,5 +612,5 @@
 	PowerSetting As GUID
 	DataLength As DWord
-	Data[1] As Byte
+	Data[ELM(1)] As Byte
 End Type
 '#endif
Index: /Include/api_psapi.sbp
===================================================================
--- /Include/api_psapi.sbp	(revision 140)
+++ /Include/api_psapi.sbp	(revision 141)
@@ -1,9 +1,29 @@
+' api_psapi.sbp
+
 #ifndef _INC_PSAPI_
 #define _INC_PSAPI_
 
+#ifdef UNICODE
+Const _FuncName_GetModuleBaseName = "GetModuleBaseNameW"
+Const _FuncName_GetModuleFileNameEx = "GetModuleFileNameExW"
+Const _FuncName_GetMappedFileName = "GetMappedFileNameW"
+Const _FuncName_GetDeviceDriverBaseName = "GetDeviceDriverBaseNameW"
+Const _FuncName_GetDeviceDriverFileName = "GetDeviceDriverFileNameW"
+Const _FuncName_GetProcessImageFileName = "GetProcessImageFileNameW"
+Const _FuncName_EnumPageFiles = "EnumPageFilesW"
+#else
+Const _FuncName_GetModuleBaseName = "GetModuleBaseNameA"
+Const _FuncName_GetModuleFileNameEx = "GetModuleFileNameExA"
+Const _FuncName_GetMappedFileName = "GetMappedFileNameA"
+Const _FuncName_GetDeviceDriverBaseName = "GetDeviceDriverBaseNameA"
+Const _FuncName_GetDeviceDriverFileName = "GetDeviceDriverFileNameA"
+Const _FuncName_GetProcessImageFileName = "GetProcessImageFileNameA"
+Const _FuncName_EnumPageFiles = "EnumPageFilesA"
+#endif
+
 Declare Function EnumProcesses Lib "psapi" (lpidProcess As *DWord, cb As DWord, ByRef cbNeeded As DWord) As BOOL
 Declare Function EnumProcessModules Lib "psapi" (hProcess As HANDLE, lphModule As *HANDLE, cb As DWord, ByRef lpcbNeeded As DWord) As BOOL
-Declare Function GetModuleBaseName Lib "psapi" Alias "GetModuleBaseNameA" (hProcess As HANDLE, hModule As HANDLE, lpBaseName As LPSTR, nSize As DWord) As DWORD
-Declare Function GetModuleFileNameEx Lib "psapi" Alias "GetModuleFileNameExA" (hProcess As HANDLE, hModule As HANDLE, lpFilename As LPSTR, nSize As DWord) As DWORD
+Declare Function GetModuleBaseName Lib "psapi" Alias _FuncName_GetModuleBaseName (hProcess As HANDLE, hModule As HANDLE, lpBaseName As LPTSTR, nSize As DWord) As DWORD
+Declare Function GetModuleFileNameEx Lib "psapi" Alias _FuncName_GetModuleFileNameEx (hProcess As HANDLE, hModule As HANDLE, lpFilename As LPTSTR, nSize As DWord) As DWORD
 
 Type MODULEINFO
@@ -27,8 +47,8 @@
 
 Declare Function GetWsChanges Lib "psapi" (hProcess As HANDLE, lpWatchInfo As PPSAPI_WS_WATCH_INFORMATION, cb As DWord) As BOOL
-Declare Function GetMappedFileName Lib "psapi" Alias "GetMappedFileNameA" (hProcess As HANDLE, lpv As VoidPtr, lpFilename As LPSTR, nSize As DWord) As DWORD
+Declare Function GetMappedFileName Lib "psapi" Alias _FuncName_GetMappedFileName (hProcess As HANDLE, lpv As VoidPtr, lpFilename As LPTSTR, nSize As DWord) As DWORD
 Declare Function EnumDeviceDrivers Lib "psapi" (ByRef lpImageBase As VoidPtr, cb As DWord, ByRef lpcbNeeded As DWord) As BOOL
-Declare Function GetDeviceDriverBaseName Lib "psapi" Alias "GetDeviceDriverBaseNameA" (ImageBase As VoidPtr, lpBaseName As LPSTR, nSize As DWord) As DWORD
-Declare Function GetDeviceDriverFileName Lib "psapi" Alias "GetDeviceDriverFileNamA" (ImageBase As VoidPtr, lpFilename As LPSTR, nSize As DWord) As DWORD
+Declare Function GetDeviceDriverBaseName Lib "psapi" Alias _FuncName_GetDeviceDriverBaseName (ImageBase As VoidPtr, lpBaseName As LPTSTR, nSize As DWord) As DWORD
+Declare Function GetDeviceDriverFileName Lib "psapi" Alias _FuncName_GetDeviceDriverFileName (ImageBase As VoidPtr, lpFilename As LPTSTR, nSize As DWord) As DWORD
 
 ' Structure for GetProcessMemoryInfo()
@@ -100,7 +120,12 @@
 TypeDef PENUM_PAGE_FILE_CALLBACKW = *Function(pContext As VoidPtr, pPageFileInfo As PENUM_PAGE_FILE_INFORMATION, lpFilename As LPCWSTR) As BOOL
 TypeDef PENUM_PAGE_FILE_CALLBACKA = *Function(pContext As VoidPtr, pPageFileInfo As PENUM_PAGE_FILE_INFORMATION, lpFilename As LPCSTR) As BOOL
+#ifdef UNICODE
+TypeDef PENUM_PAGE_FILE_CALLBACK = PENUM_PAGE_FILE_CALLBACKW
+#else
+TypeDef PENUM_PAGE_FILE_CALLBACK = PENUM_PAGE_FILE_CALLBACKA
+#endif
 
-Declare Function EnumPageFiles Lib "psapi" Alias "EnumPageFilesA" (pCallBackRoutine As PENUM_PAGE_FILE_CALLBACKA, pContext As VoidPtr) As BOOL
-Declare Function GetProcessImageFileName Lib "psapi" Alias "GetProcessImageFileNameA" (hProcess As HANDLE, lpImageFileName As LPSTR, nSize As DWord) As DWORD
+Declare Function EnumPageFiles Lib "psapi" Alias _FuncName_EnumPageFiles (pCallBackRoutine As PENUM_PAGE_FILE_CALLBACK, pContext As VoidPtr) As BOOL
+Declare Function GetProcessImageFileName Lib "psapi" Alias _FuncName_GetProcessImageFileName (hProcess As HANDLE, lpImageFileName As LPTSTR, nSize As DWord) As DWORD
 
 #endif '_INC_PSAPI
Index: /Include/api_reg.sbp
===================================================================
--- /Include/api_reg.sbp	(revision 140)
+++ /Include/api_reg.sbp	(revision 141)
@@ -5,4 +5,36 @@
 #ifndef _INC_REG
 #define _INC_REG
+
+#ifdef UNICODE
+Const _FuncName_RegConnectRegistry = "RegConnectRegistryW"
+Const _FuncName_RegCreateKeyEx = "RegCreateKeyExW"
+Const _FuncName_RegDeleteKey = "RegDeleteKeyW"
+Const _FuncName_RegDeleteValue = "RegDeleteValueW"
+Const _FuncName_RegEnumKeyEx = "RegEnumKeyExW"
+Const _FuncName_RegEnumValue = "RegEnumValueW"
+Const _FuncName_RegLoadKey = "RegLoadKeyW"
+Const _FuncName_RegOpenKeyEx = "RegOpenKeyExW"
+Const _FuncName_RegQueryInfoKey = "RegQueryInfoKeyW"
+Const _FuncName_RegQueryMultipleValues = "RegQueryMultipleValuesW"
+Const _FuncName_RegQueryValueEx = "RegQueryValueExW"
+Const _FuncName_RegSaveKey = "RegSaveKeyW"
+Const _FuncName_RegSetValueEx = "RegSetValueExW"
+Const _FuncName_RegUnLoadKey = "RegUnLoadKeyW"
+#else
+Const _FuncName_RegConnectRegistry = "RegConnectRegistryA"
+Const _FuncName_RegCreateKeyEx = "RegCreateKeyExA"
+Const _FuncName_RegDeleteKey = "RegDeleteKeyA"
+Const _FuncName_RegDeleteValue = "RegDeleteValueA"
+Const _FuncName_RegEnumKeyEx = "RegEnumKeyExA"
+Const _FuncName_RegEnumValue = "RegEnumValueA"
+Const _FuncName_RegLoadKey = "RegLoadKeyA"
+Const _FuncName_RegOpenKeyEx = "RegOpenKeyExA"
+Const _FuncName_RegQueryInfoKey = "RegQueryInfoKeyA"
+Const _FuncName_RegQueryMultipleValues = "RegQueryMultipleValuesA"
+Const _FuncName_RegQueryValueEx = "RegQueryValueExA"
+Const _FuncName_RegSaveKey = "RegSaveKeyA"
+Const _FuncName_RegSetValueEx = "RegSetValueExA"
+Const _FuncName_RegUnLoadKey = "RegUnLoadKeyA"
+#endif
 
 
@@ -57,4 +89,22 @@
 Const REG_RESOURCE_LIST =       8
 
+Type VALENTW
+	ve_valuename As PWSTR
+	ve_valuelen As DWord
+	ve_valueptr As ULONG_PTR
+	ve_type As DWord
+End Type
+Type VALENTA
+	ve_valuename As PSTR
+	ve_valuelen As DWord
+	ve_valueptr As ULONG_PTR
+	ve_type As DWord
+End Type
+
+#ifdef UNICODE
+TypeDef VALENT = VALENTW
+#else
+TypeDef VALENT = VALENTA
+#endif
 
 '------------------------
@@ -62,25 +112,20 @@
 
 Declare Function RegCloseKey Lib "advapi32" (hKey As HKEY) As Long
-Declare Function RegConnectRegistry Lib "advapi32" Alias "RegConnectRegistryA" (pMachineName As PCSTR, hKey As HKEY, ByRef hkResult As HKEY) As Long
-Declare Function RegCreateKeyEx Lib "advapi32" Alias "RegCreateKeyExA" (hKey As HKEY, lpSubKey As PCSTR, Reserved As DWord, lpClass As PSTR, dwOptions As DWord, samDesired As Long, ByRef lpSecurityAttributes As SECURITY_ATTRIBUTES, ByRef phkResult As HKEY, lpdwDisposition As *DWord) As Long
-Declare Function RegDeleteKey Lib "advapi32" Alias "RegDeleteKeyA" (hKey As HKEY, lpSubKey As PCSTR) As Long
-Declare Function RegDeleteValue Lib "advapi32" Alias "RegDeleteValueA" (hKey As HKEY, lpValueName As PCSTR) As Long
-Declare Function RegEnumKeyEx Lib "advapi32" Alias "RegEnumKeyExA" (hKey As HKEY, dwIndex As DWord, pName As PSTR, ByRef cName As DWord, pReserved As *DWord, pClass As PSTR, ByRef cClass As DWord, pftLastWriteTime As *FILETIME) As Long
-Declare Function RegEnumValue Lib "advapi32" Alias "RegEnumValueA" (hKey As HKEY, dwIndex As DWord, pValueName As PSTR, ByRef cValueName As DWord, pReserved As *DWord, pType As *DWord, pData As *Byte, pcbData As *DWord) As Long
+Declare Function RegConnectRegistry Lib "advapi32" Alias _FuncName_RegConnectRegistry (pMachineName As PCTSTR, hKey As HKEY, ByRef hkResult As HKEY) As Long
+Declare Function RegCreateKeyEx Lib "advapi32" Alias _FuncName_RegCreateKeyEx (hKey As HKEY, lpSubKey As PCTSTR, Reserved As DWord, lpClass As PTSTR, dwOptions As DWord, samDesired As Long, ByRef lpSecurityAttributes As SECURITY_ATTRIBUTES, ByRef phkResult As HKEY, lpdwDisposition As *DWord) As Long
+Declare Function RegDeleteKey Lib "advapi32" Alias _FuncName_RegDeleteKey (hKey As HKEY, lpSubKey As PCTSTR) As Long
+Declare Function RegDeleteValue Lib "advapi32" Alias _FuncName_RegDeleteValue (hKey As HKEY, lpValueName As PCTSTR) As Long
+Declare Function RegEnumKeyEx Lib "advapi32" Alias _FuncName_RegEnumKeyEx (hKey As HKEY, dwIndex As DWord, pName As PTSTR, ByRef cName As DWord, pReserved As *DWord, pClass As PTSTR, ByRef cClass As DWord, pftLastWriteTime As *FILETIME) As Long
+Declare Function RegEnumValue Lib "advapi32" Alias _FuncName_RegEnumValue (hKey As HKEY, dwIndex As DWord, pValueName As PTSTR, ByRef cValueName As DWord, pReserved As *DWord, pType As *DWord, pData As *Byte, pcbData As *DWord) As Long
 Declare Function RegFlushKey Lib "advapi32"(hKey As HKEY) As Long
-Declare Function RegLoadKey Lib "advapi32" Alias "RegLoadKeyA" (hKey As HKEY, pSubKey As PCSTR, pFile As PCSTR) As Long
-Declare Function RegOpenKeyEx Lib "advapi32" Alias "RegOpenKeyExA" (hKey As HKEY, lpSubKey As PCSTR, ulOptions As DWord, samDesired As Long, ByRef phkResult As HKEY) As Long
-Declare Function RegQueryInfoKey Lib "advapi32" Alias "RegQueryInfoKeyA" (hKey As HKEY, pClass As PSTR, pcClass As *DWord, pReserved As *DWord, pcSubKeys As *DWord, pcMaxSubKeyLen As *DWord, pcMaxClassLen As *DWord, pcValues As *DWord, pcMaxValueNameLen As *DWord, pcMaxValueLen As *DWord, pcbSecurityDescriptor As *DWord, pftLastWriteTime As *FILETIME) As Long
-Declare Function RegQueryMultipleValues Lib "advapi32" Alias "RegQueryMultipleValuesA" (hKey As HKEY, val_list As *VALENT, num_vals As DWord, pValueBuf As PSTR, ByRef dwTotsize As DWord) As Long
-Declare Function RegQueryValueEx Lib "advapi32" Alias "RegQueryValueExA" (hKey As HKEY, lpValueName As PCSTR, lpReserved As DWord, lpType As *DWord, lpData As VoidPtr, lpcbData As *DWord) As Long
-Declare Function RegSaveKey Lib "advapi32" Alias "RegSaveKeyA" (hKey As HKEY, pFile As PCSTR, pSecurityAttributes As *SECURITY_ATTRIBUTES) As Long
-Declare Function RegSetValueEx Lib "advapi32" Alias "RegSetValueExA" (hKey As HKEY, lpValueName As PCSTR, Reserved As DWord, dwType As DWord, lpData As VoidPtr, cbData As DWord) As Long
-Declare Function RegUnLoadKey Lib "advapi32" Alias "RegUnLoadKeyA" (hKey As HKEY, pSubKey As PCSTR) As Long
-
-Type VALENT
-	ve_valuename As PSTR
-	ve_valuelen As DWord
-	ve_valueptr As ULONG_PTR
-	ve_type As DWord
-End Type
-#endif '_INC_REG
+/*
+Declare Function RegLoadKey Lib "advapi32" Alias _FuncName_RegLoadKey (hKey As HKEY, pSubKey As PCTSTR, pFile As PCTSTR) As Long
+Declare Function RegOpenKeyEx Lib "advapi32" Alias _FuncName_RegOpenKeyEx (hKey As HKEY, lpSubKey As PCTSTR, ulOptions As DWord, samDesired As Long, ByRef phkResult As HKEY) As Long
+Declare Function RegQueryInfoKey Lib "advapi32" Alias _FuncName_RegQueryInfoKey (hKey As HKEY, pClass As PTSTR, pcClass As *DWord, pReserved As *DWord, pcSubKeys As *DWord, pcMaxSubKeyLen As *DWord, pcMaxClassLen As *DWord, pcValues As *DWord, pcMaxValueNameLen As *DWord, pcMaxValueLen As *DWord, pcbSecurityDescriptor As *DWord, pftLastWriteTime As *FILETIME) As Long
+Declare Function RegQueryMultipleValues Lib "advapi32" Alias _FuncName_RegQueryMultipleValues (hKey As HKEY, val_list As *VALENT, num_vals As DWord, pValueBuf As PTSTR, ByRef dwTotsize As DWord) As Long
+Declare Function RegQueryValueEx Lib "advapi32" Alias _FuncName_RegQueryValueEx (hKey As HKEY, lpValueName As PCTSTR, lpReserved As DWord, lpType As *DWord, lpData As VoidPtr, lpcbData As *DWord) As Long
+Declare Function RegSaveKey Lib "advapi32" Alias _FuncName_RegSaveKey (hKey As HKEY, pFile As PCTSTR, pSecurityAttributes As *SECURITY_ATTRIBUTES) As Long
+Declare Function RegSetValueEx Lib "advapi32" Alias _FuncName_RegSetValueEx (hKey As HKEY, lpValueName As PCTSTR, Reserved As DWord, dwType As DWord, lpData As VoidPtr, cbData As DWord) As Long
+Declare Function RegUnLoadKey Lib "advapi32" Alias _FuncName_RegUnLoadKey (hKey As HKEY, pSubKey As PCTSTR) As Long
+*/
+'_INC_REG
Index: /Include/api_richedit.sbp
===================================================================
--- /Include/api_richedit.sbp	(revision 140)
+++ /Include/api_richedit.sbp	(revision 141)
@@ -30,5 +30,5 @@
 Const CFE_AUTOCOLOR = &H40000000
 
-Type CHARFORMAT
+Type CHARFORMATW
 	cbSize As DWord
 	dwMask As DWord
@@ -36,10 +36,25 @@
 	yHeight As Long
 	yOffset As Long
-	crTextColor As DWord
+	crTextColor As COLORREF
 	bCharSet As Byte
 	bPitchAndFamily As Byte
-	szFaceName[ELM(LF_FACESIZE)] As Byte
-End Type
-
+	szFaceName[ELM(LF_FACESIZE)] As WCHAR
+End Type
+Type CHARFORMATA
+	cbSize As DWord
+	dwMask As DWord
+	dwEffects As DWord
+	yHeight As Long
+	yOffset As Long
+	crTextColor As COLORREF
+	bCharSet As Byte
+	bPitchAndFamily As Byte
+	szFaceName[ELM(LF_FACESIZE)] As SByte
+End Type
+#ifdef UNICODE
+TypeDef CHARFORMAT = CHARFORMATW
+#else
+TypeDef CHARFORMAT = CHARFORMATA
+#endif
 
 'CHARFORMAT2 struct
@@ -85,5 +100,5 @@
 Const CFU_UNDERLINENONE =   0
 
-Type CHARFORMAT2
+Type CHARFORMAT2W
 	cbSize As DWord
 	dwMask As DWord
@@ -94,5 +109,5 @@
 	bCharSet As Byte
 	bPitchAndFamily As Byte
-	szFaceName[ELM(LF_FACESIZE)] As Byte
+	szFaceName[ELM(LF_FACESIZE)] As WCHAR
 	wWeight As Word
 	sSpacing As Integer
@@ -107,4 +122,31 @@
 	bReserved1 As Byte
 End Type
+Type CHARFORMAT2A
+	cbSize As DWord
+	dwMask As DWord
+	dwEffects As DWord
+	yHeight As Long
+	yOffset As Long
+	crTextColor As DWord
+	bCharSet As Byte
+	bPitchAndFamily As Byte
+	szFaceName[ELM(LF_FACESIZE)] As SByte
+	wWeight As Word
+	sSpacing As Integer
+	crBackColor As DWord
+	lcid As DWord
+	dwReserved As DWord
+	sStyle As Integer
+	wKerning As Word
+	bUnderlineType As Byte
+	bAnimation As Byte
+	bRevAuthor As Byte
+	bReserved1 As Byte
+End Type
+#ifdef UNICODE
+TypeDef CHARFORMAT2 = CHARFORMAT2W
+#else
+TypeDef CHARFORMAT2 = CHARFORMAT2A
+#endif
 
 
Index: /Include/api_shell.sbp
===================================================================
--- /Include/api_shell.sbp	(revision 140)
+++ /Include/api_shell.sbp	(revision 141)
@@ -5,9 +5,36 @@
 #define _INC_SHELL
 
+#ifdef UNICODE
+Const _FuncName_DoEnvironmentSubst = "DoEnvironmentSubstW"
+Const _FuncName_DragQueryFile = "DragQueryFileW"
+Const _FuncName_ExtractAssociatedIcon = "ExtractAssociatedIconW"
+Const _FuncName_ExtractIcon = "ExtractIconW"
+Const _FuncName_ExtractIconEx = "ExtractIconExW"
+Const _FuncName_FindExecutable = "FindExecutableW"
+Const _FuncName_GUIDFromString = "GUIDFromStringW"
+Const _FuncName_SHBrowseForFolder = "SHBrowseForFolderW"
+Const _FuncName_ShellAbout = "ShellAboutW"
+Const _FuncName_ShellExecute = "ShellExecuteW"
+Const _FuncName_SHFileOperation = "SHFileOperationW"
+Const _FuncName_SHGetPathFromIDList = "SHGetPathFromIDListW"
+#else
+Const _FuncName_DoEnvironmentSubst = "DoEnvironmentSubstA"
+Const _FuncName_DragQueryFile = "DragQueryFileA"
+Const _FuncName_ExtractAssociatedIcon = "ExtractAssociatedIconA"
+Const _FuncName_ExtractIcon = "ExtractIconA"
+Const _FuncName_ExtractIconEx = "ExtractIconExA"
+Const _FuncName_FindExecutable = "FindExecutableA"
+Const _FuncName_GUIDFromString = "GUIDFromStringA"
+Const _FuncName_SHBrowseForFolder = "SHBrowseForFolderA"
+Const _FuncName_ShellAbout = "ShellAboutA"
+Const _FuncName_ShellExecute = "ShellExecuteA"
+Const _FuncName_SHFileOperation = "SHFileOperationA"
+Const _FuncName_SHGetPathFromIDList = "SHGetPathFromIDListA"
+#endif
 
 '-----------
 ' Shell API
 
-Declare Function DoEnvironmentSubst Lib "shell32" Alias "DoEnvironmentSubstA" (
+Declare Function DoEnvironmentSubst Lib "shell32" Alias _FuncName_DoEnvironmentSubst (
 	pszString As PSTR,
 	cchString As DWord
@@ -16,18 +43,18 @@
 Declare Sub DragAcceptFiles Lib "shell32" (hWnd As HWND, bAccept As BOOL)
 Declare Sub DragFinish Lib "shell32" (hDrop As HDROP)
-Declare Function DragQueryFile Lib "shell32" Alias "DragQueryFileA" (hDrop As HDROP, iFile As Long, lpszFile As PSTR, cch As DWord) As DWord
+Declare Function DragQueryFile Lib "shell32" Alias _FuncName_DragQueryFile (hDrop As HDROP, iFile As Long, lpszFile As LPTSTR, cch As DWord) As DWord
 Declare Function DragQueryPoint Lib "shell32" (hDrop As HDROP, ByRef lpPoint As POINTAPI) As Long
-Declare Function ExtractAssociatedIcon Lib "shell32" Alias "ExtractAssociatedIconA" (hInst As HINSTANCE, lpIconPath As PSTR, lpiIcon As *Word) As HICON
-Declare Function ExtractIcon Lib "shell32" Alias "ExtractIconA" (hInst As HINSTANCE, lpszExeFileName As PCSTR, nIconIndex As Long) As HICON
-Declare Function ExtractIconEx Lib "shell32" Alias "ExtractIconExA" (lpszFile As PCSTR, nIconIndex As Long, phiconLarge As *DWord, phiconSmall As *DWord, nIcons As Long) As HICON
-
-Declare Function FindExecutable Lib "shell32" Alias "FindExecutableA" (
-	pFile As PCSTR,
-	pDirectory As PCSTR,
-	pResult As PCSTR
+Declare Function ExtractAssociatedIcon Lib "shell32" Alias _FuncName_ExtractAssociatedIcon (hInst As HINSTANCE, lpIconPath As LPTSTR, lpiIcon As *Word) As HICON
+Declare Function ExtractIcon Lib "shell32" Alias _FuncName_ExtractIcon (hInst As HINSTANCE, lpszExeFileName As LPCTSTR, nIconIndex As Long) As HICON
+Declare Function ExtractIconEx Lib "shell32" Alias _FuncName_ExtractIconEx (lpszFile As PCSTR, nIconIndex As Long, phiconLarge As *DWord, phiconSmall As *DWord, nIcons As Long) As HICON
+
+Declare Function FindExecutable Lib "shell32" Alias _FuncName_FindExecutable (
+	pFile As PCTSTR,
+	pDirectory As PCTSTR,
+	pResult As PCTSTR
 ) As Long
 
-Declare Function GUIDFromString Lib "shell32" Alias "GUIDFromStringA" (
-	ByVal psz As PCSTR,
+Declare Function GUIDFromString Lib "shell32" Alias _FuncName_GUIDFromString (
+	ByVal psz As PCTSTR,
 	ByRef guid As GUID
 ) As BOOL
@@ -38,9 +65,9 @@
 Declare Function MIMEAssociationDialog Lib "url" (
 	hwndParent As HWND,
-    dwInFlags As DWord,
-    pcszFile As PCSTR,
-    pcszMIMEContentType As PCSTR,
-    pszAppBuf As PSTR,
-    ucAppBufLen As DWord
+	dwInFlags As DWord,
+	pcszFile As PCTSTR,
+	pcszMIMEContentType As PCTSTR,
+	pszAppBuf As PTSTR,
+	ucAppBufLen As DWord
 ) As HRESULT
 
@@ -95,9 +122,9 @@
 Typedef BFFCALLBACK = *Function(hwnd As HWND, uMsg As DWord, lParam As LPARAM, lpData As LPARAM) As Long
 
-Type BROWSEINFO
+Type BROWSEINFOW
 	hwndOwner      As HWND
 	pidlRoot       As VoidPtr
-	pszDisplayName As PSTR
-	lpszTitle      As PCSTR
+	pszDisplayName As LPWSTR
+	lpszTitle      As LPCWSTR
 	ulFlags        As DWord
 	lpfn           As BFFCALLBACK
@@ -105,4 +132,19 @@
 	iImage         As Long
 End Type
+Type BROWSEINFOA
+	hwndOwner      As HWND
+	pidlRoot       As VoidPtr
+	pszDisplayName As LPSTR
+	lpszTitle      As LPCSTR
+	ulFlags        As DWord
+	lpfn           As BFFCALLBACK
+	lParam         As LPARAM
+	iImage         As Long
+End Type
+#ifdef UNICODE
+TypeDef BROWSEINFO = BROWSEINFOW
+#else
+TypeDef BROWSEINFO = BROWSEINFOA
+#endif
 
 Type SHITEMID
@@ -114,5 +156,5 @@
 	mkid As SHITEMID
 End Type
-Declare Function SHBrowseForFolder Lib "shell32" Alias "SHBrowseForFolderA" (ByRef lpbi As BROWSEINFO) As *ITEMIDLIST
+Declare Function SHBrowseForFolder Lib "shell32" Alias _FuncName_SHBrowseForFolder (ByRef bi As BROWSEINFO) As *ITEMIDLIST
 
 Const SHCNE_RENAMEITEM          = &h00000001
@@ -175,5 +217,5 @@
 
 ' ShellApi.h
-Declare Function ShellAbout Lib "shell32" Alias "ShellAboutA" (hWnd As HWND, szApp As PCSTR, szOtherStuff As PCSTR, hIcon As HICON) As Long
+Declare Function ShellAbout Lib "shell32" Alias _FuncName_ShellAbout (hWnd As HWND, szApp As PCTSTR, szOtherStuff As PCTSTR, hIcon As HICON) As Long
 
 Const SE_ERR_FNF =             2
@@ -189,5 +231,5 @@
 Const SE_ERR_NOASSOC =         31
 ' ShellApi.h
-Declare Function ShellExecute Lib "shell32" Alias "ShellExecuteA" (hWnd As HWND, lpOperation As PCSTR, lpFile As PCSTR, lpParameters As PCSTR, lpDirectory As PCSTR, nShowCmd As Long) As HINSTANCE
+Declare Function ShellExecute Lib "shell32" Alias _FuncName_ShellExecute (hWnd As HWND, lpOperation As LPCTSTR, lpFile As LPCTSTR, lpParameters As LPCTSTR, lpDirectory As LPCTSTR, nShowCmd As Long) As HINSTANCE
 
 Const FO_MOVE =   &H0001
@@ -207,5 +249,15 @@
 Const FOF_NOERRORUI =             &H0400
 Const FOF_NOCOPYSECURITYATTRIBS = &H0800
-Type SHFILEOPSTRUCT
+Type SHFILEOPSTRUCTW
+	hWnd As HWND
+	wFunc As DWord
+	pFrom As PCWSTR
+	pTo As PCWSTR
+	fFlags As Word
+	fAnyOperationsAborted As BOOL
+	hNameMappings As VoidPtr
+	lpszProgressTitle As LPCWSTR
+End Type
+Type SHFILEOPSTRUCTA
 	hWnd As HWND
 	wFunc As DWord
@@ -215,8 +267,14 @@
 	fAnyOperationsAborted As BOOL
 	hNameMappings As VoidPtr
-	lpszProgressTitle As PCSTR
-End Type
-' ShellApi.h
-Declare Function SHFileOperation Lib "shell32" Alias "SHFileOperationA" (ByRef lpFileOp As SHFILEOPSTRUCT) As Long
+	lpszProgressTitle As LPCSTR
+End Type
+#ifdef UNICODE
+TypeDef SHFILEOPSTRUCT = SHFILEOPSTRUCTW
+#else
+TypeDef SHFILEOPSTRUCT = SHFILEOPSTRUCTA
+#endif
+
+' ShellApi.h
+Declare Function SHFileOperation Lib "shell32" Alias _FuncName_SHFileOperation (ByRef FileOp As SHFILEOPSTRUCT) As Long
 
 ' ShellApi.h
@@ -225,5 +283,5 @@
 'SHGetDataFromIDList
 
-Declare Function SHGetPathFromIDList Lib "shell32" Alias "SHGetPathFromIDListA" (pidl As *ITEMIDLIST, pszPath As PSTR) As Long
+Declare Function SHGetPathFromIDList Lib "shell32" Alias _FuncName_SHGetPathFromIDList (pidl As *ITEMIDLIST, pszPath As PTSTR) As Long
 
 #endif '_INC_SHELL
Index: /Include/api_shlwapi.sbp
===================================================================
--- /Include/api_shlwapi.sbp	(revision 140)
+++ /Include/api_shlwapi.sbp	(revision 141)
@@ -6,6 +6,19 @@
 
 
-Declare Function PathGetArgs Lib "shlwapi" Alias "PathGetArgsA" (pszPath As LPSTR) As LPSTR
-Declare Function StrFormatByteSize64  Lib "shlwapi" Alias "StrFormatByteSize64A" (ll As Int64, pszBuf As *Byte, BufSize As DWord) As *Byte
+Declare Function PathGetArgsA Lib "shlwapi" Alias (pszPath As LPCWSTR) As LPWSTR
+Declare Function PathGetArgsW Lib "shlwapi" Alias (pszPath As LPCSTR) As LPSTR
+#ifdef UNICODE
+Declare Function PathGetArgs Lib "shlwapi" Alias "PathGetArgsW" (pszPath As LPCWSTR) As LPWSTR
+#else
+Declare Function PathGetArgs Lib "shlwapi" Alias "PathGetArgsA" (pszPath As LPCSTR) As LPSTR
+#endif
+
+Declare Function StrFormatByteSize64 Lib "shlwapi" Alias (ll As Int64, pszBuf As PWSTR, BufSize As DWord) As PWSTR
+Declare Function StrFormatByteSize64 Lib "shlwapi" Alias (ll As Int64, pszBuf As PSTR, BufSize As DWord) As PSTR
+#ifdef UNICODE
+Declare Function StrFormatByteSize64 Lib "shlwapi" Alias "StrFormatByteSize64W" (ll As Int64, pszBuf As PWSTR, BufSize As DWord) As PWSTR
+#else
+Declare Function StrFormatByteSize64 Lib "shlwapi" Alias "StrFormatByteSize64A" (ll As Int64, pszBuf As PSTR, BufSize As DWord) As PSTR
+#endif
 
 #endif '_INC_SHLWAPI
Index: /Include/api_system.sbp
===================================================================
--- /Include/api_system.sbp	(revision 140)
+++ /Include/api_system.sbp	(revision 141)
@@ -5,7 +5,127 @@
 
 #ifdef UNICODE
+Const _FuncName_CompareString = "CompareStringW"
+Const _FuncName_CopyFile = "CopyFileW"
+Const _FuncName_CreateDirectory = "CreateDirectoryW"
+Const _FuncName_CreateEvent = "CreateEventW"
+Const _FuncName_CreateMutex = "CreateMutexW"
+Const _FuncName_CreateSemaphore = "CreateSemaphoreW"
+Const _FuncName_CreateWaitableTimer = "CreateWaitableTimerW"
+Const _FuncName_CreateFile = "CreateFileW"
+Const _FuncName_CreateFileMapping = "CreateFileMappingW"
+Const _FuncName_OpenFileMapping = "OpenFileMappingW"
+Const _FuncName_CreateMailslot = "CreateMailslotW"
+Const _FuncName_CreateProcess = "CreateProcessW"
+Const _FuncName_DeleteFile = "DeleteFileW"
+Const _FuncName_FatalAppExit = "FatalAppExitW"
+Const _FuncName_FindFirstChangeNotification = "FindFirstChangeNotificationW"
+Const _FuncName_FindFirstFile = "FindFirstFileW"
+Const _FuncName_FindNextFile = "FindNextFileW"
+Const _FuncName_FormatMessage = "FormatMessageW"
+Const _FuncName_FreeEnvironmentStrings = "FreeEnvironmentStringsW"
+Const _FuncName_GetCompressedFileSize = "GetCompressedFileSizeW"
+Const _FuncName_GetComputerName = "GetComputerNameW"
+Const _FuncName_GetCurrentDirectory = "GetCurrentDirectoryW"
+Const _FuncName_GetDateFormat = "GetDateFormatW"
+Const _FuncName_GetDiskFreeSpace = "GetDiskFreeSpaceW"
+Const _FuncName_GetDiskFreeSpaceEx = "GetDiskFreeSpaceExW"
+Const _FuncName_GetVolumeInformation = "GetVolumeInformationW"
+Const _FuncName_GetDriveType = "GetDriveTypeW"
+Const _FuncName_GetEnvironmentVariable = "GetEnvironmentVariableW"
+Const _FuncName_GetEnvironmentStrings = "GetEnvironmentStringsW"
+Const _FuncName_GetFileAttributes = "GetFileAttributesW"
+Const _FuncName_GetFullPathName = "GetFullPathNameW"
+Const _FuncName_GetLogicalDriveStrings = "GetLogicalDriveStringsW"
+Const _FuncName_GetModuleFileName = "GetModuleFileNameW"
+Const _FuncName_GetModuleHandle = "GetModuleHandleW"
+Const _FuncName_GetShortPathName = "GetShortPathNameW"
+Const _FuncName_GetStartupInfo = "GetStartupInfoW"
+Const _FuncName_GetSystemDirectory = "GetSystemDirectoryW"
+Const _FuncName_GetTempFileName = "GetTempFileNameW"
+Const _FuncName_GetTempPath = "GetTempPathW"
+Const _FuncName_GetTimeFormat = "GetTimeFormatW"
+Const _FuncName_GetUserName = "GetUserNameW"
+Const _FuncName_GetVersionEx = "GetVersionExW"
+Const _FuncName_GetWindowsDirectory = "GetWindowsDirectoryW"
+Const _FuncName_LCMapString = "LCMapStringW"
+Const _FuncName_LoadLibrary = "LoadLibraryW"
+Const _FuncName_LoadLibraryEx = "LoadLibraryExW"
+Const _FuncName_lstrcat = "lstrcatW"
+Const _FuncName_lstrcmp = "lstrcmpW"
+Const _FuncName_lstrcmpi = "lstrcmpiW"
 Const _FuncName_lstrcpy = "lstrcpyW"
+Const _FuncName_MoveFile = "MoveFileW"
+Const _FuncName_OpenEvent = "OpenEventW"
+Const _FuncName_OpenMutex = "OpenMutexW"
+Const _FuncName_OpenSemaphore = "OpenSemaphoreW"
+Const _FuncName_OpenWaitableTimer = "OpenWaitableTimerW"
+Const _FuncName_RemoveDirectory = "RemoveDirectoryW"
+Const _FuncName_SetComputerName = "SetComputerNameW"
+Const _FuncName_SetCurrentDirectory = "SetCurrentDirectoryW"
+Const _FuncName_SearchPath = "SearchPathW"
+Const _FuncName_SetEnvironmentVariable = "SetEnvironmentVariableW"
+Const _FuncName_SetFileAttributes = "SetFileAttributesW"
 #else
+Const _FuncName_CompareString = "CompareStringA"
+Const _FuncName_CopyFile = "CopyFileA"
+Const _FuncName_CreateDirectory = "CreateDirectoryA"
+Const _FuncName_CreateEvent = "CreateEventA"
+Const _FuncName_CreateMutex = "CreateMutexA"
+Const _FuncName_CreateSemaphore = "CreateSemaphoreA"
+Const _FuncName_CreateWaitableTimer = "CreateWaitableTimerA"
+Const _FuncName_CreateFile = "CreateFileA"
+Const _FuncName_CreateFileMapping = "CreateFileMappingA"
+Const _FuncName_OpenFileMapping = "OpenFileMappingA"
+Const _FuncName_CreateMailslot = "CreateMailslotA"
+Const _FuncName_CreateProcess = "CreateProcessA"
+Const _FuncName_DeleteFile = "DeleteFileA"
+Const _FuncName_FatalAppExit = "FatalAppExitA"
+Const _FuncName_FindFirstChangeNotification = "FindFirstChangeNotificationA"
+Const _FuncName_FindFirstFile = "FindFirstFileA"
+Const _FuncName_FindNextFile = "FindNextFileA"
+Const _FuncName_FormatMessage = "FormatMessageA"
+Const _FuncName_FreeEnvironmentStrings = "FreeEnvironmentStringsA"
+Const _FuncName_GetCompressedFileSize = "GetCompressedFileSizeA"
+Const _FuncName_GetComputerName = "GetComputerNameA"
+Const _FuncName_GetCurrentDirectory = "GetCurrentDirectoryA"
+Const _FuncName_GetDateFormat = "GetDateFormatA"
+Const _FuncName_GetDiskFreeSpace = "GetDiskFreeSpaceA"
+Const _FuncName_GetDiskFreeSpaceEx = "GetDiskFreeSpaceExA"
+Const _FuncName_GetVolumeInformation = "GetVolumeInformationA"
+Const _FuncName_GetDriveType = "GetDriveTypeA"
+Const _FuncName_GetEnvironmentVariable = "GetEnvironmentVariableA"
+Const _FuncName_GetEnvironmentStrings = "GetEnvironmentStringsA"
+Const _FuncName_GetFileAttributes = "GetFileAttributesA"
+Const _FuncName_GetFullPathName = "GetFullPathNameA"
+Const _FuncName_GetLogicalDriveStrings = "GetLogicalDriveStringsA"
+Const _FuncName_GetModuleFileName = "GetModuleFileNameA"
+Const _FuncName_GetModuleHandle = "GetModuleHandleA"
+Const _FuncName_GetShortPathName = "GetShortPathNameA"
+Const _FuncName_GetStartupInfo = "GetStartupInfoA"
+Const _FuncName_GetSystemDirectory = "GetSystemDirectoryA"
+Const _FuncName_GetTempFileName = "GetTempFileNameA"
+Const _FuncName_GetTempPath = "GetTempPathA"
+Const _FuncName_GetTimeFormat = "GetTimeFormatA"
+Const _FuncName_GetUserName = "GetUserNameA"
+Const _FuncName_GetVersionEx = "GetVersionExA"
+Const _FuncName_GetWindowsDirectory = "GetWindowsDirectoryA"
+Const _FuncName_LCMapString = "LCMapStringA"
+Const _FuncName_LoadLibrary = "LoadLibraryA"
+Const _FuncName_LoadLibraryEx = "LoadLibraryExA"
+Const _FuncName_lstrcat = "lstrcatA"
+Const _FuncName_lstrcmp = "lstrcmpA"
+Const _FuncName_lstrcmpi = "lstrcmpiA"
 Const _FuncName_lstrcpy = "lstrcpyA"
+Const _FuncName_MoveFile = "MoveFileA"
+Const _FuncName_OpenEvent = "OpenEventA"
+Const _FuncName_OpenMutex = "OpenMutexA"
+Const _FuncName_OpenSemaphore = "OpenSemaphoreA"
+Const _FuncName_OpenWaitableTimer = "OpenWaitableTimerA"
+Const _FuncName_RemoveDirectory = "RemoveDirectoryA"
+Const _FuncName_SetComputerName = "SetComputerNameA"
+Const _FuncName_SetCurrentDirectory = "SetCurrentDirectoryA"
+Const _FuncName_SearchPath = "SearchPathA"
+Const _FuncName_SetEnvironmentVariable = "SetEnvironmentVariableA"
+Const _FuncName_SetFileAttributes = "SetFileAttributesA"
 #endif
 
@@ -357,16 +477,16 @@
 Const CSTR_EQUAL =        2
 Const CSTR_GREATER_THAN = 3
-Declare Function CompareString Lib "kernel32" Alias "CompareStringA" (Locale As LCID, dwCmpFlags As DWord, pString1 As PCSTR, cchCount1 As Long, pString2 As PCSTR, cchCount2 As Long) As Long
-
-Declare Function CopyFile Lib "kernel32" Alias "CopyFileA" (lpExistingFileName As LPCSTR, lpNewFileName As LPCSTR, bFailIfExists As BOOL) As BOOL
-Declare Function CreateDirectory Lib "kernel32" Alias "CreateDirectoryA" (lpPathName As LPCSTR, lpSecurityAttributes As *SECURITY_ATTRIBUTES) As BOOL
-Declare Function CreateEvent Lib "kernel32" Alias "CreateEventA" (pEventAttributes As *SECURITY_ATTRIBUTES, bManualReset As BOOL, bInitialState As BOOL, pName As PCSTR) As HANDLE
-Declare Function CreateMutex Lib "kernel32" Alias "CreateMutexA" (lpMutexAttributes As *SECURITY_ATTRIBUTES, bInitialOwner As BOOL, lpName As PCSTR) As HANDLE
-Declare Function CreateSemaphore Lib "kernel32" Alias "CreateSemaphoreA" (lpSemaphoreAttributes As *SECURITY_ATTRIBUTES, lInitialCount As Long, lMaximumCount As Long, lpName As LPSTR) As HANDLE
+Declare Function CompareString Lib "kernel32" Alias _FuncName_CompareString (Locale As LCID, dwCmpFlags As DWord, pString1 As PCTSTR, cchCount1 As Long, pString2 As PCTSTR, cchCount2 As Long) As Long
+
+Declare Function CopyFile Lib "kernel32" Alias _FuncName_CopyFile (pExistingFileName As PCTSTR, pNewFileName As PCTSTR, bFailIfExists As BOOL) As BOOL
+Declare Function CreateDirectory Lib "kernel32" Alias _FuncName_CreateDirectory (pPathName As PCTSTR, pSecurityAttributes As *SECURITY_ATTRIBUTES) As BOOL
+Declare Function CreateEvent Lib "kernel32" Alias _FuncName_CreateEvent (pEventAttributes As *SECURITY_ATTRIBUTES, bManualReset As BOOL, bInitialState As BOOL, pName As PCTSTR) As HANDLE
+Declare Function CreateMutex Lib "kernel32" Alias _FuncName_CreateMutex (lpMutexAttributes As *SECURITY_ATTRIBUTES, bInitialOwner As BOOL, lpName As PCTSTR) As HANDLE
+Declare Function CreateSemaphore Lib "kernel32" Alias _FuncName_CreateSemaphore (pSemaphoreAttributes As *SECURITY_ATTRIBUTES, lInitialCount As Long, lMaximumCount As Long, pName As PCTSTR) As HANDLE
 
 TypeDef PTIMERAPCROUTINE = *Sub(lpArgToCompletionRoutine As VoidPtr, dwTimerLowValue As DWord, dwTimerHighValue As DWord)
-Declare Function CreateWaitableTimer Lib "kernel32" Alias "CreateWaitableTimerA" (lpTimerAttributes As *SECURITY_ATTRIBUTES, bManualReset As BOOL, lpTimerName As LPSTR) As HANDLE
-Declare Function OpenWaitableTimer Lib "kernel32" Alias "OpenWaitableTimerA" (dwDesiredAccess As DWord, bInheritHandle As BOOL, lpTimerName As LPSTR) As HANDLE
-Declare Function SetWaitableTimer Lib "kernel32" (hTimer As HANDLE, lpDueTime As *LARGE_INTEGER, lPeriod As Long, pfnCompletionRoutine As PTIMERAPCROUTINE, lpArgToCompletionRoutine As VoidPtr, fResume As BOOL) As BOOL
+Declare Function CreateWaitableTimer Lib "kernel32" Alias _FuncName_CreateWaitableTimer (pTimerAttributes As *SECURITY_ATTRIBUTES, bManualReset As BOOL, pTimerName As PCTSTR) As HANDLE
+Declare Function OpenWaitableTimer Lib "kernel32" Alias _FuncName_OpenWaitableTimer (dwDesiredAccess As DWord, bInheritHandle As BOOL, pTimerName As PCTSTR) As HANDLE
+Declare Function SetWaitableTimer Lib "kernel32" (hTimer As HANDLE, pDueTime As *LARGE_INTEGER, lPeriod As Long, pfnCompletionRoutine As PTIMERAPCROUTINE, pArgToCompletionRoutine As VoidPtr, fResume As BOOL) As BOOL
 Declare Function CancelWaitableTimer Lib "kernel32" (hTimer As HANDLE) As BOOL
 
@@ -403,5 +523,5 @@
 Const FILE_FLAG_OPEN_REPARSE_POINT =  &H00200000
 Const FILE_FLAG_OPEN_NO_RECALL =      &H00100000
-Declare Function CreateFile Lib "kernel32" Alias "CreateFileA" (lpFileName As *Byte, dwDesiredAccess As DWord, dwShareMode As DWord, ByRef lpSecurityAttributes As SECURITY_ATTRIBUTES, dwCreationDisposition As DWord, dwFlagsAndAttributes As DWord, hTemplateFile As HANDLE) As HANDLE
+Declare Function CreateFile Lib "kernel32" Alias _FuncName_CreateFile (pFileName As PCTSTR, dwDesiredAccess As DWord, dwShareMode As DWord, ByRef lpSecurityAttributes As SECURITY_ATTRIBUTES, dwCreationDisposition As DWord, dwFlagsAndAttributes As DWord, hTemplateFile As HANDLE) As HANDLE
 
 Const SECTION_QUERY = &H0001
@@ -416,6 +536,6 @@
 Const FILE_MAP_READ   = SECTION_MAP_READ
 Const FILE_MAP_ALL_ACCESS  =  SECTION_ALL_ACCESS
-Declare Function CreateFileMapping Lib "kernel32" Alias "CreateFileMappingA" (hFile As HANDLE, lpFileMappingAttributes As *SECURITY_ATTRIBUTES, flProtect As DWord, dwMaximumSizeHigh As DWord, dwMaximumSizeLow As DWord, lpName As LPSTR) As HANDLE
-Declare Function OpenFileMapping Lib "kernel32" Alias "OpenFileMappingA" (dwDesiredAccess As DWord, bInheritHandle As BOOL, lpName As LPSTR) As HANDLE
+Declare Function CreateFileMapping Lib "kernel32" Alias _FuncName_CreateFileMapping (hFile As HANDLE, pFileMappingAttributes As *SECURITY_ATTRIBUTES, flProtect As DWord, dwMaximumSizeHigh As DWord, dwMaximumSizeLow As DWord, pName As PCSTR) As HANDLE
+Declare Function OpenFileMapping Lib "kernel32" Alias _FuncName_OpenFileMapping (dwDesiredAccess As DWord, bInheritHandle As BOOL, pName As PCSTR) As HANDLE
 Declare Function MapViewOfFile Lib "kernel32" (hFileMappingObject As HANDLE, dwDesiredAccess As DWord, dwFileOffsetHigh As DWord, dwFileOffsetLow As DWord, dwNumberOfBytesToMap As DWord) As VoidPtr
 Declare Function MapViewOfFileEx Lib "kernel32" (hFileMappingObject As HANDLE, dwDesiredAccess As DWord, dwFileOffsetHigh As DWord, dwFileOffsetLow As DWord, dwNumberOfBytesToMap As DWord, lpBaseAddress As VoidPtr) As VoidPtr
@@ -424,5 +544,5 @@
 
 Const MAILSLOT_WAIT_FOREVER = &HFFFFFFFF
-Declare Function CreateMailslot Lib "kernel32" Alias "CreateMailslotA" (lpName As *Byte, nMaxMessageSize As DWord, lReadTimeout As DWord, ByRef lpSecurityAttributes As SECURITY_ATTRIBUTES) As HANDLE
+Declare Function CreateMailslot Lib "kernel32" Alias _FuncName_CreateMailslot (pName As PCTSTR, nMaxMessageSize As DWord, lReadTimeout As DWord, pSecurityAttributes As *SECURITY_ATTRIBUTES) As HANDLE
 
 Const DEBUG_PROCESS =              &H00000001
@@ -456,9 +576,9 @@
 Const STARTF_USESTDHANDLES =    &H00000100
 Const STARTF_USEHOTKEY =        &H00000200
-Type STARTUPINFO
+Type STARTUPINFOW
 	cb As DWord
-	lpReserved As *Byte
-	lpDesktop As *Byte
-	lpTitle As *Byte
+	lpReserved As LPWSTR
+	lpDesktop As LPWSTR
+	lpTitle As LPWSTR
 	dwX As DWord
 	dwY As DWord
@@ -476,4 +596,29 @@
 	hStdError As HANDLE
 End Type
+Type STARTUPINFOA
+	cb As DWord
+	lpReserved As LPSTR
+	lpDesktop As LPSTR
+	lpTitle As LPSTR
+	dwX As DWord
+	dwY As DWord
+	dwXSize As DWord
+	dwYSize As DWord
+	dwXCountChars As DWord
+	dwYCountChars As DWord
+	dwFillAttribute As DWord
+	dwFlags As DWord
+	wShowWindow As Word
+	cbReserved2 As Word
+	lpReserved2 As *Byte
+	hStdInput As HANDLE
+	hStdOutput As HANDLE
+	hStdError As HANDLE
+End Type
+#ifdef UNICODE
+TypeDef STARTUPINFO = STARTUPINFOW
+#else
+TypeDef STARTUPINFO = STARTUPINFOA
+#endif
 Type PROCESS_INFORMATION
 	hProcess As HANDLE
@@ -482,12 +627,12 @@
 	dwThreadId As DWord
 End Type
-Declare Function CreateProcess Lib "kernel32" Alias "CreateProcessA" (lpApplicationName As BytePtr, lpCommandLine As BytePtr, ByRef lpProcessAttributes As SECURITY_ATTRIBUTES, ByRef lpThreadAttributes As SECURITY_ATTRIBUTES, bInheritHandles As BOOL, dwCreationFlags As DWord, lpEnvironment As VoidPtr, lpCurrentDirectory As BytePtr, ByRef lpStartupInfo As STARTUPINFO, ByRef lpProcessInformation As PROCESS_INFORMATION) As BOOL
+Declare Function CreateProcess Lib "kernel32" Alias _FuncName_CreateProcess (pApplicationName As PCTSTR, pCommandLine As PTSTR, ByRef ProcessAttributes As SECURITY_ATTRIBUTES, ByRef ThreadAttributes As SECURITY_ATTRIBUTES, bInheritHandles As BOOL, dwCreationFlags As DWord, lpEnvironment As VoidPtr, pCurrentDirectory As PCTSTR, ByRef lpStartupInfo As STARTUPINFO, ByRef lpProcessInformation As PROCESS_INFORMATION) As BOOL
 
 TypeDef LPTHREAD_START_ROUTINE = *Function(lpThreadParameter As VoidPtr) As DWord
-Declare Function CreateThread Lib "kernel32" Alias "CreateThread" (lpThreadAttributes As *SECURITY_ATTRIBUTES, dwStackSize As DWord, lpStartAddress As LPTHREAD_START_ROUTINE, lpParameter As VoidPtr, dwCreationFlags As DWord, ByRef lpThreadId As DWord) As HANDLE
+Declare Function CreateThread Lib "kernel32" (lpThreadAttributes As *SECURITY_ATTRIBUTES, dwStackSize As DWord, lpStartAddress As LPTHREAD_START_ROUTINE, pParameter As VoidPtr, dwCreationFlags As DWord, ByRef ThreadId As DWord) As HANDLE
 
 Declare Sub DebugBreak Lib "kernel32" ()
-Declare Sub DeleteCriticalSection Lib "kernel32" (ByRef lpCriticalSection As CRITICAL_SECTION)
-Declare Function DeleteFile Lib "kernel32" Alias "DeleteFileA" (pFileName As PCSTR) As BOOL
+Declare Sub DeleteCriticalSection Lib "kernel32" (ByRef CriticalSection As CRITICAL_SECTION)
+Declare Function DeleteFile Lib "kernel32" Alias _FuncName_DeleteFile (pFileName As PCTSTR) As BOOL
 Declare Function DeviceIoControl Lib "Kernel32" (
 	hDevice As HANDLE,
@@ -510,5 +655,5 @@
 Declare Sub ExitProcess Lib "kernel32" (dwExitCode As DWord)
 Declare Sub ExitThread Lib "kernel32" (dwExitCode As DWord)
-Declare Sub FatalAppExit Lib "kernel32" Alias "FatalAppExitA" (Action As DWord, pMessageText As PCSTR)
+Declare Sub FatalAppExit Lib "kernel32" Alias _FuncName_FatalAppExit (Action As DWord, pMessageText As PCTSTR)
 Declare Function FileTimeToDosDateTime Lib "kernel32" (ByRef lpFileTime As FILETIME, ByRef lpFatDate As Word, ByRef lpFatTime As Word) As BOOL
 Declare Function FileTimeToLocalFileTime Lib "kernel32" (ByRef lpFileTime As FILETIME, ByRef lpLocalFileTime As FILETIME) As BOOL
@@ -517,11 +662,11 @@
 Declare Function FindClose Lib "kernel32" (hFindFile As HANDLE) As BOOL
 Declare Function FindCloseChangeNotification Lib "kernel32" (hChangeHandle As HANDLE) As BOOL
-Declare Function FindFirstChangeNotification Lib "kernel32" Alias "FindFirstChangeNotificationA" (
-	pPathName As PCSTR,
+Declare Function FindFirstChangeNotification Lib "kernel32" Alias _FuncName_FindFirstChangeNotification (
+	pPathName As PCTSTR,
 	bWatchSubtree As BOOL,
 	dwNotifyFilter As DWord
 ) As HANDLE
 
-Type WIN32_FIND_DATA
+Type WIN32_FIND_DATAW
 	dwFileAttributes As DWord
 	ftCreationTime As FILETIME
@@ -532,11 +677,28 @@
 	dwReserved0 As DWord
 	dwReserved1 As DWord
-	cFileName[ELM(MAX_PATH)] As Byte
-	cAlternateFileName[13] As Byte
-End Type
+	cFileName[ELM(MAX_PATH)] As WCHAR
+	cAlternateFileName[13] As WCHAR
+End Type
+Type WIN32_FIND_DATAA
+	dwFileAttributes As DWord
+	ftCreationTime As FILETIME
+	ftLastAccessTime As FILETIME
+	ftLastWriteTime As FILETIME
+	nFileSizeHigh As DWord
+	nFileSizeLow As DWord
+	dwReserved0 As DWord
+	dwReserved1 As DWord
+	cFileName[ELM(MAX_PATH)] As SByte
+	cAlternateFileName[13] As SByte
+End Type
+#ifdef UNICODE
+TypeDef WIN32_FIND_DATA = WIN32_FIND_DATAW
+#else
+TypeDef WIN32_FIND_DATA = WIN32_FIND_DATAA
+#endif
 TypeDef LPWIN32_FIND_DATA = *WIN32_FIND_DATA
-Declare Function FindFirstFile Lib "kernel32" Alias "FindFirstFileA" (lpFileName As BytePtr, ByRef lpFindFildData As WIN32_FIND_DATA) As HANDLE
+Declare Function FindFirstFile Lib "kernel32" Alias _FuncName_FindFirstFile (pFileName As PCTSTR, ByRef FindFildData As WIN32_FIND_DATA) As HANDLE
 Declare Function FindNextChangeNotification Lib "kernel32" (hChangeHandle As HANDLE) As BOOL
-Declare Function FindNextFile Lib "kernel32" Alias "FindNextFileA" (hFindFile As HANDLE, ByRef lpFindFildData As WIN32_FIND_DATA) As BOOL
+Declare Function FindNextFile Lib "kernel32" Alias _FuncName_FindNextFile (hFindFile As HANDLE, ByRef FindFildData As WIN32_FIND_DATA) As BOOL
 Declare Function FlushFileBuffers Lib "kernel32" (hFile As HANDLE) As BOOL
 Declare Function FlushInstructionCache Lib "kernel32"(hProcess As HANDLE, pBaseAddress As VoidPtr, Size As SIZE_T) As BOOL
@@ -548,6 +710,6 @@
 Const FORMAT_MESSAGE_FROM_SYSTEM =     &H00001000
 Const FORMAT_MESSAGE_ARGUMENT_ARRAY =  &H00002000
-Declare Function FormatMessage Lib "kernel32" Alias "FormatMessageA" (dwFlags As DWord, lpSource As VoidPtr, dwMessageId As DWord, dwLanguageId As DWord, lpBuffer As BytePtr, nSize As DWord, Arguments As DWordPtr) As DWord
-Declare Function FreeEnvironmentStrings Lib "kernel32" Alias "FreeEnvironmentStringsA" (pszEnvironmentBlock As PCSTR) As BOOL
+Declare Function FormatMessage Lib "kernel32" Alias _FuncName_FormatMessage (dwFlags As DWord, lpSource As VoidPtr, dwMessageId As DWord, dwLanguageId As DWord, pBuffer As PTSTR, nSize As DWord, Arguments As *DWord) As DWord
+Declare Function FreeEnvironmentStrings Lib "kernel32" Alias _FuncName_FreeEnvironmentStrings (pszEnvironmentBlock As PCTSTR) As BOOL
 Declare Function FreeLibrary Lib "kernel32" (hLibModule As HINSTANCE) As BOOL
 Declare Sub FreeLibraryAndExitThread Lib "kernel32" (hModule As HANDLE, dwExitCode As DWord)
@@ -559,10 +721,10 @@
 Declare Function GetCommandLine Lib "kernel32" Alias "GetCommandLineA" () As PCSTR
 #endif
-Declare Function GetCompressedFileSize Lib "kernel32" Alias "GetCompressedFileSizeA" (lpFileName As BytePtr, ByRef lpFileSizeHigh As DWord) As DWord
-
-Const MAX_COMPUTERNAME_LENGTH=15
-Declare Function GetComputerName Lib "kernel32" Alias "GetComputerNameA" (lpBuffer As BytePtr, ByRef nSize As Long) As Long
-
-Declare Function GetCurrentDirectory Lib "kernel32" Alias "GetCurrentDirectoryA" (nBufferLength As DWord, lpBuffer As BytePtr) As DWord
+Declare Function GetCompressedFileSize Lib "kernel32" Alias _FuncName_GetCompressedFileSize (pFileName As PCTSTR, ByRef FileSizeHigh As DWord) As DWord
+
+Const MAX_COMPUTERNAME_LENGTH = 15
+Declare Function GetComputerName Lib "kernel32" Alias _FuncName_GetComputerName (pBuffer As PTSTR, ByRef nSize As Long) As Long
+
+Declare Function GetCurrentDirectory Lib "kernel32" Alias _FuncName_GetCurrentDirectory (nBufferLength As DWord, pBuffer As PTSTR) As DWord
 Declare Function GetCurrentProcess Lib "kernel32" () As HANDLE
 Declare Function GetCurrentProcessId Lib "kernel32" () As DWord
@@ -573,8 +735,8 @@
 Const DATE_LONGDATE =         &H00000002
 Const DATE_USE_ALT_CALENDAR = &H00000004
-Declare Function GetDateFormat Lib "kernel32" Alias "GetDateFormatA" (Locale As LCID, dwFlags As DWord, ByRef lpDate As SYSTEMTIME, lpFormat As BytePtr, lpDateStr As BytePtr, cchDate As Long) As Long
-
-Declare Function GetDiskFreeSpace Lib "kernel32" Alias "GetDiskFreeSpaceA" (lpRootPathName As BytePtr, lpSectorsPerCluster As *DWord, lpBytesPerSector As *DWord, lpNumberOfFreeClusters As *DWord, lpTotalNumberOfClusters As *DWord) As BOOL
-Declare Function GetDiskFreeSpaceEx Lib "kernel32" Alias "GetDiskFreeSpaceExA" (lpDirectoryName As BytePtr, ByRef lpFreeBytesAvailableToCaller As ULARGE_INTEGER, ByRef lpTotalNumberOfBytes As ULARGE_INTEGER, ByRef lpTotalNumberOfFreeBytes As ULARGE_INTEGER) As BOOL
+Declare Function GetDateFormat Lib "kernel32" Alias _FuncName_GetDateFormat (Locale As LCID, dwFlags As DWord, ByRef Date As SYSTEMTIME, pFormat As PCTSTR, pDateStr As PTSTR, cchDate As Long) As Long
+
+Declare Function GetDiskFreeSpace Lib "kernel32" Alias _FuncName_GetDiskFreeSpace (pRootPathName As PCTSTR, lpSectorsPerCluster As *DWord, pBytesPerSector As *DWord, pNumberOfFreeClusters As *DWord, pTotalNumberOfClusters As *DWord) As BOOL
+Declare Function GetDiskFreeSpaceEx Lib "kernel32" Alias _FuncName_GetDiskFreeSpaceEx (pDirectoryName As PCTSTR, ByRef lpFreeBytesAvailableToCaller As ULARGE_INTEGER, ByRef TotalNumberOfBytes As ULARGE_INTEGER, ByRef TotalNumberOfFreeBytes As ULARGE_INTEGER) As BOOL
 
 Const DRIVE_UNKNOWN =     0
@@ -585,14 +747,14 @@
 Const DRIVE_CDROM =       5
 Const DRIVE_RAMDISK =     6
-Declare Function GetVolumeInformation Lib "kernel32" Alias "GetVolumeInformationA" (lpRootPathName As LPCSTR, lpVolumeNameBuffer As LPSTR, nVolumeNameSize As DWord, lpVolumeSerialNumber As *Word, lpMaximumComponentLength As *Word, lpFileSystemFlags As *Word, lpFileSystemNameBuffer As LPSTR, nFileSystemNameSize As DWord) As BOOL
-Declare Function GetDriveType Lib "kernel32" Alias "GetDriveTypeA" (lpRootPathName As BytePtr) As DWord
-
-Declare Function GetEnvironmentVariable Lib "kernel32" Alias "GetEnvironmentVariableA" (lpName As BytePtr, lpBuffer As BytePtr, nSize As DWord) As DWord
-Declare Function GetEnvironmentStrings Lib "kernel32" Alias "GetEnvironmentStringsA" () As VoidPtr
+Declare Function GetVolumeInformation Lib "kernel32" Alias _FuncName_GetVolumeInformation (pRootPathName As PCTSTR, pVolumeNameBuffer As PTSTR, nVolumeNameSize As DWord, lpVolumeSerialNumber As *Word, lpMaximumComponentLength As *Word, lpFileSystemFlags As *Word, pFileSystemNameBuffer As PTSTR, nFileSystemNameSize As DWord) As BOOL
+Declare Function GetDriveType Lib "kernel32" Alias _FuncName_GetDriveType (lpRootPathName As PCTSTR) As DWord
+
+Declare Function GetEnvironmentVariable Lib "kernel32" Alias _FuncName_GetEnvironmentVariable (lpName As PCTSTR, lpBuffer As PTSTR, nSize As DWord) As DWord
+Declare Function GetEnvironmentStrings Lib "kernel32" Alias _FuncName_GetEnvironmentStrings () As VoidPtr
 Const STILL_ACTIVE = &H00000103
 Declare Function GetExitCodeProcess Lib "kernel32" (hProcess As HANDLE, ByRef lpExitCode As DWord) As BOOL
 Declare Function GetExitCodeThread Lib "kernel32" (hThread As HANDLE, ByRef lpExitCode As DWord) As BOOL
 
-Declare Function GetFileAttributes Lib "kernel32" Alias "GetFileAttributesA" (lpFileName As BytePtr) As DWord
+Declare Function GetFileAttributes Lib "kernel32" Alias _FuncName_GetFileAttributes (lpFileName As PCTSTR) As DWord
 Type BY_HANDLE_FILE_INFORMATION
 	dwFileAttributes As DWord
@@ -621,11 +783,11 @@
 Declare Function GetFileType Lib "kernel32" (hFile As HANDLE) As DWord
 
-Declare Function GetFullPathName Lib "kernel32" Alias "GetFullPathNameA" (lpFileName As PCSTR, nBufferLength As DWord, pBuffer As PSTR, lpFilePart As *DWord) As DWord
+Declare Function GetFullPathName Lib "kernel32" Alias _FuncName_GetFullPathName (lpFileName As PCSTR, nBufferLength As DWord, pBuffer As PSTR, lpFilePart As *DWord) As DWord
 Declare Function GetLastError Lib "kernel32" () As DWord
 Declare Sub GetLocalTime Lib "kernel32" (ByRef lpSystemTime As SYSTEMTIME)
 Declare Function GetLogicalDrives Lib "kernel32" () As DWord
-Declare Function GetLogicalDriveStrings Lib "kernel32" Alias "GetLogicalDriveStringsA" (nBufferLength As DWord, pBuffer As PSTR) As DWord
-Declare Function GetModuleFileName Lib "kernel32" Alias "GetModuleFileNameA" (hModule As HINSTANCE, lpFileName As BytePtr, nSize As DWord) As DWord
-Declare Function GetModuleHandle Lib "kernel32" Alias "GetModuleHandleA" (lpModuleName As BytePtr) As HINSTANCE
+Declare Function GetLogicalDriveStrings Lib "kernel32" Alias _FuncName_GetLogicalDriveStrings (nBufferLength As DWord, pBuffer As PTSTR) As DWord
+Declare Function GetModuleFileName Lib "kernel32" Alias _FuncName_GetModuleFileName (hModule As HINSTANCE, lpFileName As PTSTR, nSize As DWord) As DWord
+Declare Function GetModuleHandle Lib "kernel32" Alias _FuncName_GetModuleHandle (lpModuleName As PTSTR) As HINSTANCE
 Declare Function GetOverlappedResult Lib "kernel32" (
 	hFile As HANDLE,
@@ -642,11 +804,11 @@
 ) As BOOL
 Declare Function GetProcessHeap Lib "kernel32" () As HANDLE
-Declare Function GetShortPathName Lib "kernel32" Alias "GetShortPathNameA" (
-	pszLongPath As PCSTR,
-	pszShortPath As PSTR,
+Declare Function GetShortPathName Lib "kernel32" Alias _FuncName_GetShortPathName (
+	pszLongPath As PCTSTR,
+	pszShortPath As PTSTR,
 	cchBuffer As DWord
 ) As DWord
 
-Declare Sub GetStartupInfo Lib "kernel32" Alias "GetStartupInfoA" (ByRef StartupInfo As STARTUPINFO)
+Declare Sub GetStartupInfo Lib "kernel32" Alias _FuncName_GetStartupInfo (ByRef StartupInfo As STARTUPINFO)
 
 Const STD_INPUT_HANDLE  = -10
@@ -655,5 +817,5 @@
 Declare Function GetStdHandle Lib "kernel32" (nStdHandle As DWord) As HANDLE
 
-Declare Function GetSystemDirectory Lib "kernel32" Alias "GetSystemDirectoryA" (pBuffer As PSTR, uSize As DWord) As DWord
+Declare Function GetSystemDirectory Lib "kernel32" Alias _FuncName_GetSystemDirectory (pBuffer As PTSTR, uSize As DWord) As DWord
 
 Type SYSTEM_INFO
@@ -674,11 +836,11 @@
 Declare Sub GetSystemTimeAsFileTime Lib "kernel32" (ByRef SystemTimeAsFileTime As FILETIME)
 
-Declare Function GetTempFileName Lib "kernel32" Alias "GetTempFileNameA" (
-	pPathName As PCSTR,
-	pPrefixString As PCSTR,
+Declare Function GetTempFileName Lib "kernel32" Alias _FuncName_GetTempFileName (
+	pPathName As PCTSTR,
+	pPrefixString As PCTSTR,
 	uUnique As DWord,
-	pTempFileName As PSTR
+	pTempFileName As PTSTR
 ) As DWord
-Declare Function GetTempPath Lib "kernel32" Alias "GetTempPathA" (nBufferLength As DWord, lpBuffer As PSTR) As DWord
+Declare Function GetTempPath Lib "kernel32" Alias _FuncName_GetTempPath (nBufferLength As DWord, lpBuffer As PTSTR) As DWord
 Declare Function GetThreadContext Lib "kernel32" (hThread As HANDLE, ByRef Context As CONTEXT) As BOOL
 
@@ -705,13 +867,13 @@
 Const TIME_NOTIMEMARKER        = &H00000004
 Const TIME_FORCE24HOURFORMAT   = &H00000008
-Declare Function GetTimeFormat Lib "kernel32" Alias "GetTimeFormatA" (Locale As LCID, dwFlags As DWord, ByRef Time As SYSTEMTIME, lpFormat As BytePtr, lpTimeStr As BytePtr, cchTime As DWord) As BOOL
+Declare Function GetTimeFormat Lib "kernel32" Alias _FuncName_GetTimeFormat (Locale As LCID, dwFlags As DWord, ByRef Time As SYSTEMTIME, lpFormat As PCTSTR, lpTimeStr As PTSTR, cchTime As DWord) As BOOL
 
 Declare Function GetUserDefaultLCID Lib "kernel32" () As LCID
-Declare Function GetUserName Lib "advapi32" Alias "GetUserNameA" (pBuffer As PSTR, ByRef nSize As DWord) As BOOL
+Declare Function GetUserName Lib "advapi32" Alias _FuncName_GetUserName (pBuffer As PTSTR, ByRef nSize As DWord) As BOOL
 
 Const VER_PLATFORM_WIN32s        = 0
 Const VER_PLATFORM_WIN32_WINDOWS = 1
 Const VER_PLATFORM_WIN32_NT      = 2
-Type OSVERSIONINFO
+Type OSVERSIONINFOW
 	dwOSVersionInfoSize As DWord
 	dwMajorVersion As DWord
@@ -719,9 +881,22 @@
 	dwBuildNumber As DWord
 	dwPlatformId As DWord
-	szCSDVersion[127] As Byte
-End Type
-Declare Function GetVersionEx Lib "kernel32" Alias "GetVersionExA" (ByRef VersionInformation As OSVERSIONINFO) As BOOL
-
-Declare Function GetWindowsDirectory Lib "kernel32" Alias "GetWindowsDirectoryA" (pBuffer As PSTR, uSize As DWord) As DWord
+	szCSDVersion[ELM(128)] As WCHAR
+End Type
+Type OSVERSIONINFOA
+	dwOSVersionInfoSize As DWord
+	dwMajorVersion As DWord
+	dwMinorVersion As DWord
+	dwBuildNumber As DWord
+	dwPlatformId As DWord
+	szCSDVersion[ELM(128)] As SByte
+End Type
+#ifdef UNICODE
+TypeDef OSVERSIONINFO = OSVERSIONINFOW
+#else
+TypeDef OSVERSIONINFO = OSVERSIONINFOA
+#endif
+Declare Function GetVersionEx Lib "kernel32" Alias _FuncName_GetVersionEx (ByRef VersionInformation As OSVERSIONINFO) As BOOL
+
+Declare Function GetWindowsDirectory Lib "kernel32" Alias _FuncName_GetWindowsDirectory (pBuffer As PTSTR, uSize As DWord) As DWord
 Declare Function GlobalAlloc Lib "kernel32" (uFlags As DWord, dwBytes As SIZE_T) As HGLOBAL
 Declare Function GlobalFrags Lib "kernel32" (hMem As HGLOBAL) As DWord
@@ -771,5 +946,5 @@
 Const LCMAP_SIMPLIFIED_CHINESE  = &H02000000  ' map traditional chinese to simplified chinese
 Const LCMAP_TRADITIONAL_CHINESE = &H04000000  ' map simplified chinese to traditional chinese
-Declare Function LCMapString Lib "kernel32" Alias "LCMapStringA" (Locale As LCID, dwMapFlags As DWord, lpSrcStr As LPCSTR, cchSrc As Long, lpDestStr As LPSTR, cchDest As Long) As Long
+Declare Function LCMapString Lib "kernel32" Alias _FuncName_LCMapString (Locale As LCID, dwMapFlags As DWord, lpSrcStr As LPCTSTR, cchSrc As Long, lpDestStr As LPTSTR, cchDest As Long) As Long
 
 Declare Sub LeaveCriticalSection Lib "kernel32" (ByRef lpCriticalSection As CRITICAL_SECTION)
@@ -783,5 +958,5 @@
 Declare Function LocalUnlock Lib "kernel32" (hMem As HLOCAL) As BOOL
 Declare Function LockFile Lib "kernel32" (hFile As DWord, dwFileOffsetLow As DWord, dwFileOffsetHigh As DWord, nNumberOfBytesToLockLow As DWord, nNumberOfBytesToLockHigh As DWord) As BOOL
-Declare Function LoadLibrary Lib "kernel32" Alias "LoadLibraryA" (pLibFileName As PCSTR) As HINSTANCE
+Declare Function LoadLibrary Lib "kernel32" Alias _FuncName_LoadLibrary (pLibFileName As PCTSTR) As HINSTANCE
 
 Const DONT_RESOLVE_DLL_REFERENCES   = &h00000001
@@ -789,19 +964,19 @@
 Const LOAD_WITH_ALTERED_SEARCH_PATH = &h00000008
 Const LOAD_IGNORE_CODE_AUTHZ_LEVEL  = &h00000010
-Declare Function LoadLibraryEx Lib "kernel32" Alias "LoadLibraryExA" (pLibFileName As PCSTR, hFile As HANDLE, dwFlags As DWord) As HINSTANCE
-
-Declare Function lstrcat Lib "kernel32" Alias "lstrcatA" (pString1 As PSTR, pString2 As PCSTR) As PSTR
-Declare Function lstrcmp Lib "kernel32" Alias "lstrcmpA" (pString1 As PCSTR, pString2 As PCSTR) As Long
-Declare Function lstrcmpi Lib "kernel32" Alias "lstrcmpiA" (pString1 As PCSTR, pString2 As PCSTR) As Long
+Declare Function LoadLibraryEx Lib "kernel32" Alias _FuncName_LoadLibraryEx (pLibFileName As PCTSTR, hFile As HANDLE, dwFlags As DWord) As HINSTANCE
+
+Declare Function lstrcat Lib "kernel32" Alias _FuncName_lstrcat (pString1 As PTSTR, pString2 As PCTSTR) As PSTR
+Declare Function lstrcmp Lib "kernel32" Alias _FuncName_lstrcmp (pString1 As PCTSTR, pString2 As PCTSTR) As Long
+Declare Function lstrcmpi Lib "kernel32" Alias _FuncName_lstrcmpi (pString1 As PCTSTR, pString2 As PCTSTR) As Long
 Declare Function lstrcpy Lib "kernel32" Alias _FuncName_lstrcpy (pString1 As PTSTR, pString2 As PCTSTR) As PSTR
 Declare Function lstrlenA Lib "kernel32" (pString As PCSTR) As Long
 Declare Function lstrlenW Lib "kernel32" (pString As PCWSTR) As Long
 #ifdef UNICODE
-Declare Function lstrlen Lib "kernel32" Alias "lstrlenW" (pString As PCTSTR) As Long
+Declare Function lstrlen Lib "kernel32" Alias "lstrlenW" (pString As PCWSTR) As Long
 #else
-Declare Function lstrlen Lib "kernel32" Alias "lstrlenA" (pString As PCTSTR) As Long
+Declare Function lstrlen Lib "kernel32" Alias "lstrlenA" (pString As PCSTR) As Long
 #endif
 Declare Sub memcpy Lib "kernel32" Alias "RtlMoveMemory" (pDest As VoidPtr, pSrc As VoidPtr, length As SIZE_T)
-Declare Function MoveFile Lib "kernel32" Alias "MoveFileA" (lpExistingFileName As BytePtr, lpNewFileName As BytePtr) As BOOL
+Declare Function MoveFile Lib "kernel32" Alias _FuncName_MoveFile (lpExistingFileName As LPCTSTR, lpNewFileName As LPCTSTR) As BOOL
 Declare Sub MoveMemory Lib "kernel32" Alias "RtlMoveMemory" (pDest As VoidPtr, pSrc As VoidPtr, length As SIZE_T)
 
@@ -822,7 +997,7 @@
 Declare Function MultiByteToWideChar Lib "kernel32" (CodePage As DWord, dwFlags As DWord, pMultiByteStr As PCSTR, cchMultiByte As Long, pWideCharStr As PWSTR, cchWideChar As Long) As Long
 
-Declare Function OpenEvent Lib "kernel32" Alias "OpenEventA" (dwDesiredAccess As DWord, bInheritHandle As BOOL, pName As PCSTR) As HANDLE
-Declare Function OpenMutex Lib "kernel32" Alias "OpenMutexA" (dwDesiredAccess As DWord, bInheritHandle As BOOL, lpName As LPSTR) As HANDLE
-Declare Function OpenSemaphore Lib "kernel32" Alias "OpenSemaphoreA" (dwDesiredAccess As DWord, bInheritHandle As BOOL, lpName As LPSTR) As HANDLE
+Declare Function OpenEvent Lib "kernel32" Alias _FuncName_OpenEvent (dwDesiredAccess As DWord, bInheritHandle As BOOL, lpName As LPCTSTR) As HANDLE
+Declare Function OpenMutex Lib "kernel32" Alias _FuncName_OpenMutex (dwDesiredAccess As DWord, bInheritHandle As BOOL, lpName As LPCTSTR) As HANDLE
+Declare Function OpenSemaphore Lib "kernel32" Alias _FuncName_OpenSemaphore (dwDesiredAccess As DWord, bInheritHandle As BOOL, lpName As LPCTSTR) As HANDLE
 
 Const PROCESS_TERMINATE =         &H0001
@@ -843,7 +1018,7 @@
 Declare Sub OutputDebugStringW Lib "kernel32" (pOutputString As PCWSTR)
 #ifdef UNICODE
-Declare Sub OutputDebugString Lib "kernel32" Alias "OutputDebugStringW" (pOutputString As PCTSTR)
+Declare Sub OutputDebugString Lib "kernel32" Alias "OutputDebugStringW" (pOutputString As PCWSTR)
 #else
-Declare Sub OutputDebugString Lib "kernel32" Alias "OutputDebugStringA" (pOutputString As PCTSTR)
+Declare Sub OutputDebugString Lib "kernel32" Alias "OutputDebugStringA" (pOutputString As PCSTR)
 #endif
 Declare Function PulseEvent Lib "kernel32" (hEvent As HANDLE) As BOOL
@@ -856,12 +1031,12 @@
 Declare Function ReleaseMutex Lib "kernel32" (hMutex As HANDLE) As BOOL
 Declare Function ReleaseSemaphore Lib "kernel32" (hSemaphore As HANDLE, lReleaseCount As Long, ByRef lpPreviousCount As Long) As BOOL
-Declare Function RemoveDirectory Lib "kernel32" Alias "RemoveDirectoryA" (lpPathName As BytePtr) As BOOL
+Declare Function RemoveDirectory Lib "kernel32" Alias _FuncName_RemoveDirectory (lpPathName As LPCTSTR) As BOOL
 Declare Function ResetEvent Lib "kernel32" (hEvent As HANDLE) As BOOL
 Declare Function ResumeThread Lib "kernel32" (hThread As HANDLE) As DWord
-Declare Function SetComputerName Lib "kernel32" Alias "SetComputerNameA" (lpComputerName As BytePtr) As BOOL
-Declare Function SetCurrentDirectory Lib "kernel32" Alias "SetCurrentDirectoryA" (lpPathName As BytePtr) As BOOL
-Declare Function SearchPath Lib "kernel32" Alias "SearchPathA" (pPath As PCSTR, pFileName As PCSTR, pExtension As PCSTR, BufferLength As DWord, pBuffer As PSTR, ByRef pFilePart As PSTR) As DWord
+Declare Function SetComputerName Lib "kernel32" Alias _FuncName_SetComputerName (lpComputerName As LPCTSTR) As BOOL
+Declare Function SetCurrentDirectory Lib "kernel32" Alias _FuncName_SetCurrentDirectory (lpPathName As LPCTSTR) As BOOL
+Declare Function SearchPath Lib "kernel32" Alias _FuncName_SearchPath (pPath As PCSTR, pFileName As PCTSTR, pExtension As PCTSTR, BufferLength As DWord, pBuffer As PTSTR, ByRef pFilePart As PTSTR) As DWord
 Declare Function SetEndOfFile Lib "kernel32" (hFile As HANDLE) As BOOL
-Declare Function SetEnvironmentVariable Lib "kernel32" Alias "SetEnvironmentVariableA" (lpName As BytePtr, lpValue As BytePtr) As BOOL
+Declare Function SetEnvironmentVariable Lib "kernel32" Alias _FuncName_SetEnvironmentVariable (lpName As LPCTSTR, lpValue As LPTSTR) As BOOL
 
 Const SEM_FAILCRITICALERRORS = &h0001
@@ -871,5 +1046,5 @@
 Declare Function SetErrorMode Lib "kernel32" (uMode As DWord) As DWord
 Declare Function SetEvent Lib "kernel32" (hEvent As HANDLE) As BOOL
-Declare Function SetFileAttributes Lib "kernel32" Alias "SetFileAttributesA" (lpFileName As BytePtr, dwFileAttributes As DWord) As BOOL
+Declare Function SetFileAttributes Lib "kernel32" Alias _FuncName_SetFileAttributes (lpFileName As LPCTSTR, dwFileAttributes As DWord) As BOOL
 
 Const FILE_BEGIN =   0
Index: /Include/api_window.sbp
===================================================================
--- /Include/api_window.sbp	(revision 140)
+++ /Include/api_window.sbp	(revision 141)
@@ -5,10 +5,120 @@
 #define _INC_WINDOW
 
+'-------------
+' Window API Function Names
 #ifdef UNICODE
 Const _FuncName_CreateWindowEx = "CreateWindowExW"
+Const _FuncName_CallWindowProc = "CallWindowProcW"
+Const _FuncName_CharLower = "CharLowerW"
+Const _FuncName_CharUpper = "CharUpperW"
+Const _FuncName_DefWindowProc = "DefWindowProcW"
+Const _FuncName_DispatchMessage = "DispatchMessageW"
+Const _FuncName_DrawText = "DrawTextW"
+Const _FuncName_DrawTextEx = "DrawTextExW"
+Const _FuncName_FindWindow = "FindWindowW"
+Const _FuncName_FindWindowEx = "FindWindowExW"
+Const _FuncName_GetClassInfoEx = "GetClassInfoExW"
+Const _FuncName_GetClassLong = "GetClassLongW"
+Const _FuncName_GetClassLongPtr = "GetClassLongPtrW"
+Const _FuncName_GetClassName = "GetClassNameW"
+Const _FuncName_GetClipboardFormatName = "GetClipboardFormatNameW"
+Const _FuncName_GetDlgItemText = "GetDlgItemTextW"
+Const _FuncName_GetMenuItemInfo = "GetMenuItemInfoW"
+Const _FuncName_GetMessage = "GetMessageW"
+Const _FuncName_GetProp = "GetPropW"
+Const _FuncName_GetWindowLong = "GetWindowLongW"
+Const _FuncName_GetWindowLongPtr = "GetWindowLongPtrW"
+Const _FuncName_GetWindowText = "GetWindowTextW"
+Const _FuncName_GetWindowTextLength = "GetWindowTextLengthW"
+Const _FuncName_InsertMenuItem = "InsertMenuItemW"
+Const _FuncName_IsCharAlpha = "IsCharAlphaW"
+Const _FuncName_IsCharAlphaNumeric = "IsCharAlphaNumericW"
+Const _FuncName_IsCharLower = "IsCharLowerW"
+Const _FuncName_IsCharUpper = "IsCharUpperW"
+Const _FuncName_IsDialogMessage = "IsDialogMessageW"
+Const _FuncName_LoadBitmap = "LoadBitmapW"
+Const _FuncName_LoadCursor = "LoadCursorW"
+Const _FuncName_LoadCursorFromFile = "LoadCursorFromFileW"
+Const _FuncName_LoadIcon = "LoadIconW"
+Const _FuncName_LoadImage = "LoadImageW"
+Const _FuncName_PeekMessage = "PeekMessageW"
+Const _FuncName_PostMessage = "PostMessageW"
+Const _FuncName_PostThreadMessage = "PostThreadMessageW"
 Const _FuncName_RegisterClassEx = "RegisterClassExW"
+Const _FuncName_RegisterClipboardFormat = "RegisterClipboardFormatW"
+Const _FuncName_RegisterWindowMessage = "RegisterWindowMessageW"
+Const _FuncName_RemoveProp = "RemovePropW"
+Const _FuncName_SendDlgItemMessage = "SendDlgItemMessageW"
+Const _FuncName_SendMessage = "SendMessageW"
+Const _FuncName_SendNotifyMessage = "SendNotifyMessageW"
+Const _FuncName_SetDlgItemText = "SetDlgItemTextW"
+Const _FuncName_SetClassLong = "SetClassLongW"
+Const _FuncName_SetClassLong = "SetClassLongW"
+Const _FuncName_SetMenuItemInfo = "SetMenuItemInfoW"
+Const _FuncName_SetProp = "SetPropW"
+Const _FuncName_SetWindowLong = "SetWindowLongW"
+Const _FuncName_SetWindowLongPtr = "SetWindowLongPtrW"
+Const _FuncName_SetWindowText = "SetWindowTextW"
+Const _FuncName_SystemParametersInfo = "SystemParametersInfoW"
+Const _FuncName_UnregisterClass = "UnregisterClassW"
+Const _FuncName_wsprintf = "wsprintfW"
+Const _FuncName_wvsprintf = "wvsprintfW"
 #else
 Const _FuncName_CreateWindowEx = "CreateWindowExA"
+Const _FuncName_CallWindowProc = "CallWindowProcA"
+Const _FuncName_CharLower = "CharLowerA"
+Const _FuncName_CharUpper = "CharUpperA"
+Const _FuncName_DefWindowProc = "DefWindowProcA"
+Const _FuncName_DispatchMessage = "DispatchMessageA"
+Const _FuncName_DrawText = "DrawTextA"
+Const _FuncName_DrawTextEx = "DrawTextExA"
+Const _FuncName_FindWindow = "FindWindowA"
+Const _FuncName_FindWindowEx = "FindWindowExA"
+Const _FuncName_GetClassInfoEx = "GetClassInfoExA"
+Const _FuncName_GetClassLong = "GetClassLongA"
+Const _FuncName_GetClassLongPtr = "GetClassLongPtrA"
+Const _FuncName_GetClassName = "GetClassNameA"
+Const _FuncName_GetClipboardFormatName = "GetClipboardFormatNameA"
+Const _FuncName_GetDlgItemText = "GetDlgItemTextA"
+Const _FuncName_GetMenuItemInfo = "GetMenuItemInfoA"
+Const _FuncName_GetMessage = "GetMessageA"
+Const _FuncName_GetProp = "GetPropA"
+Const _FuncName_GetWindowLong = "GetWindowLongA"
+Const _FuncName_GetWindowLongPtr = "GetWindowLongPtrA"
+Const _FuncName_GetWindowText = "GetWindowTextA"
+Const _FuncName_GetWindowTextLength = "GetWindowTextLengthA"
+Const _FuncName_InsertMenuItem = "InsertMenuItemA"
+Const _FuncName_IsCharAlpha = "IsCharAlphaA"
+Const _FuncName_IsCharAlphaNumeric = "IsCharAlphaNumericA"
+Const _FuncName_IsCharLower = "IsCharLowerA"
+Const _FuncName_IsCharUpper = "IsCharUpperA"
+Const _FuncName_IsDialogMessage = "IsDialogMessageA"
+Const _FuncName_LoadBitmap = "LoadBitmapA"
+Const _FuncName_LoadCursor = "LoadCursorA"
+Const _FuncName_LoadCursorFromFile = "LoadCursorFromFileA"
+Const _FuncName_LoadIcon = "LoadIconA"
+Const _FuncName_LoadImage = "LoadImageA"
+Const _FuncName_PeekMessage = "PeekMessageA"
+Const _FuncName_PostMessage = "PostMessageA"
+Const _FuncName_PostThreadMessage = "PostThreadMessageA"
 Const _FuncName_RegisterClassEx = "RegisterClassExA"
+Const _FuncName_RegisterClipboardFormat = "RegisterClipboardFormatA"
+Const _FuncName_RegisterWindowMessage = "RegisterWindowMessageA"
+Const _FuncName_RemoveProp = "RemovePropA"
+Const _FuncName_SendDlgItemMessage = "SendDlgItemMessageA"
+Const _FuncName_SendMessage = "SendMessageA"
+Const _FuncName_SendNotifyMessage = "SendNotifyMessageA"
+Const _FuncName_SetDlgItemText = "SetDlgItemTextA"
+Const _FuncName_SetClassLong = "SetClassLongA"
+Const _FuncName_SetClassLongPtr = "SetClassLongPtrA"
+Const _FuncName_SetMenuItemInfo = "SetMenuItemInfoA"
+Const _FuncName_SetProp = "SetPropA"
+Const _FuncName_SetWindowLong = "SetWindowLongA"
+Const _FuncName_SetWindowLongPtr = "SetWindowLongPtrA"
+Const _FuncName_SetWindowText = "SetWindowTextA"
+Const _FuncName_SystemParametersInfo = "SystemParametersInfoA"
+Const _FuncName_UnregisterClass = "UnregisterClassA"
+Const _FuncName_wsprintf = "wsprintfA"
+Const _FuncName_wvsprintf = "wvsprintfA"
 #endif
 
@@ -26,5 +136,7 @@
 
 
-Const MAKEINTRESOURCE(i) = i As PCSTR
+Const MAKEINTRESOURCEW(i) = i As PCWSTR
+Const MAKEINTRESOURCEA(i) = i As PCSTR
+Const MAKEINTRESOURCE(i) = i As PCTSTR
 
 TypeDef WNDENUMPROC = *Function(ByVal hwnd As HWND, ByVal lParam As LPARAM) As BOOL
@@ -152,5 +264,18 @@
 Const MFT_RIGHTJUSTIFY =  MF_RIGHTJUSTIFY
 
-Type MENUITEMINFO
+Type MENUITEMINFOW
+	cbSize        As DWord
+	fMask         As DWord
+	fType         As DWord
+	fState        As DWord
+	wID           As DWord
+	hSubMenu      As HMENU
+	hbmpChecked   As HBITMAP
+	hbmpUnchecked As HBITMAP
+	dwItemData    As ULONG_PTR
+	dwTypeData    As LPWSTR
+	cch           As DWord
+End Type
+Type MENUITEMINFOA
 	cbSize        As DWord
 	fMask         As DWord
@@ -165,5 +290,9 @@
 	cch           As DWord
 End Type
-
+#ifdef UNICODE
+TypeDef MENUITEMINFO = MENUITEMINFOW
+#else
+TypeDef MENUITEMINFO = MENUITEMINFOA
+#endif
 
 '------------
@@ -226,60 +355,4 @@
 
 '-------------
-' Window API Function Names
-
-/*
-CreateWindowEx
-CallWindowProc
-DefWindowProc
-DispatchMessage
-DrawText
-DrawTextEx
-FindWindow
-FindWindowEx
-GetClassInfoEx
-GetClassLong
-GetClassLongPtr
-GetClassName
-GetClipboardFormatName
-GetDlgItemText
-GetMenuItemInfo
-GetMessage
-GetWindowLong
-GetWindowLongPtr
-GetWindowText
-GetWindowTextLength
-InsertMenuItem
-IsCharAlpha
-IsCharAlphaNumeric
-IsDialogMessage
-LoadBitmap
-LoadCursor
-LoadCursorFromFile
-LoadIcon
-LoadImage
-PeekMessage
-PostMessage
-PostThreadMessage
-RegisterClassEx
-RegisterClipboardFormat
-RegisterWindowMessage
-RemoveProp
-SendDlgItemMessage
-SendMessage
-SendNotifyMessage
-SetDlgItemText
-SetClassLong
-SetClassLong
-SetMenuItemInfo
-SetWindowLong
-SetWindowLongPtr
-SetWindowText
-SystemParametersInfo
-UnregisterClass
-wsprintf
-wvsprintf
-*/
-
-'-------------
 ' Window API
 
@@ -295,12 +368,12 @@
 	fRestore As BOOL
 	fIncUpdate As BOOL
-	rgbReserved(31) As Byte
+	rgbReserved[ELM(32)] As Byte
 End Type
 Declare Function BeginPaint Lib "user32" (hWnd As HWND, ByRef Paint As PAINTSTRUCT) As HDC
 
 Declare Function BringWindowToTop Lib "user32" (hWnd As HWND) As Long
-Declare Function CallWindowProc Lib "user32" Alias "CallWindowProcA" (lpPrevWndFunc As WNDPROC, hWnd As HWND, Msg As DWord, wParam As WPARAM, lParam As LPARAM) As LRESULT
-Declare Function CharLower Lib "user32" Alias "CharLowerA" (lpsz As BytePtr) As DWord
-Declare Function CharUpper Lib "user32" Alias "CharUpperA" (lpsz As BytePtr) As DWord
+Declare Function CallWindowProc Lib "user32" Alias _FuncName_CallWindowProc (lpPrevWndFunc As WNDPROC, hWnd As HWND, Msg As DWord, wParam As WPARAM, lParam As LPARAM) As LRESULT
+Declare Function CharLower Lib "user32" Alias _FuncName_CharLower (psz As PTSTR) As DWord
+Declare Function CharUpper Lib "user32" Alias _FuncName_CharUpper (psz As PTSTR) As DWord
 Declare Function CheckMenuItem Lib "user32" (hMenu As HMENU, uIDCheckItem As DWord, uCheck As DWord) As DWord
 Declare Function CheckMenuRadioItem Lib "user32" (hMenu As HMENU, idFirst As DWord, idLast As DWord, idCheck As DWord, uFlags As DWord) As BOOL
@@ -338,5 +411,5 @@
 Declare Function CreateWindowEx Lib "user32" Alias _FuncName_CreateWindowEx (dwExStyle As DWord, pClassName As PCTSTR, lpWindowName As PCTSTR, dwStyle As DWord, x As Long, y As Long, nWidth As Long, nHeight As Long, hwndParent As HWND, hmenu As HMENU, hInstance As HINSTANCE, pParm As VoidPtr) As HWND
 
-Declare Function DefWindowProc Lib "user32" Alias "DefWindowProcA" (hWnd As HWND, wMsg As DWord, wParam As WPARAM, lParam As LPARAM) As LRESULT
+Declare Function DefWindowProc Lib "user32" Alias _FuncName_DefWindowProc (hWnd As HWND, wMsg As DWord, wParam As WPARAM, lParam As LPARAM) As LRESULT
 Declare Function DeleteMenu Lib "user32" (hMenu As HMENU, uPosition As DWord, uFlags As DWord) As BOOL
 Declare Function DestroyCaret Lib "user32" () As BOOL
@@ -345,5 +418,5 @@
 Declare Function DestroyMenu Lib "user32" (hMenu As HMENU) As BOOL
 Declare Function DestroyWindow Lib "user32" (hWnd As HWND) As BOOL
-Declare Function DispatchMessage Lib "user32" Alias "DispatchMessageA" (ByRef lpMsg As MSG) As LRESULT
+Declare Function DispatchMessage Lib "user32" Alias _FuncName_DispatchMessage (ByRef Msg As MSG) As LRESULT
 
 Const BDR_RAISEDOUTER = &H0001
@@ -447,5 +520,5 @@
 Const DT_RTLREADING =     &H00020000
 Const DT_WORD_ELLIPSIS =  &H00040000
-Declare Function DrawText Lib "user32" Alias "DrawTextA" (hdc As HDC, lpStr As PCSTR, nCount As Long, ByRef lpRect As RECT, dwFormat As DWord) As BOOL
+Declare Function DrawText Lib "user32" Alias _FuncName_DrawText (hdc As HDC, lpStr As PCTSTR, nCount As Long, ByRef Rect As RECT, dwFormat As DWord) As BOOL
 
 Type DRAWTEXTPARAMS
@@ -456,5 +529,5 @@
 	uiLengthDrawn As DWord
 End Type
-Declare Function DrawTextEx Lib "user32" Alias "DrawTextExA" (hdc As HDC, lpchText As PCSTR, cchText As Long, ByRef lpRect As RECT, dwDTFormat As DWord, ByRef lpDTParams As DRAWTEXTPARAMS) As BOOL
+Declare Function DrawTextEx Lib "user32" Alias _FuncName_DrawTextEx (hdc As HDC, pchText As PCTSTR, cchText As Long, ByRef Rect As RECT, dwDTFormat As DWord, ByRef DTParams As DRAWTEXTPARAMS) As BOOL
 
 Declare Function EmptyClipboard Lib "user32" () As BOOL
@@ -478,6 +551,6 @@
 Declare Function EnumWindows Lib "user32" (pEnumFunc As WNDENUMPROC, lParam As LPARAM) As BOOL
 Declare Function FillRect Lib "user32" (hdc As HDC, ByRef lpRect As RECT, hBrush As HBRUSH) As BOOL
-Declare Function FindWindow Lib "user32" Alias "FindWindowA" (lpClassName As PCSTR, lpWindowName As PCSTR) As HWND
-Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (hwndParent As HWND, hwndChildAfter As HWND, pszClass As PCSTR, pszWindow As PCSTR) As HWND
+Declare Function FindWindow Lib "user32" Alias _FuncName_FindWindow (pClassName As PCTSTR, lpWindowName As PCTSTR) As HWND
+Declare Function FindWindowEx Lib "user32" Alias _FuncName_FindWindowEx (hwndParent As HWND, hwndChildAfter As HWND, pszClass As PCTSTR, pszWindow As PCTSTR) As HWND
 Declare Function FlashWindow Lib "user32" (hWnd As HWND, bInvert As BOOL) As BOOL
 Declare Function FrameRect Lib "user32" (hdc As HDC, ByRef lpRect As RECT, hBrush As HBRUSH) As Long
@@ -486,5 +559,5 @@
 Declare Function GetCapture Lib "user32" () As HWND
 Declare Function GetCaretPos Lib "user32" (ByRef lpPoint As POINTAPI) As BOOL
-Declare Function GetClassInfoEx Lib "user32" Alias "GetClassInfoExA" (hInst As HINSTANCE, lpszClass As PCSTR, ByRef lpwcx As WNDCLASSEX) As BOOL
+Declare Function GetClassInfoEx Lib "user32" Alias _FuncName_GetClassInfoEx (hInst As HINSTANCE, pszClass As PCTSTR, ByRef lpwcx As WNDCLASSEX) As BOOL
 
 Const GCL_MENUNAME =      -8
@@ -500,15 +573,15 @@
 Const GCL_HICONSM =       -34
 #ifdef _WIN64
-Declare Function GetClassLong Lib "user32" Alias "GetClassLongPtrA" (hWnd As HWND, nIndex As Long) As LONG_PTR
-Declare Function GetClassLongPtr Lib "user32" Alias "GetClassLongPtrA" (hWnd As HWND, nIndex As Long) As LONG_PTR
+Declare Function GetClassLong Lib "user32" Alias _FuncName_GetClassLongPtr (hWnd As HWND, nIndex As Long) As LONG_PTR
+Declare Function GetClassLongPtr Lib "user32" Alias _FuncName_GetClassLongPtr (hWnd As HWND, nIndex As Long) As LONG_PTR
 #else
-Declare Function GetClassLong Lib "user32" Alias "GetClassLongA" (hWnd As HWND, nIndex As Long) As LONG_PTR
-Declare Function GetClassLongPtr Lib "user32" Alias "GetClassLongA" (hWnd As HWND, nIndex As Long) As LONG_PTR
+Declare Function GetClassLong Lib "user32" Alias _FuncName_GetClassLong (hWnd As HWND, nIndex As Long) As LONG_PTR
+Declare Function GetClassLongPtr Lib "user32" Alias _FuncName_GetClassLong (hWnd As HWND, nIndex As Long) As LONG_PTR
 #endif
 
-Declare Function GetClassName Lib "user32" Alias "GetClassNameA" (hWnd As HWND, lpClassName As PSTR, nMaxCount As Long) As Long
+Declare Function GetClassName Lib "user32" Alias _FuncName_GetClassName (hWnd As HWND, lpClassName As PTSTR, nMaxCount As Long) As Long
 Declare Function GetClientRect Lib "user32" (hWnd As HWND, ByRef lpRect As RECT) As BOOL
 Declare Function GetClipboardData Lib "user32" (uFormat As DWord) As HANDLE
-Declare Function GetClipboardFormatName Lib "user32" Alias "GetClipboardFormatNameA" (uFormat As DWord, lpszFormatName As BytePtr, cchMaxCount As Long) As BOOL
+Declare Function GetClipboardFormatName Lib "user32" Alias _FuncName_GetClipboardFormatName (uFormat As DWord, pszFormatName As PTSTR, cchMaxCount As Long) As BOOL
 Declare Function GetClipCursor Lib "user32" (ByRef lpRect As RECT) As BOOL
 Declare Function GetCursor Lib "user32" () As HCURSOR
@@ -533,5 +606,5 @@
 Declare Function GetDlgCtrlID Lib "user32" (hWnd As HWND) As Long
 Declare Function GetDlgItem Lib "user32" (hDlg As HWND, nIDDlgItem As Long) As HWND
-Declare Function GetDlgItemText Lib "user32" Alias "GetDlgItemTextA" (hDlg As HWND, nIDDlgItem As Long, lpString As PSTR, nMaxCount As Long) As Long
+Declare Function GetDlgItemText Lib "user32" Alias _FuncName_GetDlgItemText (hDlg As HWND, nIDDlgItem As Long, pString As PTSTR, nMaxCount As Long) As Long
 Declare Function GetDoubleClickTime Lib "user32" () As DWord
 Declare Function GetFocus Lib "user32" () As HWND
@@ -549,8 +622,8 @@
 Declare Function GetMenuItemID Lib "user32" (hMenu As HMENU, nPos As Long) As DWord
 Declare Function GetMenuItemCount Lib "user32" (hMenu As HMENU) As Long
-Declare Function GetMenuItemInfo Lib "user32" Alias "GetMenuItemInfoA" (hMenu As HMENU, uItem As DWord, fByPosition As DWord, ByRef lpmii As MENUITEMINFO) As BOOL
-Declare Function GetMessage Lib "user32" Alias "GetMessageA" (ByRef lpMsg As MSG, hWnd As HWND, wMsgFilterMin As DWord, wMsgFilterMax As DWord) As Long
+Declare Function GetMenuItemInfo Lib "user32" Alias _FuncName_GetMenuItemInfo (hMenu As HMENU, uItem As DWord, fByPosition As DWord, ByRef mii As MENUITEMINFO) As BOOL
+Declare Function GetMessage Lib "user32" Alias _FuncName_GetMessage (ByRef Msg As MSG, hWnd As HWND, wMsgFilterMin As DWord, wMsgFilterMax As DWord) As Long
 Declare Function GetParent Lib "user32" (hWnd As HWND) As HWND
-Declare Function GetProp Lib "user32" Alias "GetPropA" (hWnd As HWND, pString As PCSTR) As HANDLE
+Declare Function GetProp Lib "user32" Alias _FuncName_GetProp (hWnd As HWND, pString As PCTSTR) As HANDLE
 Declare Function GetScrollInfo Lib "user32" (hWnd As HWND, fnBar As Long, ByRef lpsi As SCROLLINFO) As BOOL
 Declare Function GetSubMenu Lib "user32" (hMenu As HMENU, nPos As Long) As HMENU
@@ -708,9 +781,9 @@
 
 #ifdef _WIN64
-Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongPtrA" (hWnd As HWND, nIndex As Long) As LONG_PTR
-Declare Function GetWindowLongPtr Lib "user32" Alias "GetWindowLongPtrA" (hWnd As HWND, nIndex As Long) As LONG_PTR
+Declare Function GetWindowLong Lib "user32" Alias _FuncName_GetWindowLongPtr (hWnd As HWND, nIndex As Long) As LONG_PTR
+Declare Function GetWindowLongPtr Lib "user32" Alias _FuncName_GetWindowLongPtr (hWnd As HWND, nIndex As Long) As LONG_PTR
 #else
-Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (hWnd As HWND, nIndex As Long) As LONG_PTR
-Declare Function GetWindowLongPtr Lib "user32" Alias "GetWindowLongA" (hWnd As HWND, nIndex As Long) As LONG_PTR
+Declare Function GetWindowLong Lib "user32" Alias _FuncName_GetWindowLong (hWnd As HWND, nIndex As Long) As LONG_PTR
+Declare Function GetWindowLongPtr Lib "user32" Alias _FuncName_GetWindowLong (hWnd As HWND, nIndex As Long) As LONG_PTR
 #endif
 
@@ -729,18 +802,18 @@
 Declare Function GetWindowRect Lib "user32" (hWnd As HWND, ByRef lpRect As RECT) As BOOL
 Declare Function GetWindowRgn Lib "user32" (hWnd As HWND, hRgn As HRGN) As Long
-Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (hWnd As HWND, lpString As PSTR, nMaxCount As Long) As Long
-Declare Function GetWindowTextLength Lib "user32" Alias "GetWindowTextLengthA" (hWnd As HWND) As Long
-Declare Function GetWindowThreadProcessId Lib "user32" (hWnd As HWND, lpdwProcessId As DWordPtr) As DWord
+Declare Function GetWindowText Lib "user32" Alias _FuncName_GetWindowText (hWnd As HWND, lpString As PTSTR, nMaxCount As Long) As Long
+Declare Function GetWindowTextLength Lib "user32" Alias _FuncName_GetWindowTextLength (hWnd As HWND) As Long
+Declare Function GetWindowThreadProcessId Lib "user32" (hWnd As HWND, pdwProcessId As *DWord) As DWord
 Declare Function HideCaret Lib "user32" (hWnd As HWND) As BOOL
-Declare Function InsertMenuItem Lib "user32" Alias "InsertMenuItemA" (hMenu As HMENU, uItem As DWord, fByPosition As BOOL, ByRef lpmii As MENUITEMINFO) As BOOL
-Declare Function InvalidateRect Lib "user32" (hWnd As HWND, ByRef lpRect As RECT, bErase As BOOL) As BOOL
+Declare Function InsertMenuItem Lib "user32" Alias _FuncName_InsertMenuItem (hMenu As HMENU, uItem As DWord, fByPosition As BOOL, ByRef mii As MENUITEMINFO) As BOOL
+Declare Function InvalidateRect Lib "user32" (hWnd As HWND, ByRef Rect As RECT, bErase As BOOL) As BOOL
 Declare Function InvalidateRgn Lib "user32" (hWnd As HWND, hRgn As HRGN, bErase As BOOL) As BOOL
 Declare Function InvertRect Lib "user32" (hdc As HDC, ByRef lpRect As RECT) As BOOL
-Declare Function IsCharAlpha Lib "user32" Alias "IsCharAlphaA" (ch As Byte) As BOOL
-Declare Function IsCharAlphaNumeric Lib "user32" Alias "IsCharAlphaNumericA" (ch As Byte) As BOOL
-Declare Function IsCharLower Lib "user32" Alias "IsCharLowerA" (ch As Byte) As BOOL
-Declare Function IsCharUpper Lib "user32" Alias "IsCharUpperA" (ch As Byte) As BOOL
+Declare Function IsCharAlpha Lib "user32" Alias _FuncName_IsCharAlpha (ch As TCHAR) As BOOL
+Declare Function IsCharAlphaNumeric Lib "user32" Alias _FuncName_IsCharAlphaNumeric (ch As TCHAR) As BOOL
+Declare Function IsCharLower Lib "user32" Alias _FuncName_IsCharLower (ch As TCHAR) As BOOL
+Declare Function IsCharUpper Lib "user32" Alias _FuncName_IsCharUpper (ch As TCHAR) As BOOL
 Declare Function IsChild Lib "user32" (hWndParent As HWND, hWnd As HWND) As BOOL
-Declare Function IsDialogMessage Lib "user32" Alias "IsDialogMessageA" (hDlg As HWND, ByRef ref_msg As MSG) As BOOL
+Declare Function IsDialogMessage Lib "user32" Alias _FuncName_IsDialogMessage (hDlg As HWND, ByRef msg As MSG) As BOOL
 Declare Function IsIconic Lib "user32" (hWnd As HWND) As BOOL
 Declare Function IsWindow Lib "user32" (hWnd As HWND) As BOOL
@@ -755,5 +828,5 @@
 
 Declare Function KillTimer Lib "user32" (hWnd As HWND, nIDEvent As ULONG_PTR) As BOOL
-Declare Function LoadBitmap Lib "user32" Alias "LoadBitmapA" (hInst As HINSTANCE, lpBitmapName As PCSTR) As HBITMAP
+Declare Function LoadBitmap Lib "user32" Alias _FuncName_LoadBitmap (hInst As HINSTANCE, pBitmapName As PCTSTR) As HBITMAP
 
 Const IDC_ARROW =         32512
@@ -773,7 +846,7 @@
 Const IDC_APPSTARTING =   32650
 Const IDC_HELP =          32651
-Declare Function LoadCursor Lib "user32" Alias "LoadCursorA" (hInst As HINSTANCE, lpCursorName As PCSTR) As HCURSOR
-
-Declare Function LoadCursorFromFile Lib "user32" Alias "LoadCursorFromFileA" (lpFileName As PCSTR) As HCURSOR
+Declare Function LoadCursor Lib "user32" Alias _FuncName_LoadCursor (hInst As HINSTANCE, pCursorName As PCTSTR) As HCURSOR
+
+Declare Function LoadCursorFromFile Lib "user32" Alias _FuncName_LoadCursorFromFile (pFileName As PCTSTR) As HCURSOR
 
 Const IDI_APPLICATION =   32512
@@ -783,5 +856,5 @@
 Const IDI_ASTERISK =      32516
 Const IDI_WINLOGO =       32517
-Declare Function LoadIcon Lib "user32" Alias "LoadIconA" (hInst As HINSTANCE, lpIconName As PCSTR) As HICON
+Declare Function LoadIcon Lib "user32" Alias _FuncName_LoadIcon (hInst As HINSTANCE, pIconName As PCTSTR) As HICON
 
 Const IMAGE_BITMAP =      0
@@ -802,5 +875,5 @@
 Const LR_COPYFROMRESOURCE = &H4000
 Const LR_SHARED =           &H8000
-Declare Function LoadImage Lib "user32" Alias "LoadImageA" (hInst As HINSTANCE, lpszName As PCSTR, dwImageType As DWord, cxDesired As Long, cyDesired As Long, dwFlags As DWord) As HANDLE
+Declare Function LoadImage Lib "user32" Alias _FuncName_LoadImage (hinst As HINSTANCE, pszName As PCTSTR, dwImageType As DWord, cxDesired As Long, cyDesired As Long, dwFlags As DWord) As HANDLE
 
 Declare Function LockWindowUpdate Lib "user32" (hWnd As HWND) As BOOL
@@ -842,7 +915,7 @@
 Const MB_RTLREADING =             &H00100000
 #ifdef UNICODE
-Declare Function MessageBox Lib "user32" Alias "MessageBoxW" (hWnd As HWND, pText As PCWSTR, pCaption As PCWSTR, uType As DWord) As Long
+Declare Function MessageBox Lib "user32" Alias "MessageBoxW" (hwnd As HWND, pText As PCWSTR, pCaption As PCWSTR, uType As DWord) As Long
 #else
-Declare Function MessageBox Lib "user32" Alias "MessageBoxA" (hWnd As HWND, pText As PCSTR, pCaption As PCSTR, uType As DWord) As Long
+Declare Function MessageBox Lib "user32" Alias "MessageBoxA" (hwnd As HWND, pText As PCSTR, pCaption As PCSTR, uType As DWord) As Long
 #endif
 Declare Function MessageBoxW Lib "user32" (hWnd As HWND, pText As PCWSTR, pCaption As PCWSTR, uType As DWord) As Long
@@ -865,11 +938,11 @@
 Const PM_NOREMOVE = &H0000
 Const PM_REMOVE =   &H0001
-Declare Function PeekMessage Lib "user32" Alias "PeekMessageA" (ByRef lpMsg As MSG, hWnd As HWND, wMsgFilterMin As DWord, wMsgFilterMax As DWord, wRemoveMsg As DWord) As BOOL
+Declare Function PeekMessage Lib "user32" Alias _FuncName_PeekMessage (ByRef Msg As MSG, hWnd As HWND, wMsgFilterMin As DWord, wMsgFilterMax As DWord, wRemoveMsg As DWord) As BOOL
 
 Const HWND_BROADCAST = &HFFFF
-Declare Function PostMessage Lib "user32" Alias "PostMessageA" (hWnd As HWND, wMsg As DWord, wParam As WPARAM, lParam As LPARAM) As BOOL
+Declare Function PostMessage Lib "user32" Alias _FuncName_PostMessage (hWnd As HWND, wMsg As DWord, wParam As WPARAM, lParam As LPARAM) As BOOL
 
 Declare Sub PostQuitMessage Lib "user32" (nExitCode As Long)
-Declare Function PostThreadMessage Lib "user32" Alias "PostThreadMessageA" (idThread As DWord, Msg As DWord, wParam As WPARAM, lParam As LPARAM) As BOOL
+Declare Function PostThreadMessage Lib "user32" Alias _FuncName_PostThreadMessage (idThread As DWord, Msg As DWord, wParam As WPARAM, lParam As LPARAM) As BOOL
 
 Const RDW_INVALIDATE =        &H0001
@@ -888,10 +961,10 @@
 
 Declare Function RegisterClassEx Lib "user32" Alias _FuncName_RegisterClassEx (ByRef wcx As WNDCLASSEX) As ATOM
-Declare Function RegisterClipboardFormat Lib "user32" Alias "RegisterClipboardFormatA" (lpszFormat As PCSTR) As DWord
-Declare Function RegisterWindowMessage Lib "user32" Alias "RegisterWindowMessageA" (lpString As PCSTR) As DWord
+Declare Function RegisterClipboardFormat Lib "user32" Alias _FuncName_RegisterClipboardFormat (pszFormat As PCTSTR) As DWord
+Declare Function RegisterWindowMessage Lib "user32" Alias _FuncName_RegisterWindowMessage (pString As PCTSTR) As DWord
 Declare Function ReleaseCapture Lib "user32" () As BOOL
 Declare Function ReleaseDC Lib "user32" (hWnd As HWND, hdc As HDC) As BOOL
 Declare Function RemoveMenu Lib "user32" (hMenu As HMENU, uPosition As DWord, uFlags As DWord) As BOOL
-Declare Function RemoveProp Lib "user32" Alias "RemovePropA" (hWnd As HWND, lpString As PCSTR) As HANDLE
+Declare Function RemoveProp Lib "user32" Alias _FuncName_RemoveProp (hWnd As HWND, pString As PCTSTR) As HANDLE
 Declare Function TranslateMessage Lib "user32" (ByRef lpMsg As MSG) As Long
 Declare Function ScreenToClient Lib "user32" (hWnd As HWND, ByRef lpPoint As POINTAPI) As BOOL
@@ -903,18 +976,18 @@
 Declare Function ScrollWindowEx Lib "user32" (hWnd As HWND, dx As Long, dy As Long, ByRef rcScroll As RECT, ByRef rcClip As RECT, hrgnUpdate As HRGN, ByRef rcUpdate As RECT, flags As DWord) As BOOL
 
-Declare Function SendDlgItemMessage Lib "user32" Alias "SendDlgItemMessageA" (hDlg As HWND, nIDDlgItem As Long, Msg As DWord, wParam As WPARAM, lParam As LPARAM) As LRESULT
-Declare Function SendMessage Lib "user32" Alias "SendMessageA" (hWnd As HWND, wMsg As DWord, wParam As WPARAM, lParam As LPARAM) As LRESULT
-Declare Function SendNotifyMessage Lib "user32" Alias "SendNotifyMessageA" (hWnd As HWND, wMsg As DWord, wParam As WPARAM, lParam As LPARAM) As LRESULT
+Declare Function SendDlgItemMessage Lib "user32" Alias _FuncName_SendDlgItemMessage (hDlg As HWND, nIDDlgItem As Long, Msg As DWord, wParam As WPARAM, lParam As LPARAM) As LRESULT
+Declare Function SendMessage Lib "user32" Alias _FuncName_SendMessage (hWnd As HWND, wMsg As DWord, wParam As WPARAM, lParam As LPARAM) As LRESULT
+Declare Function SendNotifyMessage Lib "user32" Alias _FuncName_SendNotifyMessage (hWnd As HWND, wMsg As DWord, wParam As WPARAM, lParam As LPARAM) As LRESULT
 Declare Function SetActiveWindow Lib "user32" (hWnd As HWND) As HWND
-Declare Function SetDlgItemText Lib "user32" Alias "SetDlgItemTextA" (hDlg As HWND, nIDDlgItem As Long, lpString As PCSTR) As BOOL
+Declare Function SetDlgItemText Lib "user32" Alias _FuncName_SetDlgItemText (hDlg As HWND, nIDDlgItem As Long, lpString As PCTSTR) As BOOL
 Declare Function SetCapture Lib "user32" (hWnd As HWND) As HWND
 Declare Function SetCaretPos Lib "user32" (x As Long, y As Long) As BOOL
 
 #ifdef _WIN64
-Declare Function SetClassLong Lib "user32" Alias "SetClassLongPtrA" (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
-Declare Function SetClassLongPtr Lib "user32" Alias "SetClassLongPtrA" (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
+Declare Function SetClassLong Lib "user32" Alias _FuncName_SetClassLongPtr (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
+Declare Function SetClassLongPtr Lib "user32" Alias _FuncName_SetClassLongPtr (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
 #else
-Declare Function SetClassLong Lib "user32" Alias "SetClassLongA" (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
-Declare Function SetClassLongPtr Lib "user32" Alias "SetClassLongA" (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
+Declare Function SetClassLong Lib "user32" Alias _FuncName_SetClassLong (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
+Declare Function SetClassLongPtr Lib "user32" Alias _FuncName_SetClassLong (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
 #endif
 
@@ -929,7 +1002,7 @@
 Declare Function SetMenuContextHelpId Lib "user32" (hmenu As HMENU, dwContextHelpId As DWord) As BOOL
 Declare Function SetMenuDefaultItem Lib "user32" (hMenu As HMENU, uItem As DWord, fByPos As DWord) As BOOL
-Declare Function SetMenuItemInfo Lib "user32" Alias "SetMenuItemInfoA" (hMenu As HMENU, uItem As DWord, fByPosition As BOOL, ByRef lpmii As MENUITEMINFO) As BOOL
+Declare Function SetMenuItemInfo Lib "user32" Alias _FuncName_SetMenuItemInfo (hMenu As HMENU, uItem As DWord, fByPosition As BOOL, ByRef mii As MENUITEMINFO) As BOOL
 Declare Function SetParent Lib "user32" (hWndChild As HWND, hWndNewParent As HWND) As HWND
-Declare Function SetProp Lib "user32" Alias "SetPropA" (hWnd As HWND, pString As PCSTR, hData As HANDLE) As BOOL
+Declare Function SetProp Lib "user32" Alias _FuncName_SetProp (hWnd As HWND, pString As PCTSTR, hData As HANDLE) As BOOL
 Declare Function SetScrollInfo Lib "user32" (hWnd As HWND, fnBar As Long, ByRef lpsi As SCROLLINFO, bRedraw As Long) As BOOL
 Declare Function SetSysColors Lib "user32" (cElements As Long, lpaElements As *DWord, lpaRgbValues As *DWord) As BOOL
@@ -941,9 +1014,9 @@
 
 #ifdef _WIN64
-Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongPtrA" (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
-Declare Function SetWindowLongPtr Lib "user32" Alias "SetWindowLongPtrA" (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
+Declare Function SetWindowLong Lib "user32" Alias _FuncName_SetWindowLongPtr (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
+Declare Function SetWindowLongPtr Lib "user32" Alias _FuncName_SetWindowLongPtr (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
 #else
-Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
-Declare Function SetWindowLongPtr Lib "user32" Alias "SetWindowLongA" (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
+Declare Function SetWindowLong Lib "user32" Alias _FuncName_SetWindowLong (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
+Declare Function SetWindowLongPtr Lib "user32" Alias _FuncName_SetWindowLong (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
 #endif
 
@@ -972,5 +1045,5 @@
 
 Declare Function SetWindowRgn Lib "user32" (hWnd As HWND, hRgn As HRGN, bRedraw As BOOL) As BOOL
-Declare Function SetWindowText Lib "user32" Alias "SetWindowTextA" (hWnd As HWND, pString As PCSTR) As BOOL
+Declare Function SetWindowText Lib "user32" Alias _FuncName_SetWindowText (hWnd As HWND, pString As PCTSTR) As BOOL
 Declare Function ShowCaret Lib "user32" (hWnd As HWND) As BOOL
 Declare Function ShowCursor Lib "user32" (bShow As Long) As BOOL
@@ -995,5 +1068,5 @@
 Declare Function ShowWindowAsync Lib "user32" (hWnd As HWND, nCmdShow As Long) As BOOL
 
-Type NONCLIENTMETRICS
+Type NONCLIENTMETRICSW
 	cbSize As DWord
 	iBorderWidth As Long
@@ -1002,14 +1075,36 @@
 	iCaptionWidth As Long
 	iCaptionHeight As Long
-	lfCaptionFont As LOGFONT
+	lfCaptionFont As LOGFONTW
 	iSmCaptionWidth As Long
 	iSmCaptionHeight As Long
-	lfSmCaptionFont As LOGFONT
+	lfSmCaptionFont As LOGFONTW
 	iMenuWidth As Long
 	iMenuHeight As Long
-	lfMenuFont As LOGFONT
-	lfStatusFont As LOGFONT
-	lfMessageFont As LOGFONT
+	lfMenuFont As LOGFONTW
+	lfStatusFont As LOGFONTW
+	lfMessageFont As LOGFONTW
 End Type
+Type NONCLIENTMETRICSA
+	cbSize As DWord
+	iBorderWidth As Long
+	iScrollWidth As Long
+	iScrollHeight As Long
+	iCaptionWidth As Long
+	iCaptionHeight As Long
+	lfCaptionFont As LOGFONTA
+	iSmCaptionWidth As Long
+	iSmCaptionHeight As Long
+	lfSmCaptionFont As LOGFONTA
+	iMenuWidth As Long
+	iMenuHeight As Long
+	lfMenuFont As LOGFONTA
+	lfStatusFont As LOGFONTA
+	lfMessageFont As LOGFONTA
+End Type
+#ifdef
+TypeDef NONCLIENTMETRICS = NONCLIENTMETRICSW
+#else
+TypeDef NONCLIENTMETRICS = NONCLIENTMETRICSA
+#endif
 Const SPI_GETBEEP =               1
 Const SPI_SETBEEP =               2
@@ -1141,5 +1236,5 @@
 Const SPIF_SENDWININICHANGE = &H0002
 Const SPIF_SENDCHANGE =       SPIF_SENDWININICHANGE
-Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" (uiAction As DWord, uiParam As DWord, pvParam As VoidPtr, fWinIni As DWord) As BOOL
+Declare Function SystemParametersInfo Lib "user32" Alias _FuncName_SystemParametersInfo (uiAction As DWord, uiParam As DWord, pvParam As VoidPtr, fWinIni As DWord) As BOOL
 
 Const TME_HOVER       = &H00000001
@@ -1172,5 +1267,5 @@
 Declare Function TrackPopupMenu Lib "user32" (hMenu As HMENU, uFlags As DWord, x As Long, y As Long, nReserved As Long, hWnd As HWND, ByRef prcRect As RECT) As BOOL
 
-Declare Function UnregisterClass Lib "user32" Alias "UnregisterClassA" (lpClassName As BytePtr, hInst As HINSTANCE) As BOOL
+Declare Function UnregisterClass Lib "user32" Alias _FuncName_UnregisterClass (pClassName As PCTSTR, hinst As HINSTANCE) As BOOL
 Declare Function UpdateWindow Lib "user32" (hWnd As HWND) As BOOL
 Declare Function ValidateRect Lib "user32" (hWnd As HWND, ByRef lpRect As RECT) As BOOL
@@ -1181,6 +1276,6 @@
 Declare Function WindowFromDC Lib "user32" (hDC As HDC) As HWND
 Declare Function WindowFromPoint Lib "user32" (ptX As Long, ptY As Long) As HWND
-Declare Function wsprintf cdecl Lib "user32" Alias "wsprintfA" (pText As PSTR, pFormat As PCSTR, ...) As Long
-Declare Function wvsprintf Lib "user32" Alias "wvsprintfA" (pOutput As PSTR, pFormat As PCSTR, arglist As DWordPtr) As Long
+Declare Function wsprintf cdecl Lib "user32" Alias _FuncName_wsprintf (pText As PTSTR, pFormat As PCTSTR, ...) As Long
+Declare Function wvsprintf Lib "user32" Alias _FuncName_wvsprintf (pOutput As PTSTR, pFormat As PCTSTR, arglist As DWordPtr) As Long
 
 
Index: /Include/api_wininet.sbp
===================================================================
--- /Include/api_wininet.sbp	(revision 140)
+++ /Include/api_wininet.sbp	(revision 141)
@@ -5,4 +5,21 @@
 #define _INC_WININET
 
+#ifdef UNICODE
+Const _FuncName_InternetOpen = "InternetOpenW"
+Const _FuncName_InternetConnect = "InternetConnectW"
+Const _FuncName_FtpGetFile = "FtpGetFileW"
+Const _FuncName_FtpGetCurrentDirectory = "FtpGetCurrentDirectoryW"
+Const _FuncName_FtpSetCurrentDirectory = "FtpSetCurrentDirectoryW"
+Const _FuncName_FtpFindFirstFile = "FtpFindFirstFileW"
+Const _FuncName_InternetFindNextFile = "InternetFindNextFileW"
+#else
+Const _FuncName_InternetOpen = "InternetOpenA"
+Const _FuncName_InternetConnect = "InternetConnectA"
+Const _FuncName_FtpGetFile = "FtpGetFileA"
+Const _FuncName_FtpGetCurrentDirectory = "FtpGetCurrentDirectoryA"
+Const _FuncName_FtpSetCurrentDirectory = "FtpSetCurrentDirectoryA"
+Const _FuncName_FtpFindFirstFile = "FtpFindFirstFileA"
+Const _FuncName_InternetFindNextFile = "InternetFindNextFileA"
+#endif
 
 TypeDef HINTERNET = VoidPtr
@@ -24,9 +41,9 @@
 Const INTERNET_OPEN_TYPE_PRECONFIG_WITH_NO_AUTOPROXY = 4   'prevent using java/script/INS
 
-Declare Function InternetOpen Lib "wininet.dll" Alias "InternetOpenA" (
-	lpszAgent As LPCSTR,
+Declare Function InternetOpen Lib "wininet.dll" Alias _FuncName_InternetOpen (
+	lpszAgent As LPCTSTR,
 	dwAccessType As DWord,
-	lpszProxy As LPCSTR,
-	lpszProxyBypass As LPCSTR,
+	lpszProxy As LPCTSTR,
+	lpszProxyBypass As LPCTSTR,
 	dwFlags As DWord) As HINTERNET
 
@@ -44,10 +61,10 @@
 Const INTERNET_DEFAULT_SOCKS_PORT    = 1080        'default for SOCKS firewall servers.
 
-Declare Function InternetConnect Lib "wininet.dll" Alias "InternetConnectA" (
+Declare Function InternetConnect Lib "wininet.dll" Alias _FuncName_InternetConnect (
 	hInternet As HINTERNET,
-	lpszServerName As LPCSTR,
+	lpszServerName As LPCTSTR,
 	nServerPort As INTERNET_PORT,
-	lpszUserName As LPCSTR,
-	lpszPassword As LPCSTR,
+	lpszUserName As LPCTSTR,
+	lpszPassword As LPCTSTR,
 	dwService As DWord,
 	dwFlags As DWord,
@@ -62,8 +79,8 @@
 '----------------
 
-Declare Function FtpGetFile Lib "wininet.dll" Alias "FtpGetFileA" (
+Declare Function FtpGetFile Lib "wininet.dll" Alias _FuncName_FtpGetFile (
 	hConnect As HINTERNET,
-	lpszRemoteFile As LPCSTR,
-	lpszNewFile As LPCSTR,
+	lpszRemoteFile As LPCTSTR,
+	lpszNewFile As LPCTSTR,
 	fFailIfExists As BOOL,
 	dwFlagsAndAttributes As DWord,
@@ -71,23 +88,23 @@
 	dwContext As DWORD_PTR) As BOOL
 
-Declare Function FtpGetCurrentDirectory Lib "wininet.dll" Alias "FtpGetCurrentDirectoryA" (
+Declare Function FtpGetCurrentDirectory Lib "wininet.dll" Alias _FuncName_FtpGetCurrentDirectory (
 	hConnect As HINTERNET,
-	lpszCurrentDirectory As LPSTR,
+	lpszCurrentDirectory As LPTSTR,
 	lpdwCurrentDirectory As DWord) As BOOL
 
-Declare Function FtpSetCurrentDirectory Lib "wininet.dll" Alias "FtpSetCurrentDirectoryA" (
+Declare Function FtpSetCurrentDirectory Lib "wininet.dll" Alias _FuncName_FtpSetCurrentDirectory (
 	hConnect As HINTERNET,
-	lpszDirectory As LPCSTR) As BOOL
+	lpszDirectory As LPCTSTR) As BOOL
 
-Declare Function FtpFindFirstFile Lib "wininet.dll" Alias "FtpFindFirstFileA" (
+Declare Function FtpFindFirstFile Lib "wininet.dll" Alias _FuncName_FtpFindFirstFile (
 	hConnect As HINTERNET,
-	lpszSearchFile As LPCSTR,
-	lpFindFileData As LPWIN32_FIND_DATA,
+	lpszSearchFile As LPCTSTR,
+	ByRef FindFileData As WIN32_FIND_DATA,
 	dwFlags As DWord,
 	dwContext As DWORD_PTR) As HINTERNET
 
-Declare Function InternetFindNextFile Lib "wininet.dll" Alias "InternetFindNextFileA" (
+Declare Function InternetFindNextFile Lib "wininet.dll" Alias _FuncName_InternetFindNextFile (
 	hFind As HINTERNET,
-	lpvFindData As VoidPtr) As BOOL
+	ByREf vFindData As Any) As BOOL
 
 
Index: /Include/api_winspool.sbp
===================================================================
--- /Include/api_winspool.sbp	(revision 140)
+++ /Include/api_winspool.sbp	(revision 141)
@@ -5,6 +5,19 @@
 #define _INC_WINSPOOL
 
+#ifdef UNICODE
+Const _FuncName_EnumPrinters = "EnumPrintersW"
+#else
+Const _FuncName_EnumPrinters = "EnumPrintersA"
+#endif
 
-Type PRINTER_INFO_5
+Type PRINTER_INFO_5W
+	pPrinterName As LPWSTR
+	pPortName As LPWSTR
+	Attributes As DWord
+	DeviceNotSelectedTimeout As DWord
+	TransmissionRetryTimeout As DWord
+End Type
+
+Type PRINTER_INFO_5A
 	pPrinterName As LPSTR
 	pPortName As LPSTR
@@ -14,6 +27,11 @@
 End Type
 
+#ifdef UNICODE
+TypeDef PRINTER_INFO_5 = PRINTER_INFO_5W
+#else
+TypeDef PRINTER_INFO_5 = PRINTER_INFO_5A
+#endif
 
-Declare Function EnumPrinters Lib "winspool.drv" Alias "EnumPrintersA" (Flags As DWord, Name As LPSTR, Level As DWord, pPrinterEnum As *Byte, cbBuf As DWord, ByRef rer_cbNeeded As DWord, ByRef ref_cReturned As DWord) As BOOL
+Declare Function EnumPrinters Lib "winspool.drv" Alias _FuncName_EnumPrinters (Flags As DWord, Name As LPTSTR, Level As DWord, pPrinterEnum As *Byte, cbBuf As DWord, ByRef cbNeeded As DWord, ByRef cReturned As DWord) As BOOL
 
 Const PRINTER_ENUM_DEFAULT     = &H00000001
