[Ttssh2-commit] [5818] チケット #34943 設定フォルダを開く

svnno****@sourc***** svnno****@sourc*****
2015年 3月 7日 (土) 22:16:39 JST


Revision: 5818
          http://sourceforge.jp/projects/ttssh2/scm/svn/commits/5818
Author:   yutakapon
Date:     2015-03-07 22:16:37 +0900 (Sat, 07 Mar 2015)
Log Message:
-----------
チケット #34943 設定フォルダを開く

VS2005 でもビルドできるようにした。

Ticket Links:
------------
    http://sourceforge.jp/projects/ttssh2/tracker/detail/34943

Modified Paths:
--------------
    trunk/teraterm/teraterm/vtwin.cpp

-------------- next part --------------
Modified: trunk/teraterm/teraterm/vtwin.cpp
===================================================================
--- trunk/teraterm/teraterm/vtwin.cpp	2015-03-06 15:33:37 UTC (rev 5817)
+++ trunk/teraterm/teraterm/vtwin.cpp	2015-03-07 13:16:37 UTC (rev 5818)
@@ -4582,6 +4582,13 @@
 //
 static BOOL openVirtualStore(char *path, char *filename)
 {
+#if _MSC_VER == 1400
+	typedef struct _TOKEN_ELEVATION {
+		DWORD TokenIsElevated;
+	} TOKEN_ELEVATION, *PTOKEN_ELEVATION;
+	int TokenElevation = 20;
+#endif
+
 	BOOL ret = FALSE;
 	int flag = 0;
 	char *s, **p;
@@ -4642,7 +4649,7 @@
 	// UAC\x82\xAA\x97L\x8C\xF8\x8E\x9E\x81A\x83v\x83\x8D\x83Z\x83X\x82\xAA\x8AǗ\x9D\x8EҌ\xA0\x8C\xC0\x82ɏ\xB8\x8Ai\x82\xB5\x82Ă\xA2\x82邩\x81B
 	flag = 0;
 	if (OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY | TOKEN_ADJUST_DEFAULT, &hToken)) {
-		if (GetTokenInformation(hToken, TokenElevation, &tokenElevation, sizeof(TOKEN_ELEVATION), &dwLength)) {
+		if (GetTokenInformation(hToken, (TOKEN_INFORMATION_CLASS)TokenElevation, &tokenElevation, sizeof(TOKEN_ELEVATION), &dwLength)) {
 			// (0\x82͏\xB8\x8Ai\x82\xB5\x82Ă\xA2\x82Ȃ\xA2\x81A\x94\xF10\x82͏\xB8\x8Ai\x82\xB5\x82Ă\xA2\x82\xE9)\x81B
 			if (tokenElevation.TokenIsElevated == 0) {
 				// \x8AǗ\x9D\x8EҌ\xA0\x8C\xC0\x82\xF0\x8E\x9D\x82\xC1\x82Ă\xA2\x82Ȃ\xAF\x82\xEA\x82΁AVirtual Store\x82\xAA\x93\xAD\x82\xAD\x81B



Ttssh2-commit メーリングリストの案内