From 4882bc420186a4aef19be699e3f621dec932417d Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 2 Dec 2016 23:55:15 +0300 Subject: MS_SYSTEM_* services became functions --- plugins/HistoryStats/src/mu_common.cpp | 35 +--------------------------------- plugins/HistoryStats/src/mu_common.h | 11 ----------- plugins/HistoryStats/src/statistic.cpp | 2 +- plugins/HistoryStats/src/statistic.h | 2 +- 4 files changed, 3 insertions(+), 47 deletions(-) (limited to 'plugins/HistoryStats') diff --git a/plugins/HistoryStats/src/mu_common.cpp b/plugins/HistoryStats/src/mu_common.cpp index 9737381a2f..62c9e21bb0 100644 --- a/plugins/HistoryStats/src/mu_common.cpp +++ b/plugins/HistoryStats/src/mu_common.cpp @@ -109,28 +109,6 @@ namespace mu } } - /* - * system - */ - - namespace system - { - DWORD getVersion() - { - return static_cast(CallService(MS_SYSTEM_GETVERSION, 0, 0)); - } - - int getVersionText(int cchVersion, char* szVersion) - { - return CallService(MS_SYSTEM_GETVERSIONTEXT, cchVersion, reinterpret_cast(szVersion)); - } - - int terminated() - { - return CallService(MS_SYSTEM_TERMINATED, 0, 0); - } - } - /* * core interface functions */ @@ -138,7 +116,7 @@ namespace mu bool load() { // check for version - if (!isMirandaVersionOk(system::getVersion())) + if (!isMirandaVersionOk(Miranda_GetVersion())) return false; return true; @@ -160,17 +138,6 @@ namespace mu bool isMirandaUnicode() { - if (system::getVersion() < PLUGIN_MAKE_VERSION(0, 4, 3, 33)) - return false; - - char szVersion[256] = { 0 }; - - if (system::getVersionText(256, szVersion) != 0) - return false; - - if (!strstr(szVersion, "Unicode")) - return false; - return true; } diff --git a/plugins/HistoryStats/src/mu_common.h b/plugins/HistoryStats/src/mu_common.h index f2afb7c9df..11905e187d 100644 --- a/plugins/HistoryStats/src/mu_common.h +++ b/plugins/HistoryStats/src/mu_common.h @@ -57,17 +57,6 @@ namespace mu HICON loadIcon(int id); } - /* - * system - */ - - namespace system - { - DWORD getVersion(); - int getVersionText(int cchVersion, char* szVersion); - int terminated(); - } - /* * updater [external] */ diff --git a/plugins/HistoryStats/src/statistic.cpp b/plugins/HistoryStats/src/statistic.cpp index b064304cbf..b2882ed476 100644 --- a/plugins/HistoryStats/src/statistic.cpp +++ b/plugins/HistoryStats/src/statistic.cpp @@ -1379,7 +1379,7 @@ void __cdecl Statistic::threadProc(void *lpParameter) pStats->createStatistics(); // check for errors - if (!pStats->m_ErrorText.empty() && !mu::system::terminated()) + if (!pStats->m_ErrorText.empty() && !Miranda_IsTerminated()) MessageBox(0, pStats->m_ErrorText.c_str(), TranslateT("HistoryStats - Error"), MB_ICONERROR | MB_OK); // free statistics diff --git a/plugins/HistoryStats/src/statistic.h b/plugins/HistoryStats/src/statistic.h index 93f3d729bf..c08661a373 100644 --- a/plugins/HistoryStats/src/statistic.h +++ b/plugins/HistoryStats/src/statistic.h @@ -133,7 +133,7 @@ private: // misc routines DWORD getTimeStarted() { return m_TimeStarted; } - bool shouldTerminate() { return (WaitForSingleObject(m_hCancelEvent, 0) == WAIT_OBJECT_0) || (bool_(mu::system::terminated())); } + bool shouldTerminate() { return (WaitForSingleObject(m_hCancelEvent, 0) == WAIT_OBJECT_0) || bool_(Miranda_IsTerminated()); } void handleAddMessage(Contact& contact, Message& msg); void handleAddChat(Contact& contact, bool bOutgoing, DWORD localTimestampStarted, DWORD duration); -- cgit v1.2.3