logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jacob L. Anawalt" <janaw...@geckosoftware.com>
Subject Re: Visual C++ Assertion failed when using LOG4CXX_DECODE_CHAR macro in statically linked MFC project
Date Mon, 01 Dec 2008 19:15:30 GMT
On 2008-12-01 06:01, Peter Doornbosch wrote:
> Got it now. As  the application is defining _ MBCS, LPCTSTR is actually a
> pointer to a char,

Long Pointer to a Const Tchar STRing.

> which i must convert to unicode (using
> MultiByteToWideChar), as the LogString constructor is expecting unicode, is
> that right?
> 

I don't know if that is the cause of your error, it would cause size differences 
when using functions that assume sizeof(character) (eg TCHAR) == sizeof(char) 
(byte) and confuse character counts with byte sizes. Seems strange that it would 
work or not depending on your use of MFC (static or not). That sounds more like 
a new/free or other memory tracking mixup.

-- 
Jacob Anawalt
Gecko Software, Inc.
janawalt@geckosoftware.com
435-752-8026

Mime
View raw message