Win32MsgLoader does not work with Borland C++ 6.0
-------------------------------------------------
Key: XERCESC-1347
URL: http://issues.apache.org/jira/browse/XERCESC-1347
Project: Xerces-C++
Type: Bug
Components: Build
Versions: 2.6.0
Environment: win32, Borland C++ Builder 6.0 Update 4
Reporter: Wojciech Seliga
Priority: Minor
After succesful compilation and linking of XercesLib.dll using BCB6 makefile
(modifed as described in #1346), it turned out that messages (e.g. coming from
exceptions) do not work correctly (they are always empty).
I analysed the sources.
There is a class responsible for retrieving messages from DLL resources (on
win32 platform only) - Win32MsgLoader.
Inside Win32MsgLoader.cpp DllMain() is defined, in which current HINSTANCE is
remembered in globalModuleHandle. Unfortunately this DllMain is not invoked at
all by win32 kernel, because other DllMain() function (with default body) is
defined in Projects\Win32\BCB6\Xerces-all\XercesLib\XercesLib.cpp and
XercesLib.obj is also linked as specifed in makefile XercesLib.mak.
So there is no chance that this functionality can work - unless linker takes
different DllMain (which it doesn't do in my dev environment). The best is to
remove redundant DllMain definition if Win32MsgLoader is used
(XML_USE_WIN32_MSGLOADER macro).
When I applied this fix on my own, then another problem occurred: messages
retrieved from resources seem to be corrupted. My first investigation showed
that messages can be invalid processed by Borland resource compiler - they seem
to be invalid Unicode strings.
Solution I am using for the moment: using XML_USE_INMEM_MESSAGELOADER
(InMemMsgLoader instead of Win32MsgLoader).
Any comments or hints are welcome.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]