summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mir_core/mir_core.def2
-rw-r--r--src/mir_core/protos.cpp19
2 files changed, 21 insertions, 0 deletions
diff --git a/src/mir_core/mir_core.def b/src/mir_core/mir_core.def
index add3c18cf3..e78ccb8ffa 100644
--- a/src/mir_core/mir_core.def
+++ b/src/mir_core/mir_core.def
@@ -243,3 +243,5 @@ IsWinVer7Plus @240
IsFullScreen @241
IsWorkstationLocked @242
IsScreenSaverRunning @243
+ProtoLogA @244
+ProtoLogW @245
diff --git a/src/mir_core/protos.cpp b/src/mir_core/protos.cpp
index 369f8b7abd..02d5cb2139 100644
--- a/src/mir_core/protos.cpp
+++ b/src/mir_core/protos.cpp
@@ -26,6 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <m_protomod.h>
#include <m_protoint.h>
#include <m_skin.h>
+#include <m_netlib.h>
static HANDLE hAckEvent;
@@ -42,6 +43,24 @@ void UninitProtocols()
}
}
+/////////////////////////////////////////////////////////////////////////////////////////
+
+MIR_CORE_DLL(void) ProtoLogA(struct PROTO_INTERFACE *pThis, LPCSTR szFormat, va_list args)
+{
+ char buf[4096];
+ vsprintf_s(buf, sizeof(buf), szFormat, args);
+ CallService(MS_NETLIB_LOG, (WPARAM)pThis->m_hNetlibUser, (LPARAM)buf);
+}
+
+MIR_CORE_DLL(void) ProtoLogW(struct PROTO_INTERFACE *pThis, LPCWSTR wszFormat, va_list args)
+{
+ WCHAR buf[4096];
+ vswprintf_s(buf, SIZEOF(buf), wszFormat, args);
+ CallService(MS_NETLIB_LOGW, (WPARAM)pThis->m_hNetlibUser, (LPARAM)buf);
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+
MIR_CORE_DLL(INT_PTR) ProtoBroadcastAck(const char *szModule, HANDLE hContact, int type, int result, HANDLE hProcess, LPARAM lParam)
{
if (type == ACKTYPE_AVATAR && hProcess) {