Index: Include/Classes/System/IO/Path.ab
===================================================================
--- Include/Classes/System/IO/Path.ab	(revision 124)
+++ Include/Classes/System/IO/Path.ab	(revision 125)
@@ -1,8 +1,8 @@
 Class Path
 Public
-	Static AltDirectorySeparatorChar = &H2F As Byte '/
-	Static DirectorySeparatorChar = &H5C As Byte    '\
-	Static PathSeparator = &H3B As Byte             ';
-	Static VolumeSeparatorChar = &H3A As Byte       ':
+	Static AltDirectorySeparatorChar = &H2F As Char '/
+	Static DirectorySeparatorChar = &H5C As Char    '\
+	Static PathSeparator = &H3B As Char             ';
+	Static VolumeSeparatorChar = &H3A As Char       ':
 
 	Static Function GetFileName(path As String) As String
@@ -50,5 +50,5 @@
 	End Function
 
-	Static Function HasExtension(ByRef path As String) As BOOL
+	Static Function HasExtension(ByRef path As String) As Boolean
 		If GetExtension(path) <> "" Then
 			Return _System_TRUE
@@ -59,5 +59,19 @@
 
 	Static Function GetTempFileName() As String
-		' TODO: 実装
+		Dim tempPathSize = __GetTempPath(0, 0)
+		Dim tempPath = _System_malloc(SizeOf (TCHAR) * tempPathSize) As PTSTR
+		If tempPath = 0 Then
+			' Throw OutOfMemoryException
+			Debug
+		End If
+		If __GetTempPath(tempPathSize, tempPath) > tempPathSize Then
+			' Throw IOException?
+			Debug
+		End If
+
+		Dim tempFileName[ELM(MAX_PATH)] As TCHAR
+		__GetTempFileName(tempPath, "ABT", 0, tempFileName)
+		free(tempPath)
+		Return tempFileName
 	End Function
 
@@ -148,2 +162,6 @@
 	Return GetTempPath(nBufferLength, lpBuffer)
 End Function
+
+Function __GetTempFileName(pPathName As PCSTR, pPrefixString As PCSTR, uUnique As DWord, pTempFileName As PSTR) As DWord
+	Return GetTempFileName(pPathName, pPrefixString, uUnique, pTempFileName)
+End Function
Index: Include/Classes/System/String.ab
===================================================================
--- Include/Classes/System/String.ab	(revision 124)
+++ Include/Classes/System/String.ab	(revision 125)
@@ -12,4 +12,9 @@
 		String()
 		Assign(initStr)
+	End Sub
+
+	Sub String(initStr As *Char, length As Long)
+		String()
+		Assign(initStr, length)
 	End Sub
 
@@ -454,9 +459,15 @@
 
 	Sub ToLower()
-		CharLower(Chars)
+		Dim i As Long
+		For i = 0 To m_Length
+			Chars[i] = _System_ASCII_ToLower(Chars[i])
+		Next
 	End Sub
 
 	Sub ToUpper()
-		CharUpper(Chars)
+		Dim i As Long
+		For i = 0 To m_Length
+			Chars[i] = _System_ASCII_ToUpper(Chars[i])
+		Next
 	End Sub
 
Index: Include/api_gdi.sbp
===================================================================
--- Include/api_gdi.sbp	(revision 124)
+++ Include/api_gdi.sbp	(revision 125)
@@ -660,5 +660,6 @@
 TypeDef LOGFONT = LOGFONTA
 #endif
-Declare Function CreateFontIndirect Lib "gdi32" Alias "CreateFontIndirectA" (ByRef lplf As LOGFONT) As HFONT
+Declare Function CreateFontIndirectA Lib "gdi32" (ByRef lf As LOGFONTA) As HFONT
+Declare Function CreateFontIndirect Lib "gdi32" Alias "CreateFontIndirectA" (ByRef lf As LOGFONT) As HFONT
 
 Declare Function CreateHatchBrush Lib "gdi32" (fnStyle As Long, clrref As COLORREF) As HBRUSH
Index: Include/api_imm.sbp
===================================================================
--- Include/api_imm.sbp	(revision 124)
+++ Include/api_imm.sbp	(revision 125)
@@ -21,5 +21,5 @@
 Declare Function ImmDisableIME Lib "imm32" (idThread As DWord) As BOOL
 #ifdef UNICODE
