Hi Raymond, The short answer is you can't terminate more than once. There are many discussions on this topic in the mailing list archive. http://marc.theaimsgroup.com/?l=xerces-c-dev Cheers, Walker [EMAIL PROTECTED] on 05/07/2001 03:16:51 PM Please respond to [EMAIL PROTECTED]@SMTP To: [EMAIL PROTECTED]@SMTP cc: Subject: Problem initializing and terminating XMLPlatformUtils more than o nce in a program Classification: 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]
