INT_PTR CMraProto::MraSendSMS(WPARAM wParam, LPARAM lParam) { if (!m_bLoggedIn || !wParam || !lParam) return 0; ptrW lpwszMessageXMLEncoded( mir_utf8decodeW((LPSTR)lParam)); if (lpwszMessageXMLEncoded) { CMStringW decoded = DecodeXML( CMStringW(lpwszMessageXMLEncoded)); if (decoded.GetLength()) MraSMSW(NULL, CMStringA((LPSTR)wParam), decoded); } return 0; }
MIR_APP_DLL(void) ProtoLogW(struct PROTO_INTERFACE *pThis, LPCWSTR wszFormat, va_list args) { WCHAR buf[4096]; int res = _vsnwprintf(buf, _countof(buf), wszFormat, args); CallService(MS_NETLIB_LOGW, (WPARAM)(pThis ? pThis->m_hNetlibUser : NULL), (LPARAM)((res != -1) ? buf : CMStringW().FormatV(wszFormat, args))); }