-Declare Function ImmGetCompositionString Lib "imm32" Alias "ImmGetCompositionStringA" (hIMC As HIMC, dwIndex As DWord, pBuf As VoidPtr, dwBufLen As DWord) As Long
+Declare Function ImmGetCompositionString Lib "imm32" Alias "ImmGetCompositionStringW" (hIMC As HIMC, dwIndex As DWord, pBuf As VoidPtr, dwBufLen As DWord) As Long
 #else
 Declare Function ImmGetCompositionString Lib "imm32" Alias "ImmGetCompositionStringA" (hIMC As HIMC, dwIndex As DWord, pBuf As VoidPtr, dwBufLen As DWord) As Long
@@ -38,10 +38,10 @@
 
 #ifdef UNICODE
-Declare Function ImmSetCompositionFont Lib "imm32" Alias "ImmSetCompositionFontW" (hIMC As HIMC, ByRef lplf As LOGFONT) As Long
+Declare Function ImmSetCompositionFont Lib "imm32" Alias "ImmSetCompositionFontW" (hIMC As HIMC, ByRef lf As LOGFONT) As Long
 #else
-Declare Function ImmSetCompositionFont Lib "imm32" Alias "ImmSetCompositionFontA" (hIMC As HIMC, ByRef lplf As LOGFONT) As Long
+Declare Function ImmSetCompositionFont Lib "imm32" Alias "ImmSetCompositionFontA" (hIMC As HIMC, ByRef lf As LOGFONT) As Long
 #endif
-Declare Function ImmSetCompositionFontA Lib "imm32" (hIMC As HIMC, ByRef lplf As LOGFONTA) As Long
-Declare Function ImmSetCompositionFontW Lib "imm32" (hIMC As HIMC, ByRef lplf As LOGFONTW) As Long
+Declare Function ImmSetCompositionFontA Lib "imm32" (hIMC As HIMC, ByRef lf As LOGFONTA) As Long
+Declare Function ImmSetCompositionFontW Lib "imm32" (hIMC As HIMC, ByRef lf As LOGFONTW) As Long
 Declare Function ImmSetCompositionWindow Lib "imm32" (hIMC As HIMC, ByRef CompForm As COMPOSITIONFORM) As BOOL
 
Index: Include/api_system.sbp
===================================================================
--- Include/api_system.sbp	(revision 124)
+++ Include/api_system.sbp	(revision 125)
@@ -335,4 +335,6 @@
 Declare Function InterlockedExchangePointer Lib "kernel32" Alias "InterlockedExchange" (ByRef Target As VoidPtr, Value As VoidPtr) As VoidPtr
 #endif
+
+
 Declare Function Beep Lib "kernel32" (dwFreq As DWord, dwDuration As DWord) As BOOL
 Declare Function CloseHandle Lib "kernel32" (hObject As HANDLE) As BOOL
@@ -597,5 +599,5 @@
     ByRef FileInformation As BY_HANDLE_FILE_INFORMATION
 ) As BOOL
-Declare Function GetFileSize Lib "kernel32" (hFile As HANDLE, lpFileSizeHigh As DWordPtr) As DWord
+Declare Function GetFileSize Lib "kernel32" (hFile As HANDLE, pFileSizeHigh As *DWord) As DWord
 Declare Function GetFileTime Lib "kernel32" (hFile As HANDLE, ByRef lpCreationTime As FILETIME, ByRef lpLastAccessTime As FILETIME, ByRef lpLastWriteTime As FILETIME) As BOOL
 
@@ -621,5 +623,5 @@
 ) As BOOL
 Declare Function GetPriorityClass Lib "kernel32" (hProcess As HANDLE) As DWord
-Declare Function GetProcAddress Lib "kernel32" (hModule As HINSTANCE, lpProcName As BytePtr) As DWord
+Declare Function GetProcAddress Lib "kernel32" (hModule As HINSTANCE, pProcName As PCSTR) As DWord
 Declare Function GetProcessAffinityMask Lib "kernel32" (
 	hProcess As HANDLE,
@@ -634,5 +636,5 @@
 ) As DWord
 
-Declare Sub GetStartupInfo Lib "kernel32" Alias "GetStartupInfoA" (ByRef lpStartupInfo As STARTUPINFO)
+Declare Sub GetStartupInfo Lib "kernel32" Alias "GetStartupInfoA" (ByRef StartupInfo As STARTUPINFO)
 
 Const STD_INPUT_HANDLE  = -10
