summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/stdauth/src/authdialogs.cpp8
-rw-r--r--src/mir_core/src/mir_core.def1
-rw-r--r--src/mir_core/src/mir_core64.def1
-rw-r--r--src/mir_core/src/modules.cpp8
-rw-r--r--src/modules/protocols/protoint.cpp2
5 files changed, 15 insertions, 5 deletions
diff --git a/src/core/stdauth/src/authdialogs.cpp b/src/core/stdauth/src/authdialogs.cpp
index 5de5cb0cf3..a1a7897249 100644
--- a/src/core/stdauth/src/authdialogs.cpp
+++ b/src/core/stdauth/src/authdialogs.cpp
@@ -264,11 +264,11 @@ INT_PTR CALLBACK DlgProcAuthReq(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
db_event_get(hDbEvent, &dbei);
if (IsWindowEnabled(GetDlgItem(hwndDlg, IDC_DENYREASON))) {
- TCHAR szReason[256];
- GetDlgItemText(hwndDlg, IDC_DENYREASON, szReason, SIZEOF(szReason));
- CallProtoService(dbei.szModule, PS_AUTHDENY, (WPARAM)hDbEvent, (LPARAM)szReason);
+ TCHAR tszReason[256];
+ GetDlgItemText(hwndDlg, IDC_DENYREASON, tszReason, SIZEOF(tszReason));
+ CallProtoService(dbei.szModule, PS_AUTHDENY, hDbEvent, (LPARAM)tszReason);
}
- else CallProtoService(dbei.szModule, PS_AUTHDENY, (WPARAM)hDbEvent, 0);
+ else CallProtoService(dbei.szModule, PS_AUTHDENY, hDbEvent, 0);
}
DestroyWindow(hwndDlg);
break;
diff --git a/src/mir_core/src/mir_core.def b/src/mir_core/src/mir_core.def
index 838a1d4b0b..1157f2edb5 100644
--- a/src/mir_core/src/mir_core.def
+++ b/src/mir_core/src/mir_core.def
@@ -1239,3 +1239,4 @@ Proto_RegisterModule @1074 NONAME
??BJSONNode@@QBE_NXZ @1246 NONAME
?as_mstring@JSONNode@@QBE?AV?$CMStringT@_WV?$ChTraitsCRT@_W@@@@XZ @1247 NONAME
BmpFilterGetStrings @1248
+CreateProtoServiceFunction @1249
diff --git a/src/mir_core/src/mir_core64.def b/src/mir_core/src/mir_core64.def
index 248599e8b9..9018911b8b 100644
--- a/src/mir_core/src/mir_core64.def
+++ b/src/mir_core/src/mir_core64.def
@@ -1239,3 +1239,4 @@ Proto_RegisterModule @1074 NONAME
??BJSONNode@@QEBA_NXZ @1246 NONAME
?as_mstring@JSONNode@@QEBA?AV?$CMStringT@_WV?$ChTraitsCRT@_W@@@@XZ @1247 NONAME
BmpFilterGetStrings @1248
+CreateProtoServiceFunction @1249
diff --git a/src/mir_core/src/modules.cpp b/src/mir_core/src/modules.cpp
index e9a79be6b7..51a953e934 100644
--- a/src/mir_core/src/modules.cpp
+++ b/src/mir_core/src/modules.cpp
@@ -489,6 +489,14 @@ MIR_CORE_DLL(HANDLE) CreateServiceFunctionObjParam(const char *name, MIRANDASERV
return CreateServiceInt(3, name, (MIRANDASERVICE)serviceProc, object, lParam);
}
+MIR_CORE_DLL(HANDLE) CreateProtoServiceFunction(const char *szModule, const char *szService, MIRANDASERVICE serviceProc)
+{
+ char str[MAXMODULELABELLENGTH * 2];
+ strncpy_s(str, szModule, _TRUNCATE);
+ strncat_s(str, szService, _TRUNCATE);
+ return CreateServiceFunction(str, serviceProc);
+}
+
MIR_CORE_DLL(int) DestroyServiceFunction(HANDLE hService)
{
mir_cslock lck(csServices);
diff --git a/src/modules/protocols/protoint.cpp b/src/modules/protocols/protoint.cpp
index 6f9624f9f5..2fadfa4e89 100644
--- a/src/modules/protocols/protoint.cpp
+++ b/src/modules/protocols/protoint.cpp
@@ -46,7 +46,7 @@ void FreeFilesMatrix(TCHAR ***files)
struct DEFAULT_PROTO_INTERFACE : public PROTO_INTERFACE
{
- MCONTACT __cdecl AddToList(int flags, PROTOSEARCHRESULT* psr)
+ MCONTACT __cdecl AddToList(int flags, PROTOSEARCHRESULT *psr)
{
return (MCONTACT)ProtoCallService(m_szModuleName, PS_ADDTOLIST, flags, (LPARAM)psr);
}