Hi, Ray,
The FAQ answer your question very clearly. pls refer to
http://xml.apache.org/xerces-c/faq-parse.html#faq-22.
Regards,
Peiyong Zhang
____________________________________________
XML Parsers Development
IBM Toronto Laboratory email: [EMAIL PROTECTED]
Phone: (416)448-4088; Fax: (416)448-4414; T/L: 778-4088
"Mitchell, Raymond" <[EMAIL PROTECTED]> on 05/07/2001 06:00:30 PM
Please respond to [EMAIL PROTECTED]
To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
cc:
Subject: Problem initializing and terminating XMLPlatformUtils more than o
nce in a program
I have run into a problem attempting to initialize and terminate
XMLPlatformUtils more than once in a single program. The following code
causes the error.
XMLPlatformUtils::Initialize();
DOMParser *pDOMParser = new DOMParser;
delete pDOMParser;
XMLPlatformUtils::Terminate();
XMLPlatformUtils::Initialize();
pDOMParser = new DOMParser; // Error occurs
here
delete pDOMParser;
XMLPlatformUtils::Terminate();
The error message indicates that an illegal memory access has occured. The
stack trace indicates that the error is occuring when trying to obtain the
XMLMutex while constructing the XMLScanner. Here is the stack trace:
NTDLL! 77f8aa57()
XMLMutex::lock() line 117 + 11 bytes
XMLMutexLock::XMLMutexLock(XMLMutex * const 0x007a7b50) line 135
XMLScanner::commonInit() line 784 + 14 bytes
XMLScanner::XMLScanner(XMLValidator * const 0x007a7f90) line 162
DOMParser::DOMParser(XMLValidator * const 0x00000000) line 123 +
41
bytes
main(int 2, char * * 0x007a1870) line 182 + 46 bytes
Is it supposed to be possible to initialize and terminate the
XMLPlatformUtils more than once in a single program, or does calling
XMLPatformUtils::Terminate() cause future calls to
XMLPlatformUtils::Initialize() only to appear to work?
Thanks,
Ray
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]