@@ -655,5 +657,5 @@
 	wProcessorRevision As Word
 End Type
-Declare Sub GetSystemInfo Lib "kernel32" (ByRef lpSystemInfo As SYSTEM_INFO)
+Declare Sub GetSystemInfo Lib "kernel32" (ByRef SystemInfo As SYSTEM_INFO)
 
 Declare Sub GetSystemTime Lib "kernel32" (ByRef SystemTime As SYSTEMTIME)
@@ -666,5 +668,5 @@
 	pTempFileName As PSTR
 ) As DWord
-Declare Function GetTempPath Lib "kernel32" Alias "GetTempPathA" (nBufferLength As DWord, lpBuffer As BytePtr) As DWord
+Declare Function GetTempPath Lib "kernel32" Alias "GetTempPathA" (nBufferLength As DWord, lpBuffer As PSTR) As DWord
 Declare Function GetThreadContext Lib "kernel32" (hThread As HANDLE, ByRef Context As CONTEXT) As BOOL
 
@@ -691,5 +693,5 @@
 Const TIME_NOTIMEMARKER        = &H00000004
 Const TIME_FORCE24HOURFORMAT   = &H00000008
-Declare Function GetTimeFormat Lib "kernel32" Alias "GetTimeFormatA" (Locale As LCID, dwFlags As DWord, ByRef lpTime As SYSTEMTIME, lpFormat As BytePtr, lpTimeStr As BytePtr, cchTime As DWord) As BOOL
+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 GetUserDefaultLCID Lib "kernel32" () As LCID
@@ -707,5 +709,5 @@
 	szCSDVersion[127] As Byte
 End Type
-Declare Function GetVersionEx Lib "kernel32" Alias "GetVersionExA" (ByRef lpVersionInformation As OSVERSIONINFO) As BOOL
+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
@@ -737,5 +739,5 @@
 Declare Function HeapReAlloc Lib "kernel32" (hHeap As HANDLE, dwFlags As DWord, lpMem As VoidPtr, dwBytes As SIZE_T) As VoidPtr
 Declare Function HeapSize Lib "kernel32" (hHeap As HANDLE, dwFlags As DWord, lpMem As VoidPtr) As SIZE_T
-Declare Sub InitializeCriticalSection Lib "kernel32" (ByRef lpCriticalSection As CRITICAL_SECTION)
+Declare Sub InitializeCriticalSection Lib "kernel32" (ByRef CriticalSection 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 ULONG_PTR) As BOOL
@@ -826,5 +828,11 @@
 Declare Function OpenProcess Lib "kernel32" (dwDesiredAccess As DWord, bInheritHandle As Long, dwProcessId As DWord) As HANDLE
 
