From ea88e2c53d3ac0840955eb703213ca1430bb4361 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 25 Feb 2019 23:47:56 +0300 Subject: PROTORECVFILE now uses const char/wchar_t pointers. also fixes #1864 completely --- include/m_core.h | 6 ++++++ include/m_protosvc.h | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/m_core.h b/include/m_core.h index 610a04ff7e..71a414de83 100644 --- a/include/m_core.h +++ b/include/m_core.h @@ -446,6 +446,12 @@ union MAllStringArray wchar_t **w; // array of strings of WCHARs }; +union MAllCStringArray +{ + const char **a; // array of utf8 or ansi strings + const wchar_t **w; // array of strings of WCHARs +}; + MIR_CORE_DLL(wchar_t*) mir_a2u_cp(const char* src, int codepage); MIR_CORE_DLL(wchar_t*) mir_a2u(const char* src); MIR_CORE_DLL(char*) mir_u2a_cp(const wchar_t* src, int codepage); diff --git a/include/m_protosvc.h b/include/m_protosvc.h index aea91827ea..8ffed797c1 100644 --- a/include/m_protosvc.h +++ b/include/m_protosvc.h @@ -778,9 +778,9 @@ struct PROTORECVFILE { DWORD dwFlags; // PRFF_* DWORD timestamp; // unix time - MAllStrings descr; // file description + MAllCStrings descr; // file description int fileCount; // number of files being transferred - MAllStringArray files; // array of file names + MAllCStringArray files; // array of file names LPARAM lParam; // extra space for the network level protocol module }; -- cgit v1.2.3