2005-08-02 13:29:04 +02:00
|
|
|
/*
|
|
|
|
* 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
|
2006-05-18 14:49:52 +02:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
2005-08-02 13:29:04 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
#define COBJMACROS
|
|
|
|
|
|
|
|
#include <stdarg.h>
|
2021-10-20 11:39:06 +02:00
|
|
|
#include <libxml/parser.h>
|
|
|
|
#include <libxml/xmlerror.h>
|
2011-02-24 13:11:53 +01:00
|
|
|
|
2005-08-02 13:29:04 +02:00
|
|
|
#include "windef.h"
|
|
|
|
#include "winbase.h"
|
|
|
|
#include "winuser.h"
|
|
|
|
#include "ole2.h"
|
2006-11-13 16:31:45 +01:00
|
|
|
#include "msxml.h"
|
2005-11-08 20:59:36 +01:00
|
|
|
#include "msxml2.h"
|
2011-08-30 12:13:11 +02:00
|
|
|
#include "xmlparser.h"
|
2005-08-02 13:29:04 +02:00
|
|
|
|
2006-11-13 16:31:45 +01:00
|
|
|
/* undef the #define in msxml2 so that we can access the v.2 version
|
|
|
|
independent CLSID as well as the v.3 one. */
|
|
|
|
#undef CLSID_DOMDocument
|
|
|
|
|
2005-08-02 13:29:04 +02:00
|
|
|
#include "wine/debug.h"
|
|
|
|
|
|
|
|
#include "msxml_private.h"
|
|
|
|
|
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(msxml);
|
|
|
|
|
2014-01-09 12:57:58 +01:00
|
|
|
typedef HRESULT (*ClassFactoryCreateInstanceFunc)(void**);
|
|
|
|
typedef HRESULT (*DOMFactoryCreateInstanceFunc)(MSXML_VERSION, void**);
|
2011-08-24 14:00:16 +02:00
|
|
|
|
|
|
|
struct clsid_version_t
|
|
|
|
{
|
|
|
|
const GUID *clsid;
|
|
|
|
MSXML_VERSION version;
|
|
|
|
};
|
|
|
|
|
|
|
|
static const struct clsid_version_t clsid_versions_table[] =
|
|
|
|
{
|
|
|
|
{ &CLSID_DOMDocument, MSXML_DEFAULT },
|
2011-12-17 23:21:09 +01:00
|
|
|
{ &CLSID_DOMDocument2, MSXML2 },
|
|
|
|
{ &CLSID_DOMDocument26, MSXML26 },
|
|
|
|
{ &CLSID_DOMDocument30, MSXML3 },
|
|
|
|
{ &CLSID_DOMDocument40, MSXML4 },
|
|
|
|
{ &CLSID_DOMDocument60, MSXML6 },
|
2011-08-24 14:00:16 +02:00
|
|
|
|
|
|
|
{ &CLSID_DOMFreeThreadedDocument, MSXML_DEFAULT },
|
|
|
|
{ &CLSID_FreeThreadedDOMDocument, MSXML_DEFAULT },
|
2011-12-17 23:21:09 +01:00
|
|
|
{ &CLSID_FreeThreadedDOMDocument26, MSXML26 },
|
|
|
|
{ &CLSID_FreeThreadedDOMDocument30, MSXML3 },
|
|
|
|
{ &CLSID_FreeThreadedDOMDocument40, MSXML4 },
|
|
|
|
{ &CLSID_FreeThreadedDOMDocument60, MSXML6 },
|
2011-08-24 14:00:16 +02:00
|
|
|
|
|
|
|
{ &CLSID_XMLSchemaCache, MSXML_DEFAULT },
|
2011-12-17 23:21:09 +01:00
|
|
|
{ &CLSID_XMLSchemaCache26, MSXML26 },
|
|
|
|
{ &CLSID_XMLSchemaCache30, MSXML3 },
|
|
|
|
{ &CLSID_XMLSchemaCache40, MSXML4 },
|
|
|
|
{ &CLSID_XMLSchemaCache60, MSXML6 },
|
2011-08-24 14:06:58 +02:00
|
|
|
|
|
|
|
{ &CLSID_MXXMLWriter, MSXML_DEFAULT },
|
|
|
|
{ &CLSID_MXXMLWriter30, MSXML3 },
|
|
|
|
{ &CLSID_MXXMLWriter40, MSXML4 },
|
2011-10-24 20:08:46 +02:00
|
|
|
{ &CLSID_MXXMLWriter60, MSXML6 },
|
|
|
|
|
|
|
|
{ &CLSID_SAXXMLReader, MSXML_DEFAULT },
|
|
|
|
{ &CLSID_SAXXMLReader30, MSXML3 },
|
|
|
|
{ &CLSID_SAXXMLReader40, MSXML4 },
|
2012-03-08 21:11:45 +01:00
|
|
|
{ &CLSID_SAXXMLReader60, MSXML6 },
|
|
|
|
|
|
|
|
{ &CLSID_SAXAttributes, MSXML_DEFAULT },
|
|
|
|
{ &CLSID_SAXAttributes30, MSXML3 },
|
|
|
|
{ &CLSID_SAXAttributes40, MSXML4 },
|
2012-03-12 10:56:29 +01:00
|
|
|
{ &CLSID_SAXAttributes60, MSXML6 },
|
|
|
|
|
|
|
|
{ &CLSID_XMLView, MSXML_DEFAULT }
|
2011-08-24 14:00:16 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
static MSXML_VERSION get_msxml_version(const GUID *clsid)
|
|
|
|
{
|
2013-02-19 23:24:44 +01:00
|
|
|
unsigned int i;
|
2011-08-24 14:00:16 +02:00
|
|
|
|
2018-02-26 23:16:41 +01:00
|
|
|
for (i = 0; i < ARRAY_SIZE(clsid_versions_table); i++)
|
2011-08-24 14:00:16 +02:00
|
|
|
if (IsEqualGUID(clsid, clsid_versions_table[i].clsid))
|
|
|
|
return clsid_versions_table[i].version;
|
|
|
|
|
|
|
|
ERR("unknown clsid=%s\n", debugstr_guid(clsid));
|
|
|
|
return MSXML_DEFAULT;
|
|
|
|
}
|
2005-08-02 13:29:04 +02:00
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
* MSXML ClassFactory
|
|
|
|
*/
|
2010-09-14 07:15:31 +02:00
|
|
|
typedef struct
|
2005-08-02 13:29:04 +02:00
|
|
|
{
|
2011-05-18 23:42:33 +02:00
|
|
|
IClassFactory IClassFactory_iface;
|
2010-09-14 07:15:31 +02:00
|
|
|
ClassFactoryCreateInstanceFunc pCreateInstance;
|
|
|
|
} ClassFactory;
|
2005-08-02 13:29:04 +02:00
|
|
|
|
2010-09-14 07:15:31 +02:00
|
|
|
typedef struct
|
2005-08-02 13:29:04 +02:00
|
|
|
{
|
2011-05-18 23:42:33 +02:00
|
|
|
IClassFactory IClassFactory_iface;
|
2010-09-14 07:15:31 +02:00
|
|
|
LONG ref;
|
|
|
|
DOMFactoryCreateInstanceFunc pCreateInstance;
|
2011-08-24 14:00:16 +02:00
|
|
|
MSXML_VERSION version;
|
2010-09-14 07:15:31 +02:00
|
|
|
} DOMFactory;
|
2005-08-02 13:29:04 +02:00
|
|
|
|
2011-05-18 23:42:33 +02:00
|
|
|
static inline ClassFactory *ClassFactory_from_IClassFactory(IClassFactory *iface)
|
|
|
|
{
|
|
|
|
return CONTAINING_RECORD(iface, ClassFactory, IClassFactory_iface);
|
|
|
|
}
|
|
|
|
|
2010-09-14 07:15:31 +02:00
|
|
|
static HRESULT WINAPI ClassFactory_QueryInterface(
|
2005-08-02 13:29:04 +02:00
|
|
|
IClassFactory *iface,
|
|
|
|
REFIID riid,
|
2010-09-14 07:15:31 +02:00
|
|
|
void **ppobj )
|
2005-08-02 13:29:04 +02:00
|
|
|
{
|
|
|
|
if (IsEqualGUID(riid, &IID_IUnknown) ||
|
|
|
|
IsEqualGUID(riid, &IID_IClassFactory))
|
|
|
|
{
|
|
|
|
IClassFactory_AddRef( iface );
|
|
|
|
*ppobj = iface;
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2006-01-27 19:22:56 +01:00
|
|
|
FIXME("interface %s not implemented\n", debugstr_guid(riid));
|
2011-02-28 20:28:53 +01:00
|
|
|
*ppobj = NULL;
|
2005-08-02 13:29:04 +02:00
|
|
|
return E_NOINTERFACE;
|
|
|
|
}
|
|
|
|
|
2010-09-14 07:15:31 +02:00
|
|
|
static ULONG WINAPI ClassFactory_AddRef(IClassFactory *iface )
|
2005-08-02 13:29:04 +02:00
|
|
|
{
|
|
|
|
return 2;
|
|
|
|
}
|
|
|
|
|
2010-09-14 07:15:31 +02:00
|
|
|
static ULONG WINAPI ClassFactory_Release(IClassFactory *iface )
|
2005-08-02 13:29:04 +02:00
|
|
|
{
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
2010-09-14 07:15:31 +02:00
|
|
|
static HRESULT WINAPI ClassFactory_CreateInstance(
|
2005-08-02 13:29:04 +02:00
|
|
|
IClassFactory *iface,
|
2010-09-14 07:15:31 +02:00
|
|
|
IUnknown *pOuter,
|
2005-08-02 13:29:04 +02:00
|
|
|
REFIID riid,
|
2010-09-14 07:15:31 +02:00
|
|
|
void **ppobj )
|
2005-08-02 13:29:04 +02:00
|
|
|
{
|
2011-05-18 23:42:33 +02:00
|
|
|
ClassFactory *This = ClassFactory_from_IClassFactory(iface);
|
2005-08-02 13:29:04 +02:00
|
|
|
IUnknown *punk;
|
2010-09-14 07:15:31 +02:00
|
|
|
HRESULT r;
|
|
|
|
|
2005-08-02 13:29:04 +02:00
|
|
|
TRACE("%p %s %p\n", pOuter, debugstr_guid(riid), ppobj );
|
|
|
|
|
|
|
|
*ppobj = NULL;
|
|
|
|
|
|
|
|
if (pOuter)
|
|
|
|
return CLASS_E_NOAGGREGATION;
|
|
|
|
|
2014-01-09 12:57:58 +01:00
|
|
|
r = This->pCreateInstance( (void**) &punk );
|
2005-08-02 13:29:04 +02:00
|
|
|
if (FAILED(r))
|
|
|
|
return r;
|
|
|
|
|
|
|
|
r = IUnknown_QueryInterface( punk, riid, ppobj );
|
|
|
|
IUnknown_Release( punk );
|
|
|
|
return r;
|
|
|
|
}
|
|
|
|
|
2010-09-14 07:15:31 +02:00
|
|
|
static HRESULT WINAPI ClassFactory_LockServer(
|
2005-08-02 13:29:04 +02:00
|
|
|
IClassFactory *iface,
|
|
|
|
BOOL dolock)
|
|
|
|
{
|
|
|
|
FIXME("(%p)->(%d),stub!\n",iface,dolock);
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2011-05-18 23:42:33 +02:00
|
|
|
static inline DOMFactory *DOMFactory_from_IClassFactory(IClassFactory *iface)
|
|
|
|
{
|
|
|
|
return CONTAINING_RECORD(iface, DOMFactory, IClassFactory_iface);
|
|
|
|
}
|
|
|
|
|
2010-09-14 07:15:31 +02:00
|
|
|
static ULONG WINAPI DOMClassFactory_AddRef(IClassFactory *iface )
|
|
|
|
{
|
2022-02-03 11:48:04 +01:00
|
|
|
DOMFactory *factory = DOMFactory_from_IClassFactory(iface);
|
|
|
|
ULONG ref = InterlockedIncrement(&factory->ref);
|
|
|
|
TRACE("%p, refcount %lu.\n", iface, ref);
|
2010-09-14 07:15:31 +02:00
|
|
|
return ref;
|
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI DOMClassFactory_Release(IClassFactory *iface )
|
|
|
|
{
|
2022-02-03 11:48:04 +01:00
|
|
|
DOMFactory *factory = DOMFactory_from_IClassFactory(iface);
|
|
|
|
ULONG ref = InterlockedDecrement(&factory->ref);
|
|
|
|
|
|
|
|
TRACE("%p, refcount %lu.\n", iface, ref);
|
|
|
|
|
|
|
|
if (!ref)
|
|
|
|
heap_free(factory);
|
|
|
|
|
2010-09-14 07:15:31 +02:00
|
|
|
return ref;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI DOMClassFactory_CreateInstance(
|
|
|
|
IClassFactory *iface,
|
|
|
|
IUnknown *pOuter,
|
|
|
|
REFIID riid,
|
|
|
|
void **ppobj )
|
|
|
|
{
|
2011-05-18 23:42:33 +02:00
|
|
|
DOMFactory *This = DOMFactory_from_IClassFactory(iface);
|
2010-09-14 07:15:31 +02:00
|
|
|
IUnknown *punk;
|
|
|
|
HRESULT r;
|
|
|
|
|
|
|
|
TRACE("%p %s %p\n", pOuter, debugstr_guid(riid), ppobj );
|
|
|
|
|
|
|
|
*ppobj = NULL;
|
|
|
|
|
|
|
|
if (pOuter)
|
|
|
|
return CLASS_E_NOAGGREGATION;
|
|
|
|
|
2014-01-09 12:57:58 +01:00
|
|
|
r = This->pCreateInstance( This->version, (void**) &punk );
|
2010-09-14 07:15:31 +02:00
|
|
|
if (FAILED(r))
|
|
|
|
return r;
|
|
|
|
|
|
|
|
r = IUnknown_QueryInterface( punk, riid, ppobj );
|
|
|
|
IUnknown_Release( punk );
|
|
|
|
return r;
|
|
|
|
}
|
|
|
|
|
|
|
|
static const struct IClassFactoryVtbl ClassFactoryVtbl =
|
2005-08-02 13:29:04 +02:00
|
|
|
{
|
2010-09-14 07:15:31 +02:00
|
|
|
ClassFactory_QueryInterface,
|
|
|
|
ClassFactory_AddRef,
|
|
|
|
ClassFactory_Release,
|
|
|
|
ClassFactory_CreateInstance,
|
|
|
|
ClassFactory_LockServer
|
2005-08-02 13:29:04 +02:00
|
|
|
};
|
|
|
|
|
2010-09-14 07:15:31 +02:00
|
|
|
static const struct IClassFactoryVtbl DOMClassFactoryVtbl =
|
|
|
|
{
|
|
|
|
ClassFactory_QueryInterface,
|
|
|
|
DOMClassFactory_AddRef,
|
|
|
|
DOMClassFactory_Release,
|
|
|
|
DOMClassFactory_CreateInstance,
|
|
|
|
ClassFactory_LockServer
|
|
|
|
};
|
|
|
|
|
|
|
|
static HRESULT DOMClassFactory_Create(const GUID *clsid, REFIID riid, void **ppv, DOMFactoryCreateInstanceFunc fnCreateInstance)
|
|
|
|
{
|
|
|
|
DOMFactory *ret = heap_alloc(sizeof(DOMFactory));
|
|
|
|
HRESULT hres;
|
|
|
|
|
2011-05-18 23:42:33 +02:00
|
|
|
ret->IClassFactory_iface.lpVtbl = &DOMClassFactoryVtbl;
|
2010-09-14 07:15:31 +02:00
|
|
|
ret->ref = 0;
|
2011-08-24 14:00:16 +02:00
|
|
|
ret->version = get_msxml_version(clsid);
|
2010-09-14 07:15:31 +02:00
|
|
|
ret->pCreateInstance = fnCreateInstance;
|
|
|
|
|
2011-05-18 23:42:33 +02:00
|
|
|
hres = IClassFactory_QueryInterface(&ret->IClassFactory_iface, riid, ppv);
|
2010-09-14 07:15:31 +02:00
|
|
|
if(FAILED(hres)) {
|
|
|
|
heap_free(ret);
|
|
|
|
*ppv = NULL;
|
|
|
|
}
|
|
|
|
return hres;
|
|
|
|
}
|
|
|
|
|
2011-05-18 23:42:33 +02:00
|
|
|
static ClassFactory xmldoccf = { { &ClassFactoryVtbl }, XMLDocument_create };
|
|
|
|
static ClassFactory httpreqcf = { { &ClassFactoryVtbl }, XMLHTTPRequest_create };
|
2012-05-19 09:24:50 +02:00
|
|
|
static ClassFactory serverhttp = { { &ClassFactoryVtbl }, ServerXMLHTTP_create };
|
2011-05-18 23:42:33 +02:00
|
|
|
static ClassFactory xsltemplatecf = { { &ClassFactoryVtbl }, XSLTemplate_create };
|
2011-08-21 19:30:58 +02:00
|
|
|
static ClassFactory mxnsmanagercf = { {&ClassFactoryVtbl }, MXNamespaceManager_create };
|
2011-08-30 12:13:11 +02:00
|
|
|
static ClassFactory xmlparsercf = { { &ClassFactoryVtbl }, XMLParser_create };
|
2012-03-12 10:56:29 +01:00
|
|
|
static ClassFactory xmlviewcf = { { &ClassFactoryVtbl }, XMLView_create };
|
2005-08-02 13:29:04 +02:00
|
|
|
|
2005-08-10 11:53:47 +02:00
|
|
|
/******************************************************************
|
|
|
|
* DllGetClassObject (MSXML3.@)
|
|
|
|
*/
|
2010-09-14 07:15:31 +02:00
|
|
|
HRESULT WINAPI DllGetClassObject( REFCLSID rclsid, REFIID riid, void **ppv )
|
2005-08-02 13:29:04 +02:00
|
|
|
{
|
|
|
|
IClassFactory *cf = NULL;
|
|
|
|
|
2010-09-14 07:15:31 +02:00
|
|
|
TRACE("%s %s %p\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv );
|
2005-08-02 13:29:04 +02:00
|
|
|
|
2010-08-29 23:31:07 +02:00
|
|
|
if( IsEqualCLSID( rclsid, &CLSID_DOMDocument ) || /* Version indep. v 2.x */
|
2007-02-27 13:32:02 +01:00
|
|
|
IsEqualCLSID( rclsid, &CLSID_DOMDocument2 ) || /* Version indep. v 3.0 */
|
2010-12-21 13:27:20 +01:00
|
|
|
IsEqualCLSID( rclsid, &CLSID_DOMDocument26 )|| /* Version dep. v 2.6 */
|
2010-02-03 20:34:45 +01:00
|
|
|
IsEqualCLSID( rclsid, &CLSID_DOMDocument30 )|| /* Version dep. v 3.0 */
|
2010-08-29 23:31:07 +02:00
|
|
|
IsEqualCLSID( rclsid, &CLSID_DOMDocument40 )|| /* Version dep. v 4.0 */
|
|
|
|
IsEqualCLSID( rclsid, &CLSID_DOMDocument60 )) /* Version dep. v 6.0 */
|
2007-05-24 20:13:06 +02:00
|
|
|
{
|
2021-08-17 15:18:53 +02:00
|
|
|
return DOMClassFactory_Create(rclsid, riid, ppv, dom_document_create);
|
2007-05-24 20:13:06 +02:00
|
|
|
}
|
2010-09-09 12:21:21 +02:00
|
|
|
else if( IsEqualCLSID( rclsid, &CLSID_XMLSchemaCache ) ||
|
2010-12-21 13:27:20 +01:00
|
|
|
IsEqualCLSID( rclsid, &CLSID_XMLSchemaCache26 ) ||
|
2010-09-09 12:21:21 +02:00
|
|
|
IsEqualCLSID( rclsid, &CLSID_XMLSchemaCache30 ) ||
|
|
|
|
IsEqualCLSID( rclsid, &CLSID_XMLSchemaCache40 ) ||
|
|
|
|
IsEqualCLSID( rclsid, &CLSID_XMLSchemaCache60 ))
|
2007-05-24 20:13:06 +02:00
|
|
|
{
|
2010-11-24 20:53:47 +01:00
|
|
|
return DOMClassFactory_Create(rclsid, riid, ppv, SchemaCache_create);
|
2007-05-24 20:13:06 +02:00
|
|
|
}
|
|
|
|
else if( IsEqualCLSID( rclsid, &CLSID_XMLDocument ) )
|
|
|
|
{
|
2011-05-18 23:42:33 +02:00
|
|
|
cf = &xmldoccf.IClassFactory_iface;
|
2007-05-24 20:13:06 +02:00
|
|
|
}
|
2010-08-29 23:31:07 +02:00
|
|
|
else if( IsEqualCLSID( rclsid, &CLSID_DOMFreeThreadedDocument ) || /* Version indep. v 2.x */
|
|
|
|
IsEqualCLSID( rclsid, &CLSID_FreeThreadedDOMDocument ) ||
|
2010-12-21 13:27:20 +01:00
|
|
|
IsEqualCLSID( rclsid, &CLSID_FreeThreadedDOMDocument26 ) ||
|
2010-08-29 23:31:07 +02:00
|
|
|
IsEqualCLSID( rclsid, &CLSID_FreeThreadedDOMDocument30 ) ||
|
2010-08-29 23:33:04 +02:00
|
|
|
IsEqualCLSID( rclsid, &CLSID_FreeThreadedDOMDocument40 ) ||
|
2010-08-29 23:31:07 +02:00
|
|
|
IsEqualCLSID( rclsid, &CLSID_FreeThreadedDOMDocument60 ))
|
2007-12-10 23:02:36 +01:00
|
|
|
{
|
2021-08-17 15:18:53 +02:00
|
|
|
return DOMClassFactory_Create(rclsid, riid, ppv, dom_document_create);
|
2007-12-10 23:02:36 +01:00
|
|
|
}
|
2008-03-25 04:19:10 +01:00
|
|
|
else if( IsEqualCLSID( rclsid, &CLSID_SAXXMLReader) ||
|
2010-02-13 12:59:18 +01:00
|
|
|
IsEqualCLSID( rclsid, &CLSID_SAXXMLReader30 ) ||
|
2010-09-09 12:21:21 +02:00
|
|
|
IsEqualCLSID( rclsid, &CLSID_SAXXMLReader40 ) ||
|
|
|
|
IsEqualCLSID( rclsid, &CLSID_SAXXMLReader60 ))
|
2008-03-25 04:19:10 +01:00
|
|
|
{
|
2011-10-24 20:08:46 +02:00
|
|
|
return DOMClassFactory_Create(rclsid, riid, ppv, SAXXMLReader_create);
|
2008-03-25 04:19:10 +01:00
|
|
|
}
|
2010-10-05 22:01:45 +02:00
|
|
|
else if( IsEqualCLSID( rclsid, &CLSID_XMLHTTPRequest ) ||
|
2011-06-16 16:17:35 +02:00
|
|
|
IsEqualCLSID( rclsid, &CLSID_XMLHTTP) ||
|
2010-10-05 22:01:45 +02:00
|
|
|
IsEqualCLSID( rclsid, &CLSID_XMLHTTP26 ) ||
|
|
|
|
IsEqualCLSID( rclsid, &CLSID_XMLHTTP30 ) ||
|
|
|
|
IsEqualCLSID( rclsid, &CLSID_XMLHTTP40 ) ||
|
|
|
|
IsEqualCLSID( rclsid, &CLSID_XMLHTTP60 ))
|
2008-10-03 13:50:59 +02:00
|
|
|
{
|
2011-05-18 23:42:33 +02:00
|
|
|
cf = &httpreqcf.IClassFactory_iface;
|
2008-10-03 13:50:59 +02:00
|
|
|
}
|
2012-05-19 09:24:50 +02:00
|
|
|
else if( IsEqualCLSID( rclsid, &CLSID_ServerXMLHTTP ) ||
|
|
|
|
IsEqualCLSID( rclsid, &CLSID_ServerXMLHTTP30 ) ||
|
|
|
|
IsEqualCLSID( rclsid, &CLSID_ServerXMLHTTP40 ) ||
|
|
|
|
IsEqualCLSID( rclsid, &CLSID_ServerXMLHTTP60 ))
|
|
|
|
{
|
|
|
|
cf = &serverhttp.IClassFactory_iface;
|
|
|
|
}
|
2011-02-10 22:08:11 +01:00
|
|
|
else if( IsEqualCLSID( rclsid, &CLSID_XSLTemplate ) ||
|
|
|
|
IsEqualCLSID( rclsid, &CLSID_XSLTemplate26 ) ||
|
|
|
|
IsEqualCLSID( rclsid, &CLSID_XSLTemplate30 ) ||
|
|
|
|
IsEqualCLSID( rclsid, &CLSID_XSLTemplate40 ) ||
|
|
|
|
IsEqualCLSID( rclsid, &CLSID_XSLTemplate60 ))
|
|
|
|
{
|
2011-05-18 23:42:33 +02:00
|
|
|
cf = &xsltemplatecf.IClassFactory_iface;
|
2011-02-10 22:08:11 +01:00
|
|
|
}
|
2011-04-30 09:42:29 +02:00
|
|
|
else if( IsEqualCLSID( rclsid, &CLSID_MXXMLWriter ) ||
|
|
|
|
IsEqualCLSID( rclsid, &CLSID_MXXMLWriter30 ) ||
|
|
|
|
IsEqualCLSID( rclsid, &CLSID_MXXMLWriter40 ) ||
|
|
|
|
IsEqualCLSID( rclsid, &CLSID_MXXMLWriter60 ) )
|
|
|
|
{
|
2011-08-24 14:06:58 +02:00
|
|
|
return DOMClassFactory_Create(rclsid, riid, ppv, MXWriter_create);
|
2011-04-30 09:42:29 +02:00
|
|
|
}
|
2012-03-08 21:11:45 +01:00
|
|
|
else if( IsEqualCLSID( rclsid, &CLSID_SAXAttributes) ||
|
|
|
|
IsEqualCLSID( rclsid, &CLSID_SAXAttributes30 ) ||
|
|
|
|
IsEqualCLSID( rclsid, &CLSID_SAXAttributes40 ) ||
|
|
|
|
IsEqualCLSID( rclsid, &CLSID_SAXAttributes60 ))
|
|
|
|
{
|
|
|
|
return DOMClassFactory_Create(rclsid, riid, ppv, SAXAttributes_create);
|
|
|
|
}
|
2011-08-21 19:30:58 +02:00
|
|
|
else if( IsEqualCLSID( rclsid, &CLSID_MXNamespaceManager ) ||
|
|
|
|
IsEqualCLSID( rclsid, &CLSID_MXNamespaceManager40 ) ||
|
|
|
|
IsEqualCLSID( rclsid, &CLSID_MXNamespaceManager60 ) )
|
|
|
|
{
|
|
|
|
cf = &mxnsmanagercf.IClassFactory_iface;
|
|
|
|
}
|
2011-08-30 12:13:11 +02:00
|
|
|
else if( IsEqualCLSID( rclsid, &CLSID_XMLParser ) ||
|
|
|
|
IsEqualCLSID( rclsid, &CLSID_XMLParser26 ) ||
|
|
|
|
IsEqualCLSID( rclsid, &CLSID_XMLParser30 ) )
|
|
|
|
{
|
|
|
|
cf = &xmlparsercf.IClassFactory_iface;
|
|
|
|
}
|
2012-03-12 10:56:29 +01:00
|
|
|
else if( IsEqualCLSID( rclsid, &CLSID_XMLView ) )
|
|
|
|
{
|
|
|
|
cf = &xmlviewcf.IClassFactory_iface;
|
|
|
|
}
|
2007-02-27 13:32:02 +01:00
|
|
|
|
2005-08-02 13:29:04 +02:00
|
|
|
if ( !cf )
|
|
|
|
return CLASS_E_CLASSNOTAVAILABLE;
|
|
|
|
|
2010-09-14 07:15:31 +02:00
|
|
|
return IClassFactory_QueryInterface( cf, riid, ppv );
|
2005-08-02 13:29:04 +02:00
|
|
|
}
|