Initialize and clean up libxml2 in DllMain.
This commit is contained in:
parent
adbb098837
commit
86a47c4dbd
|
@ -19,6 +19,8 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
|
@ -27,6 +29,8 @@
|
|||
|
||||
#include "wine/debug.h"
|
||||
|
||||
#include "msxml_private.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(msxml);
|
||||
|
||||
HRESULT WINAPI DllCanUnloadNow(void)
|
||||
|
@ -40,9 +44,15 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
|
|||
switch(fdwReason)
|
||||
{
|
||||
case DLL_PROCESS_ATTACH:
|
||||
#ifdef HAVE_LIBXML2
|
||||
xmlInitParser();
|
||||
#endif
|
||||
DisableThreadLibraryCalls(hInstDLL);
|
||||
break;
|
||||
case DLL_PROCESS_DETACH:
|
||||
#ifdef HAVE_LIBXML2
|
||||
xmlCleanupParser();
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
return TRUE;
|
||||
|
|
|
@ -21,6 +21,8 @@
|
|||
#ifndef __MSXML_PRIVATE__
|
||||
#define __MSXML_PRIVATE__
|
||||
|
||||
#include "xmldom.h"
|
||||
|
||||
#ifdef HAVE_LIBXML2
|
||||
|
||||
#include <libxml/parser.h>
|
||||
|
|
Loading…
Reference in New Issue