summaryrefslogtreecommitdiff
path: root/plugins/Restart/src
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2013-01-29 06:47:37 +0000
committerKirill Volinsky <mataes2007@gmail.com>2013-01-29 06:47:37 +0000
commit4a38e2b5de9f41f8bb3fa74457f98b2b69b9d56c (patch)
tree16f6eb44c346276721a92d257a7f9fc3779e1d5e /plugins/Restart/src
parent55d1905cffff485f577d49654a18362cbcfb61ec (diff)
added ability to restart with current profile
git-svn-id: http://svn.miranda-ng.org/main/trunk@3328 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Restart/src')
-rw-r--r--plugins/Restart/src/restart.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/plugins/Restart/src/restart.cpp b/plugins/Restart/src/restart.cpp
index ce1fd383d0..cd323a5d50 100644
--- a/plugins/Restart/src/restart.cpp
+++ b/plugins/Restart/src/restart.cpp
@@ -40,16 +40,7 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD miranda
static INT_PTR RestartMe(WPARAM wParam, LPARAM lParam)
{
- TCHAR mirandaPath[MAX_PATH], cmdLine[100];
- PROCESS_INFORMATION pi;
- STARTUPINFO si = {0};
- si.cb = sizeof(si);
- GetModuleFileName(NULL, mirandaPath, SIZEOF(mirandaPath));
- TCHAR *profilename = Utils_ReplaceVarsT(_T("%miranda_profilename%"));
- mir_sntprintf(cmdLine, SIZEOF(cmdLine), _T("\"%s\" /restart:%d /profile=%s"), mirandaPath, GetCurrentProcessId(), profilename);
- CallService("CloseAction", 0, 0);
- CreateProcess(mirandaPath, cmdLine, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi);
- mir_free(profilename);
+ CallService(MS_SYSTEM_RESTART, 1, 0);
return 0;
}