[Ttssh2-commit] [8656] getpassword の iniファイルアクセスを Unicode 化

アーカイブの一覧に戻る
scmno****@osdn***** scmno****@osdn*****
2020年 3月 31日 (火) 00:19:27 JST


Revision: 8656
          https://osdn.net/projects/ttssh2/scm/svn/commits/8656
Author:   zmatsuo
Date:     2020-03-31 00:19:27 +0900 (Tue, 31 Mar 2020)
Log Message:
-----------
getpassword の iniファイルアクセスを Unicode 化

Modified Paths:
--------------
    branches/unicode_macro_2/teraterm/ttpmacro/ttl_gui.cpp

-------------- next part --------------
Modified: branches/unicode_macro_2/teraterm/ttpmacro/ttl_gui.cpp
===================================================================
--- branches/unicode_macro_2/teraterm/ttpmacro/ttl_gui.cpp	2020-03-30 15:19:18 UTC (rev 8655)
+++ branches/unicode_macro_2/teraterm/ttpmacro/ttl_gui.cpp	2020-03-30 15:19:27 UTC (rev 8656)
@@ -275,7 +275,7 @@
 WORD TTLGetPassword()
 {
 	TStrVal Str, Str2, Temp2;
-	TCHAR Temp[512];
+	wchar_t Temp[512];
 	WORD Err;
 	TVarId VarId;
 	int result = 0;  /* failure */
@@ -293,8 +293,8 @@
 
 	GetAbsPath(Str,sizeof(Str));
 
-	GetPrivateProfileString(_T("Password"),(tc)Str2,_T(""),
-							Temp,_countof(Temp), tc::fromUtf8(Str));
+	_GetPrivateProfileStringW(L"Password", (wc)Str2, L"",
+							  Temp, _countof(Temp), wc::fromUtf8(Str));
 	if (Temp[0]==0) // password not exist
 	{
 		wchar_t input_string[MaxStrLen];
@@ -304,7 +304,7 @@
 		if (Temp2[0]!=0) {
 			char TempA[512];
 			Encrypt(Temp2, TempA);
-			if (WritePrivateProfileString(_T("Password"), (tc)Str2, (tc)TempA, tc::fromUtf8(Str)) != 0) {
+			if (_WritePrivateProfileStringW(L"Password", (wc)Str2, (wc)TempA, wc::fromUtf8(Str)) != 0) {
 				result = 1;  /* success */
 			}
 		}


Ttssh2-commit メーリングリストの案内
アーカイブの一覧に戻る