Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Duplicate
-
0.10.0
-
None
-
None
-
Microsoft Windows XP prof, Visual Studio 2005 with SP1, C++ COM-programming with Active template Library
Description
Sorry, my english poor.
Use classes from Active Template Library version 7 and above, helps conversion string from/to any types as argument of LOG4CXX_ macros not work properly. For example, this code:
OLECHAR *pName = _TEXT("Some string");
LOG4CXX_INFO(logger, COLE2T(pName));
write to appender number (as DWORD hexadecimal - may be reference) instead "Some string".
For issue this problem use it:
OLECHAR *pName = _TEXT("Some string");
COLE2T temp(pName);
LOG4CXX_INFO(logger, temp.m_psz);
Also possible use early conversion ATL3 macro:
OLECHAR *pName = _TEXT("Some string");
LOG4CXX_INFO(logger, OLE2T(pName));
Thank you.
Attachments
Issue Links
- duplicates
-
LOGCXX-274 Logging MFC CString's produce unexpected results in Unicode builds
- Resolved