Index: Include/api_system.sbp
===================================================================
--- Include/api_system.sbp	(revision 137)
+++ 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
