summaryrefslogtreecommitdiff
path: root/include/m_protoint.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/m_protoint.h')
-rw-r--r--include/m_protoint.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/m_protoint.h b/include/m_protoint.h
index fff60ea614..4d3a908168 100644
--- a/include/m_protoint.h
+++ b/include/m_protoint.h
@@ -330,6 +330,13 @@ template<class T> struct PROTO : public PROTO_INTERFACE
typedef INT_PTR(MIR_CDECL T::*MyServiceFuncParam)(WPARAM, LPARAM, LPARAM);
__forceinline void CreateProtoServiceParam(const char *name, MyServiceFuncParam pFunc, LPARAM param) {
::ProtoCreateServiceParam(this, name, (ProtoServiceFuncParam)pFunc, param); }
+
+ template<INT_PTR(__cdecl T::*MyGlobalService)(WPARAM, LPARAM)>
+ static INT_PTR MIR_CDECL GlobalService(WPARAM hContact, LPARAM lParam)
+ {
+ T *proto = CMPlugin::getInstance((MCONTACT)hContact);
+ return proto ? (proto->*MyGlobalService)(hContact, lParam) : 0;
+ }
};
/////////////////////////////////////////////////////////////////////////////////////////