Develop and Download Open Source Software

Browse Subversion Repository

Diff of /trunk/teraterm/ttpcmn/ttcmn.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 9547 by zmatsuo, Sat Nov 27 13:49:15 2021 UTC revision 9568 by zmatsuo, Sun Dec 5 13:07:54 2021 UTC
# Line 47  Line 47 
47  #include "tt_res.h"  #include "tt_res.h"
48  #include "codeconv.h"  #include "codeconv.h"
49  #include "compat_win.h"  #include "compat_win.h"
50    #include "win32helper.h"
51  #include "asprintf.h"  #include "asprintf.h"
52    
53  #include "ttcmn_dup.h"  #include "ttcmn_dup.h"
# Line 238  BOOL WINAPI StartTeraTerm(PTTSet ts) Line 239  BOOL WINAPI StartTeraTerm(PTTSet ts)
239    
240  // 設定ファイルをディスクに保存し、Tera Term本体を再起動する。  // 設定ファイルをディスクに保存し、Tera Term本体を再起動する。
241  // (2012.4.30 yutaka)  // (2012.4.30 yutaka)
242    // 使っていない?
243  void WINAPI RestartTeraTerm(HWND hwnd, PTTSet ts)  void WINAPI RestartTeraTerm(HWND hwnd, PTTSet ts)
244  {  {
245          char path[1024];          wchar_t *path;
         STARTUPINFO si;  
         PROCESS_INFORMATION pi;  
246          int ret;          int ret;
247    
248          static const TTMessageBoxInfoW info = {          static const TTMessageBoxInfoW info = {
# Line 263  void WINAPI RestartTeraTerm(HWND hwnd, P Line 263  void WINAPI RestartTeraTerm(HWND hwnd, P
263          PostQuitMessage(0);          PostQuitMessage(0);
264    
265          // 自プロセスの再起動。          // 自プロセスの再起動。
266          if (GetModuleFileName(NULL, path, sizeof(path)) == 0) {          if (hGetModuleFileNameW(NULL, &path) == 0) {
267                  return;                  TTWinExec(path);
268          }                  free(path);
         memset(&si, 0, sizeof(si));  
         GetStartupInfo(&si);  
         memset(&pi, 0, sizeof(pi));  
         if (CreateProcess(NULL, path, NULL, NULL, FALSE, 0,  
                           NULL, NULL, &si, &pi) == 0) {  
269          }          }
270  }  }
271    

Legend:
Removed from v.9547  
changed lines
  Added in v.9568

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26