-Declare Sub OutputDebugString Lib "kernel32" Alias "OutputDebugStringA" (lpOutputString As BytePtr)
+Declare Sub OutputDebugStringA Lib "kernel32" (pOutputString As PCSTR)
+Declare Sub OutputDebugStringW Lib "kernel32" (pOutputString As PCWSTR)
+#ifdef UNICODE
+Declare Sub OutputDebugString Lib "kernel32" Alias "OutputDebugStringW" (pOutputString As PCTSTR)
+#else
+Declare Sub OutputDebugString Lib "kernel32" Alias "OutputDebugStringA" (pOutputString As PCTSTR)
+#endif
 Declare Function PulseEvent Lib "kernel32" (hEvent As HANDLE) As BOOL
 Declare Sub RaiseException Lib "kernel32" (
@@ -841,4 +849,5 @@
 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 SetEndOfFile Lib "kernel32" (hFile As HANDLE) As BOOL
 Declare Function SetEnvironmentVariable Lib "kernel32" Alias "SetEnvironmentVariableA" (lpName As BytePtr, lpValue As BytePtr) As BOOL
Index: Include/basic/function.sbp
===================================================================
--- Include/basic/function.sbp	(revision 124)
+++ Include/basic/function.sbp	(revision 125)
@@ -694,7 +694,7 @@
 	Dim temp[255] As Char
 #ifdef _WIN64
-	_sntprintf(temp, Len (temp) / SizeOf (Char), "%I64d", value)
+	_sntprintf(temp, Len (temp) \ SizeOf (Char), "%I64d", value)
 #else
-	_sntprintf(temp, Len (temp) / SizeOf (Char), "%d", value)
+	_sntprintf(temp, Len (temp) \ SizeOf (Char), "%d", value)
 #endif
 	Str$ = temp
@@ -1068,9 +1068,63 @@
 End Function
 
-Function _System_FillChar(p As *Char, n As SIZE_T, c As Char)
+Sub _System_FillChar(p As *Char, n As SIZE_T, c As Char)
 	Dim i As SIZE_T
 	For i = 0 To ELM(n)
 		p[i] = c
 	Next
+End Sub
+
+Function _System_ASCII_IsUpper(c As Char) As Boolean
+	Return c As DWord - &h41 < 26 ' &h41 = Asc("A")
+End Function
+
+Function _System_ASCII_IsLower(c As Char) As Boolean
+	Return c As DWord - &h61 < 26 ' &h61 = Asc("a")
+End Function
+
+Function _System_ASCII_ToLower(c As Char)
+	If _System_ASCII_IsUpper(c) Then
+		Return c Or &h20
+	Else
+		Return c
+	End If
+End Function
+
+Function _System_ASCII_ToUpper(c As Char)
+	If _System_ASCII_IsLower(c) Then
+		Return c And (Not &h20)
+	Else
+		Return c
+	End If
+End Function
+
+Function _System_WideCharToMultiByte(s As PCWSTR) As PSTR
+	Return _System_WideCharToMultiByte(s, lstrlenW(s) + 1, 0)
+End Function
+
+Function _System_WideCharToMultiByte(s As PCWSTR, size As Long) As PSTR
+	Return _System_WideCharToMultiByte(s, size, 0)
+End Function
+
+Function _System_WideCharToMultiByte(ws As PCWSTR, size As Long, flag As DWord) As PSTR
+	Dim sizeMBS = WideCharToMultiByte(CP_THREAD_ACP, flag, s, size, 0, 0, 0, 0)
+	Dim mbs = malloc(sizeMBS) As PSTR
+	WideCharToMultiByte(CP_THREAD_ACP, flag, s, size, mbs, sizeMBS, 0, 0)
+	Return mbs
+End Function
+
+Function _System_MultiByteToWideChar(s As PCSTR) As PWSTR
+	Return _System_MultiByteToWideChar(s, lstrlenA(s) + 1, 0)
+End Function
+
+Function _System_MultiByteToWideChar(s As PCSTR, size As Long) As PWSTR
+	Return _System_MultiByteToWideChar(s, size, 0)
+End Function
+
+Function _System_MultiByteToWideChar(s As PCSTR, size As Long, flag As DWord) As PWSTR
+	Dim sizeMBS = MultiByteToWideChar(CP_THREAD_ACP, flag, s, size, 0, 0)
+	Dim mbs = malloc(SizeOf (WCHAR) * sizeMBS) As PWSTR
+	MultiByteToWideChar(CP_THREAD_ACP, flag, s, size, mbs, sizeMBS)
+	Return mbs
 End Function
 
Index: Include/basic/prompt.sbp
===================================================================
--- Include/basic/prompt.sbp	(revision 124)
+++ Include/basic/prompt.sbp	(revision 125)
@@ -13,4 +13,5 @@
 
 'text
+
 Dim _PromptSys_LogFont As LOGFONTA 'LOGFONT
 Dim _PromptSys_hFont As HFONT
@@ -23,4 +24,5 @@
 Dim _PromptSys_TextColor[100] As *COLORREF
 Dim _PromptSys_BackColor[100] As *COLORREF
+Dim _PromptSys_TextWidth[100] As Long
 Dim _PromptSys_NowTextColor As COLORREF
 Dim _PromptSys_NowBackColor As COLORREF
@@ -45,6 +47,4 @@
 Sub DrawPromptBuffer(hDC As HDC, StartLine As Long, EndLine As Long)
 	Dim i As Long, i2 As Long, i3 As Long
-	Dim sz As SIZE
-	Dim temporary[2] As Char
 
 	Dim hOldFont = SelectObject(hDC, _PromptSys_hFont) As HFONT
@@ -53,34 +53,38 @@
 	Dim rc As RECT
 	GetClientRect(_PromptSys_hWnd, rc)
-	While (_PromptSys_CurPos.y+1)*_PromptSys_FontSize.cy>rc.bottom and _PromptSys_CurPos.y>0
+	While (_PromptSys_CurPos.y+1) * _PromptSys_FontSize.cy > rc.bottom and _PromptSys_CurPos.y > 0
 		_System_free(_PromptSys_Buffer[0])
 		_System_free(_PromptSys_TextColor[0])
 		_System_free(_PromptSys_BackColor[0])
-		For i=0 To 100-1
+		For i = 0 To 100 - 1
 			_PromptSys_Buffer[i] = _PromptSys_Buffer[i+1]
 			_PromptSys_TextColor[i] = _PromptSys_TextColor[i+1]
 			_PromptSys_BackColor[i] = _PromptSys_BackColor[i+1]
+			_PromptSys_TextWidth[i] = _PromptSys_TextWidth[i+1]
 		Next
 		_PromptSys_Buffer[100] = _System_calloc(SizeOf (Char) * 255)
 		_PromptSys_TextColor[100] = _System_calloc(SizeOf(COLORREF) * 255)
 		_PromptSys_BackColor[100] = _System_calloc(SizeOf(COLORREF) * 255)
+		_PromptSys_TextWidth[100] = 0
 
 		_PromptSys_CurPos.y--
 
 		'Redraw
-		StartLine=-1
+		StartLine = -1
 	Wend
 
-	i=0
-	While i*_PromptSys_FontSize.cy<rc.bottom and i<=100
+	i = 0
+	While i * _PromptSys_FontSize.cy < rc.bottom and i <= 100
 		If StartLine=-1 or (StartLine<=i and i<=EndLine) Then
+			Dim sz As SIZE
 			i3 = lstrlen(_PromptSys_Buffer[i])
 			GetTextExtentPoint32(hDC, _PromptSys_Buffer[i], i3, sz)
 
 			BitBlt(hDC,_
-				sz.cx, i*_PromptSys_FontSize.cy, _
+				sz.cx, i * _PromptSys_FontSize.cy, _
 				rc.right, _PromptSys_FontSize.cy, _
-				_PromptSys_hMemDC,sz.cx,i*_PromptSys_FontSize.cy,SRCCOPY)
-
+				_PromptSys_hMemDC, sz.cx, i * _PromptSys_FontSize.cy, SRCCOPY)
+
+			Dim width = 0 As Long
 			For i2 = 0 To i3-1
 				SetTextColor(hDC, _PromptSys_TextColor[i][i2])
