From 44e0a42d6130fbc42d826a7673d99480a06a87f6 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 26 Sep 2019 11:53:28 +0300 Subject: MS_UTILS_ENTERSTRING -> EnterString, useless service removed --- src/mir_app/src/enterstring.cpp | 13 ++++++------- src/mir_app/src/mir_app.def | 1 + src/mir_app/src/mir_app64.def | 1 + src/mir_app/src/utils.cpp | 4 ---- 4 files changed, 8 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/mir_app/src/enterstring.cpp b/src/mir_app/src/enterstring.cpp index d3724d1903..fd3a9c9477 100644 --- a/src/mir_app/src/enterstring.cpp +++ b/src/mir_app/src/enterstring.cpp @@ -247,17 +247,16 @@ static INT_PTR CALLBACK sttEnterStringDlgProc(HWND hwndDlg, UINT msg, WPARAM wPa return FALSE; } -INT_PTR __cdecl svcEnterString(WPARAM, LPARAM lParam) +MIR_APP_DLL(bool) EnterString(ENTER_STRING *pForm) { - ENTER_STRING *pForm = (ENTER_STRING*)lParam; - if (pForm == nullptr || pForm->cbSize != sizeof(ENTER_STRING)) - return FALSE; + if (pForm == nullptr) + return false; - EnterStringFormParam param; + EnterStringFormParam param = {}; memcpy(¶m, pForm, sizeof(ENTER_STRING)); if (!DialogBoxParam(g_plugin.getInst(), MAKEINTRESOURCE(IDD_ENTER_STRING), GetForegroundWindow(), sttEnterStringDlgProc, LPARAM(¶m))) - return FALSE; + return false; pForm->ptszResult = param.ptszResult; - return TRUE; + return true; } diff --git a/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def index a59be4a7f1..e040deddea 100644 --- a/src/mir_app/src/mir_app.def +++ b/src/mir_app/src/mir_app.def @@ -104,6 +104,7 @@ Button_SetSkin_IcoLib @24 ?setWString@PROTO_INTERFACE@@QAEXPBDPB_W@Z @107 NONAME ?setWord@PROTO_INTERFACE@@QAEXIPBDG@Z @108 NONAME ?setWord@PROTO_INTERFACE@@QAEXPBDG@Z @109 NONAME +EnterString @110 NONAME ProtoBroadcastAck @111 ProtoCreateHookableEvent @113 ProtoCreateService @114 diff --git a/src/mir_app/src/mir_app64.def b/src/mir_app/src/mir_app64.def index cb548af9e7..050bc63a1c 100644 --- a/src/mir_app/src/mir_app64.def +++ b/src/mir_app/src/mir_app64.def @@ -104,6 +104,7 @@ Button_SetSkin_IcoLib @24 ?setWString@PROTO_INTERFACE@@QEAAXPEBDPEB_W@Z @107 NONAME ?setWord@PROTO_INTERFACE@@QEAAXIPEBDG@Z @108 NONAME ?setWord@PROTO_INTERFACE@@QEAAXPEBDG@Z @109 NONAME +EnterString @110 NONAME ProtoBroadcastAck @111 ProtoCreateHookableEvent @113 ProtoCreateService @114 diff --git a/src/mir_app/src/utils.cpp b/src/mir_app/src/utils.cpp index be9a8521b3..8cc2c70780 100644 --- a/src/mir_app/src/utils.cpp +++ b/src/mir_app/src/utils.cpp @@ -31,8 +31,6 @@ void UninitCrypt(void); void InitClistCore(void); -INT_PTR __cdecl svcEnterString(WPARAM, LPARAM lParam); - static BOOL bModuleInitialized = FALSE; static CountryListEntry countries[] = { @@ -325,8 +323,6 @@ int LoadUtilsModule(void) CreateServiceFunction(MS_UTILS_GETCOUNTRYBYISOCODE, GetCountryByISOCode); CreateServiceFunction(MS_UTILS_GETCOUNTRYLIST, GetCountryList); - CreateServiceFunction(MS_UTILS_ENTERSTRING, svcEnterString); - InitCrypt(); InitClistCore(); return 0; -- cgit v1.2.3