Index: Include/api_system.sbp
===================================================================
--- Include/api_system.sbp	(revision 119)
+++ Include/api_system.sbp	(revision 121)
@@ -326,9 +326,11 @@
 Declare Function InterlockedDecrement Lib "kernel32" (ByRef lpAddend As Long) As Long
 Declare Function InterlockedExchange Lib "kernel32" (ByRef Target As Long, Value As Long) As Long
-Declare Function InterlockedCompareExchange Lib "kernel32" (Destination As *VoidPtr, Exchange As VoidPtr, Comperand As VoidPtr) As VoidPtr
+Declare Function InterlockedCompareExchange Lib "kernel32" (ByRef Destination As Long, Exchange As Long, Comperand As Long) As Long
 Declare Function InterlockedExchangeAdd Lib "kernel32" (ByRef Addend As Long, Value As Long) As Long
 #ifdef _WIN64
-Declare Function InterlockedCompareExchangePointer Lib "kernel32" (Destination As *VoidPtr, Exchange As VoidPtr, Comperand As VoidPtr) As VoidPtr
+Declare Function InterlockedCompareExchangePointer Lib "kernel32" (ByRef Destination As VoidPtr, Exchange As VoidPtr, Comperand As VoidPtr) As VoidPtr
+Declare Function InterlockedExchangePointer Lib "kernel32" (ByRef Target As VoidPtr, Value As VoidPtr) As VoidPtr
 #else
+Declare Function InterlockedCompareExchangePointer Lib "kernel32" Alias "InterlockedCompareExchange" (ByRef Destination As VoidPtr, Exchange As VoidPtr, Comperand As VoidPtr) As VoidPtr
 Declare Function InterlockedExchangePointer Lib "kernel32" Alias "InterlockedExchange" (ByRef Target As VoidPtr, Value As VoidPtr) As VoidPtr
 #endif
@@ -737,5 +739,5 @@
 Declare Sub InitializeCriticalSection Lib "kernel32" (ByRef lpCriticalSection As CRITICAL_SECTION)
 Declare Function IsBadReadPtr Lib "kernel32" (lp As VoidPtr, ucb As ULONG_PTR) As BOOL
-Declare Function IsBadWritePtr Lib "kernel32" (lp As VoidPtr, ucb As DWord) As BOOL
+Declare Function IsBadWritePtr Lib "kernel32" (lp As VoidPtr, ucb As ULONG_PTR) As BOOL
 Declare Function IsDBCSLeadByte Lib "kernel32" (TestChar As Byte) As BOOL
 
@@ -775,14 +777,14 @@
 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" (lpString1 As BytePtr, lpString2 As BytePtr) As BytePtr
-Declare Function lstrcmp Lib "kernel32" Alias "lstrcmpA" (lpString1 As BytePtr, lpString2 As BytePtr) As Long
-Declare Function lstrcmpi Lib "kernel32" Alias "lstrcmpiA" (lpString1 As BytePtr, lpString2 As BytePtr) As Long
-Declare Function lstrcpy Lib "kernel32" Alias "lstrcpyA" (lpString1 As BytePtr, lpString2 As BytePtr) As BytePtr
-Declare Function lstrlenA Lib "kernel32" (lpString As LPSTR) As Long
-Declare Function lstrlenW Lib "kernel32" (lpString As LPWSTR) As Long
+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 lstrcpy Lib "kernel32" Alias "lstrcpyA" (pString1 As PSTR, pString2 As PCSTR) 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 "lstrlenA" (lpString As *Char) As Long
+Declare Function lstrlen Lib "kernel32" Alias "lstrlenW" (lpString As PCTSTR) As Long
 #else
-Declare Function lstrlen Lib "kernel32" Alias "lstrlenA" (lpString As *Char) As Long
+Declare Function lstrlen Lib "kernel32" Alias "lstrlenA" (lpString As PCTSTR) As Long
 #endif
 Declare Sub memcpy Lib "kernel32" Alias "RtlMoveMemory" (pDest As VoidPtr, pSrc As VoidPtr, length As SIZE_T)
@@ -804,5 +806,5 @@
 Const CP_UTF8       = 65001  'UTF-8 translation
 
-Declare Function MultiByteToWideChar Lib "kernel32" (CodePage As DWord, dwFlags As DWord, lpMultiByteStr As BytePtr, cchMultiByte As Long, lpWideCharStr As WordPtr, cchWideChar As Long) As Long
+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