@@ -92,6 +96,7 @@
 				End If
 
+				Dim temporary[2] As Char
 				Dim tempLen As Long
-				temporary[0]=_PromptSys_Buffer[i][i2]
+				temporary[0] = _PromptSys_Buffer[i][i2]
 #ifdef UNICODE
 				If _System_IsSurrogatePair(_PromptSys_Buffer[i][i2], _PromptSys_Buffer[i][i2+1]) Then
@@ -108,6 +113,8 @@
 				End If
 				With _PromptSys_FontSize
-					TextOut(hDC, i2 * .cx, i * .cy, temporary, tempLen)
+					TextOut(hDC, width, i * .cy, temporary, tempLen)
 				End With
+				GetTextExtentPoint32(hDC, temporary, i3, sz)
+				width += sz.cx
 			Next
 		End If
@@ -150,4 +157,5 @@
 			.x++
 		Loop
+
 		'Draw the text buffer added
 		Dim hDC = GetDC(_PromptSys_hWnd)
@@ -182,5 +190,5 @@
 
 			Dim tm As TEXTMETRIC
-			Dim hOldFont=SelectObject(_PromptSys_hMemDC, _PromptSys_hFont) As HFONT
+			Dim hOldFont = SelectObject(_PromptSys_hMemDC, _PromptSys_hFont) As HFONT
 			GetTextExtentPoint32(_PromptSys_hMemDC, " " As PCTSTR, 1, _PromptSys_FontSize)
 			GetTextMetrics(_PromptSys_hMemDC, tm)
@@ -190,7 +198,11 @@
 			ReleaseDC(hWnd,hDC)
 		Case WM_PAINT
