Commit dcc2d6c2 authored by Mike McCormack's avatar Mike McCormack Committed by Alexandre Julliard

Initial implementation of msxml3 based on libxml2.

parent 57cd2df5
......@@ -424,6 +424,19 @@ else
X_LIBS=""
fi
dnl **** Check for libxml2 ****
AC_SUBST(XML2LIBS,"")
AC_SUBST(XML2INCL,"")
ac_save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS -I/usr/include/libxml2"
AC_CHECK_HEADERS(libxml/parser.h,
[AC_CHECK_LIB(xml2, xmlReadIO,
[AC_DEFINE(HAVE_LIBXML2, 1, [Define if you have the libxml2 library])
XML2LIBS="-lxml2"
XML2INCL="-I/usr/include/libxml2"])])
CPPFLAGS="$ac_save_CPPFLAGS"
dnl **** Check which curses lib to use ***
CURSESLIBS=""
if test "x$with_curses" != "xno"
......@@ -1650,6 +1663,7 @@ dlls/msvcrtd/tests/Makefile
dlls/msvidc32/Makefile
dlls/msvideo/Makefile
dlls/mswsock/Makefile
dlls/msxml3/Makefile
dlls/netapi32/Makefile
dlls/netapi32/tests/Makefile
dlls/newdev/Makefile
......
......@@ -96,6 +96,7 @@ BASEDIRS = \
msvidc32 \
msvideo \
mswsock \
msxml3 \
netapi32 \
newdev \
ntdll \
......@@ -345,6 +346,7 @@ SYMLINKS_SO = \
msvfw32.dll.so \
msvidc32.dll.so \
mswsock.dll.so \
msxml3.dll.so \
netapi32.dll.so \
newdev.dll.so \
ntdll.dll.so \
......@@ -738,6 +740,9 @@ msvidc32.dll.so: msvidc32/msvidc32.dll.so
mswsock.dll.so: mswsock/mswsock.dll.so
$(RM) $@ && $(LN_S) mswsock/mswsock.dll.so $@
msxml3.dll.so: msxml3/msxml3.dll.so
$(RM) $@ && $(LN_S) msxml3/msxml3.dll.so $@
netapi32.dll.so: netapi32/netapi32.dll.so
$(RM) $@ && $(LN_S) netapi32/netapi32.dll.so $@
......@@ -1694,6 +1699,7 @@ msvcrtd/msvcrtd.dll.so: msvcrtd
msvideo/msvfw32.dll.so: msvideo
msvidc32/msvidc32.dll.so: msvidc32
mswsock/mswsock.dll.so: mswsock
msxml3/msxml3.dll.so: msxml3
netapi32/netapi32.dll.so: netapi32
newdev/newdev.dll.so: newdev
ntdll/ntdll.dll.so: ntdll
......
Makefile
msxml3.dll.dbg.c
EXTRADEFS = -DCOM_NO_WINDOWS_H
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = msxml3.dll
IMPORTS = oleaut32 advapi32 kernel32 ntdll
EXTRALIBS = -luuid $(LIBUNICODE) @XML2LIBS@
EXTRAINCL = @XML2INCL@
C_SRCS = \
domdoc.c \
factory.c \
main.c
@MAKE_DLL_RULES@
### Dependencies:
/*
* MSXML Class Factory
*
* Copyright 2002 Lionel Ulmer
* Copyright 2005 Mike McCormack
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#define COBJMACROS
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "ole2.h"
#include "uuids.h"
#include "msxml.h"
#include "xmldom.h"
#include "wine/debug.h"
#include "msxml_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(msxml);
typedef HRESULT (*fnCreateInstance)(IUnknown *pUnkOuter, LPVOID *ppObj);
/******************************************************************************
* MSXML ClassFactory
*/
typedef struct _xmlcf
{
const struct IClassFactoryVtbl *lpVtbl;
fnCreateInstance pfnCreateInstance;
} xmlcf;
static inline xmlcf *impl_from_IClassFactory( IClassFactory *iface )
{
return (xmlcf *)((char*)iface - FIELD_OFFSET(xmlcf, lpVtbl));
}
static HRESULT WINAPI xmlcf_QueryInterface(
IClassFactory *iface,
REFIID riid,
LPVOID *ppobj )
{
if (IsEqualGUID(riid, &IID_IUnknown) ||
IsEqualGUID(riid, &IID_IClassFactory))
{
IClassFactory_AddRef( iface );
*ppobj = iface;
return S_OK;
}
return E_NOINTERFACE;
}
static ULONG WINAPI xmlcf_AddRef(
IClassFactory *iface )
{
return 2;
}
static ULONG WINAPI xmlcf_Release(
IClassFactory *iface )
{
return 1;
}
static HRESULT WINAPI xmlcf_CreateInstance(
IClassFactory *iface,
LPUNKNOWN pOuter,
REFIID riid,
LPVOID *ppobj )
{
xmlcf *This = impl_from_IClassFactory( iface );
HRESULT r;
IUnknown *punk;
TRACE("%p %s %p\n", pOuter, debugstr_guid(riid), ppobj );
*ppobj = NULL;
if (pOuter)
return CLASS_E_NOAGGREGATION;
r = This->pfnCreateInstance( pOuter, (LPVOID*) &punk );
if (FAILED(r))
return r;
r = IUnknown_QueryInterface( punk, riid, ppobj );
if (FAILED(r))
return r;
IUnknown_Release( punk );
return r;
}
static HRESULT WINAPI xmlcf_LockServer(
IClassFactory *iface,
BOOL dolock)
{
FIXME("(%p)->(%d),stub!\n",iface,dolock);
return S_OK;
}
const struct IClassFactoryVtbl xmlcf_vtbl =
{
xmlcf_QueryInterface,
xmlcf_AddRef,
xmlcf_Release,
xmlcf_CreateInstance,
xmlcf_LockServer
};
static xmlcf domdoccf = { &xmlcf_vtbl, DOMDocument_create };
HRESULT MSXML_DllGetClassObject( REFCLSID rclsid, REFIID iid, LPVOID *ppv )
{
IClassFactory *cf = NULL;
TRACE("%s %s %p\n", debugstr_guid(rclsid), debugstr_guid(iid), ppv );
if( IsEqualGUID( rclsid, &CLSID_DOMDocument ) )
cf = (IClassFactory*) &domdoccf.lpVtbl;
if ( !cf )
return CLASS_E_CLASSNOTAVAILABLE;
return IClassFactory_QueryInterface( cf, iid, ppv );
}
/*
* MSXML Class Factory
*
* Copyright 2002 Lionel Ulmer
* Copyright 2005 Mike McCormack
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "ole2.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(msxml);
HRESULT WINAPI MSXML_DllCanUnloadNow(void)
{
FIXME("\n");
return S_FALSE;
}
BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
{
switch(fdwReason)
{
case DLL_PROCESS_ATTACH:
DisableThreadLibraryCalls(hInstDLL);
break;
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
HRESULT WINAPI MSXML_DllRegisterServer(void)
{
FIXME("\n");
return S_OK;
}
6 stub @
7 stub @
8 stub @
9 stub @
10 stub @
11 stub @
12 stub @
@ stdcall -private DllCanUnloadNow() MSXML_DllCanUnloadNow
@ stdcall -private DllGetClassObject(ptr ptr ptr) MSXML_DllGetClassObject
@ stdcall -private DllRegisterServer() MSXML_DllRegisterServer
@ stub DllUnregisterServer
/*
* MSXML Class Factory
*
* Copyright 2005 Mike McCormack
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __MSXML_PRIVATE__
#define __MSXML_PRIVATE__
extern HRESULT DOMDocument_create( IUnknown *pUnkOuter, LPVOID *ppObj );
#endif /* __MSXML_PRIVATE__ */
......@@ -296,6 +296,12 @@
/* Define to 1 if you have the `w' library (-lw). */
#undef HAVE_LIBW
/* Define if you have the libxml2 library */
#undef HAVE_LIBXML2
/* Define to 1 if you have the <libxml/parser.h> header file. */
#undef HAVE_LIBXML_PARSER_H
/* Define to 1 if you have the `xpg4' library (-lxpg4). */
#undef HAVE_LIBXPG4
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment