I solved this problem using
FreeLibrary(hModule);
LoadLibrary(hModule);
every time I need reinitialize parser.
Boris
----- Original Message -----
From: "Mitchell, Raymond" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, May 07, 2001 6:00 PM
Subject: Problem initializing and terminating XMLPlatformUtils more than
once 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]