-			hDC = BeginPaint(hWnd,ps)
+			hDC = BeginPaint(hWnd, ps)
+/*
 			With _PromptSys_ScreenSize
 				BitBlt(hDC, 0, 0, .cx, .cy, _PromptSys_hMemDC, 0, 0, SRCCOPY)
+*/
+			With ps.rcPaint
+				BitBlt(hDC, .left, .top, .right - .left, .bottom - .top, _PromptSys_hMemDC, .left, .top, SRCCOPY)
 			End With
 			DrawPromptBuffer(hDC, -1, 0)
@@ -270,4 +282,6 @@
 				SendMessage(hWnd, WM_SETFOCUS, 0, 0)
 			End If
+		Case WM_IME_COMPOSITION
+			Return _PromptSys_OnImeCompostion(hWnd, wParam, lParam)
 		Case WM_DESTROY
 			DeleteDC(_PromptSys_hMemDC)
@@ -282,4 +296,36 @@
 End Function
 
+Function _PromptSys_OnImeCompostion(hwnd As HWND, wp As WPARAM, lp As LPARAM) As LRESULT
+	If (lp And GCS_RESULTSTR) <> 0 Then
+		Dim himc = ImmGetContext(hwnd)
+		If himc = 0 Then
+			'Debug
+			Return 0
+		End If
+		Dim size = ImmGetCompositionString(himc, GCS_RESULTSTR, 0, 0) 'sizeはバイト単位
+		Dim str = _System_malloc(size) As PTSTR
+		If str = 0 Then
+			'Debug
+			Return 0
+		End If
+		ImmGetCompositionString(himc, GCS_RESULTSTR, str, size)
+		ImmReleaseContext(hwnd, himc)
+
+		memcpy(VarPtr(_PromptSys_InputStr[_PromptSys_InputLen]), str, size)
+		_PromptSys_InputLen += size
+
+		Dim tempStr As String(str, size \ SizeOf (Char))
+		_System_free(str)
+
+		SendMessage(hwnd, WM_KILLFOCUS, 0, 0)
+		PRINT_ToPrompt(tempStr)
+		SendMessage(hwnd, WM_SETFOCUS, 0, 0)
+
+		Return 0
+	Else
+		Return DefWindowProc(hwnd, WM_IME_COMPOSITION, wp, lp)
+	End If
+End Function
+
 Function PromptMain(dwData As Long) As Long
 	Dim i As Long
@@ -297,6 +343,8 @@
 
 	'Setup
-	_PromptSys_ScreenSize.cx=GetSystemMetrics(SM_CXSCREEN)
-	_PromptSys_ScreenSize.cy=GetSystemMetrics(SM_CYSCREEN)
+	With _PromptSys_ScreenSize
+		.cx = GetSystemMetrics(SM_CXSCREEN)
+		.cy = GetSystemMetrics(SM_CYSCREEN)
+	End With
 
 	'LogFont initialize
@@ -315,8 +363,12 @@
 		.lfQuality = DEFAULT_QUALITY
 		.lfPitchAndFamily = FIXED_PITCH
+#ifdef UNICODE
+		WideCharToMultiByte(CP_ACP, 0, "ＭＳ 明朝", 5, .lfFaceName, LF_FACESIZE, 0, 0)
+#else
 		lstrcpy(.lfFaceName, "ＭＳ 明朝")
+#endif
 	End With
 
-	_PromptSys_hFont = CreateFontIndirect(ByVal VarPtr(_PromptSys_LogFont))
+	_PromptSys_hFont = CreateFontIndirectA(ByVal VarPtr(_PromptSys_LogFont))
 
 	'Critical Section
@@ -340,5 +392,7 @@
 
 	'Create Prompt Window
-	_PromptSys_hWnd=CreateWindowEx(WS_EX_CLIENTEDGE,atom As ULONG_PTR As PCSTR,"BASIC PROMPT",WS_OVERLAPPEDWINDOW,CW_USEDEFAULT,CW_USEDEFAULT,CW_USEDEFAULT,CW_USEDEFAULT,0,0,GetModuleHandle(0),0)
+	_PromptSys_hWnd = CreateWindowEx(WS_EX_CLIENTEDGE, atom As ULONG_PTR As PCSTR, "BASIC PROMPT",
+		WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
+		0, 0, wcl.hInstance, 0)
 	ShowWindow(_PromptSys_hWnd, SW_SHOW)
 	UpdateWindow(_PromptSys_hWnd)
