Browse Subversion Repository
Diff of /trunk/teraterm/ttpcmn/ttcmn.c
Parent Directory
| Revision Log
| Patch
| 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" |
| 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 = { |
| 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 |
|
|
| |