diff options
author | George Hazan <ghazan@miranda.im> | 2019-09-26 11:53:28 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-09-26 11:53:28 +0300 |
commit | 44e0a42d6130fbc42d826a7673d99480a06a87f6 (patch) | |
tree | 4d1eb5c2ef8ae351e871e3b43149b7b0220e34c5 /src | |
parent | 5df3cc2fd09d7afa8691658b52c08f456df381fe (diff) |
MS_UTILS_ENTERSTRING -> EnterString, useless service removed
Diffstat (limited to 'src')
-rw-r--r-- | src/mir_app/src/enterstring.cpp | 13 | ||||
-rw-r--r-- | src/mir_app/src/mir_app.def | 1 | ||||
-rw-r--r-- | src/mir_app/src/mir_app64.def | 1 | ||||
-rw-r--r-- | src/mir_app/src/utils.cpp | 4 |
4 files changed, 8 insertions, 11 deletions
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;
|