diff --git a/webshell/embed/ActiveX/xml/ParseExpat.cpp b/webshell/embed/ActiveX/xml/ParseExpat.cpp new file mode 100644 index 000000000000..c42b2b92ce6b --- /dev/null +++ b/webshell/embed/ActiveX/xml/ParseExpat.cpp @@ -0,0 +1,102 @@ +#include "stdafx.h" + +#include "xmlparse.h" + +struct ParserState +{ + CComQIPtr spXMLDocument; + CComQIPtr spXMLParent; +}; + +ParserState cParserState; + +static void OnStartElement(void *userData, const XML_Char *name, const XML_Char **atts); +static void OnEndElement(void *userData, const XML_Char *name); +static void OnCharacterData(void *userData, const XML_Char *s, int len); + + +HRESULT ParseExpat(const char *pBuffer, unsigned long cbBufSize, IXMLDocument *pDocument) +{ + if (pDocument == NULL) + { + return E_INVALIDARG; + } + + XML_Parser parser = XML_ParserCreate(NULL); + HRESULT hr = S_OK; + + cParserState.spXMLDocument = pDocument; + + // Initialise the XML parser + XML_SetUserData(parser, &cParserState); + XML_SetElementHandler(parser, OnStartElement, OnEndElement); + XML_SetCharacterDataHandler(parser, OnCharacterData); + + // Parse the data + if (!XML_Parse(parser, pBuffer, cbBufSize, 1)) + { + /* TODO Print error message + fprintf(stderr, + "%s at line %d\n", + XML_ErrorString(XML_GetErrorCode(parser)), + XML_GetCurrentLineNumber(parser)); + */ + hr = E_FAIL; + } + + // Cleanup + XML_ParserFree(parser); + cParserState.spXMLDocument.Release(); + cParserState.spXMLParent.Release(); + + return S_OK; +} + + +void OnStartElement(void *userData, const XML_Char *name, const XML_Char **atts) +{ + ParserState *pState = (ParserState *) userData; + if (pState) + { + USES_CONVERSION; + + CComQIPtr spXMLElement; + + // Create a new element + pState->spXMLDocument->createElement( + CComVariant(XMLELEMTYPE_ELEMENT), + CComVariant(A2OLE(name)), + &spXMLElement); + + if (spXMLElement) + { + // Create each attribute + for (int i = 0; atts[i] != NULL; i += 2) + { + const XML_Char *pszName = atts[i]; + const XML_Char *pszValue = atts[i+1]; + spXMLElement->setAttribute(A2OLE(pszName), CComVariant(A2OLE(pszValue))); + } + + // Add the element to the end of the list + pState->spXMLParent->addChild(spXMLElement, -1, -1); + } + } +} + + +void OnEndElement(void *userData, const XML_Char *name) +{ +} + + +void OnCharacterData(void *userData, const XML_Char *s, int len) +{ + ParserState *pState = (ParserState *) userData; + if (pState) + { + // TODO create TEXT element + } +} + + diff --git a/webshell/embed/ActiveX/xml/StdAfx.cpp b/webshell/embed/ActiveX/xml/StdAfx.cpp new file mode 100644 index 000000000000..a5eea178f78b --- /dev/null +++ b/webshell/embed/ActiveX/xml/StdAfx.cpp @@ -0,0 +1,12 @@ +// stdafx.cpp : source file that includes just the standard includes +// stdafx.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + +#ifdef _ATL_STATIC_REGISTRY +#include +#include +#endif + +#include diff --git a/webshell/embed/ActiveX/xml/StdAfx.h b/webshell/embed/ActiveX/xml/StdAfx.h new file mode 100644 index 000000000000..28a5c14108af --- /dev/null +++ b/webshell/embed/ActiveX/xml/StdAfx.h @@ -0,0 +1,32 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, +// but are changed infrequently + +#if !defined(AFX_STDAFX_H__45E5B413_2805_11D3_9425_000000000000__INCLUDED_) +#define AFX_STDAFX_H__45E5B413_2805_11D3_9425_000000000000__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#define STRICT +#ifndef _WIN32_WINNT +#define _WIN32_WINNT 0x0400 +#endif +#define _ATL_APARTMENT_THREADED + +#include +//You may derive a class from CComModule and use it if you want to override +//something, but do not change the name of _Module +extern CComModule _Module; +#include + +#include "activexml.h" +#include "XMLElement.h" +#include "XMLElementCollection.h" +#include "XMLDocument.h" + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__45E5B413_2805_11D3_9425_000000000000__INCLUDED) diff --git a/webshell/embed/ActiveX/xml/XMLDocument.cpp b/webshell/embed/ActiveX/xml/XMLDocument.cpp new file mode 100644 index 000000000000..0a7b5ab8f3fc --- /dev/null +++ b/webshell/embed/ActiveX/xml/XMLDocument.cpp @@ -0,0 +1,232 @@ +// XMLDocument.cpp : Implementation of CXMLDocument +#include "stdafx.h" +#include "Activexml.h" +#include "XMLDocument.h" + + +CXMLDocument::CXMLDocument() +{ + m_nReadyState = READYSTATE_COMPLETE; +} + + +CXMLDocument::~CXMLDocument() +{ +} + + +///////////////////////////////////////////////////////////////////////////// +// CXMLDocument + + +STDMETHODIMP CXMLDocument::InterfaceSupportsErrorInfo(REFIID riid) +{ + static const IID* arr[] = + { + &IID_IXMLDocument + }; + for (int i=0; i < sizeof(arr) / sizeof(arr[0]); i++) + { + if (InlineIsEqualGUID(*arr[i],riid)) + return S_OK; + } + return S_FALSE; +} + + +///////////////////////////////////////////////////////////////////////////// +// IPersistStreamInit implementation + + +HRESULT STDMETHODCALLTYPE CXMLDocument::Load(/* [in] */ LPSTREAM pStm) +{ + return E_NOTIMPL; +} + + +HRESULT STDMETHODCALLTYPE CXMLDocument::Save(/* [in] */ LPSTREAM pStm, /* [in] */ BOOL fClearDirty) +{ + return E_NOTIMPL; +} + + +HRESULT STDMETHODCALLTYPE CXMLDocument::GetSizeMax(/* [out] */ ULARGE_INTEGER __RPC_FAR *pCbSize) +{ + return E_NOTIMPL; +} + + +HRESULT STDMETHODCALLTYPE CXMLDocument::InitNew(void) +{ + return E_NOTIMPL; +} + + +///////////////////////////////////////////////////////////////////////////// +// IPersistMoniker implementation + + +HRESULT STDMETHODCALLTYPE CXMLDocument::GetClassID(/* [out] */ CLSID __RPC_FAR *pClassID) +{ + if (pClassID == NULL) + { + return E_INVALIDARG; + } + *pClassID = CLSID_MozXMLDocument; + return S_OK; +} + + +HRESULT STDMETHODCALLTYPE CXMLDocument::IsDirty(void) +{ + return E_NOTIMPL; +} + + +HRESULT STDMETHODCALLTYPE CXMLDocument::Load(/* [in] */ BOOL fFullyAvailable, /* [in] */ IMoniker __RPC_FAR *pimkName, /* [in] */ LPBC pibc, /* [in] */ DWORD grfMode) +{ + if (pimkName == NULL) + { + return E_INVALIDARG; + } + +// pimkName->BindToStorage(pibc, NULL, iid, pObj) + return E_NOTIMPL; +} + + +HRESULT STDMETHODCALLTYPE CXMLDocument::Save(/* [in] */ IMoniker __RPC_FAR *pimkName, /* [in] */ LPBC pbc, /* [in] */ BOOL fRemember) +{ + return E_NOTIMPL; +} + + +HRESULT STDMETHODCALLTYPE CXMLDocument::SaveCompleted(/* [in] */ IMoniker __RPC_FAR *pimkName, /* [in] */ LPBC pibc) +{ + return E_NOTIMPL; +} + + +HRESULT STDMETHODCALLTYPE CXMLDocument::GetCurMoniker(/* [out] */ IMoniker __RPC_FAR *__RPC_FAR *ppimkName) +{ + return E_NOTIMPL; +} + + +///////////////////////////////////////////////////////////////////////////// +// IXMLError implementation + +HRESULT STDMETHODCALLTYPE CXMLDocument::GetErrorInfo(XML_ERROR __RPC_FAR *pErrorReturn) +{ + return E_NOTIMPL; +} + +///////////////////////////////////////////////////////////////////////////// +// IXMLDocument implementation + + +HRESULT STDMETHODCALLTYPE CXMLDocument::get_root(/* [out][retval] */ IXMLElement __RPC_FAR *__RPC_FAR *p) +{ + return E_NOTIMPL; +} + + +HRESULT STDMETHODCALLTYPE CXMLDocument::get_fileSize(/* [out][retval] */ BSTR __RPC_FAR *p) +{ + return E_NOTIMPL; +} + + +HRESULT STDMETHODCALLTYPE CXMLDocument::get_fileModifiedDate(/* [out][retval] */ BSTR __RPC_FAR *p) +{ + return E_NOTIMPL; +} + + +HRESULT STDMETHODCALLTYPE CXMLDocument::get_fileUpdatedDate(/* [out][retval] */ BSTR __RPC_FAR *p) +{ + return E_NOTIMPL; +} + + +HRESULT STDMETHODCALLTYPE CXMLDocument::get_URL(/* [out][retval] */ BSTR __RPC_FAR *p) +{ + return E_NOTIMPL; +} + + +HRESULT STDMETHODCALLTYPE CXMLDocument::put_URL(/* [in] */ BSTR p) +{ + return E_NOTIMPL; +} + + +HRESULT STDMETHODCALLTYPE CXMLDocument::get_mimeType(/* [out][retval] */ BSTR __RPC_FAR *p) +{ + return E_NOTIMPL; +} + + +HRESULT STDMETHODCALLTYPE CXMLDocument::get_readyState(/* [out][retval] */ long __RPC_FAR *pl) +{ + if (pl == NULL) + { + return E_INVALIDARG; + } + *pl = m_nReadyState; + return S_OK; +} + + +HRESULT STDMETHODCALLTYPE CXMLDocument::get_charset(/* [out][retval] */ BSTR __RPC_FAR *p) +{ + return E_NOTIMPL; +} + + +HRESULT STDMETHODCALLTYPE CXMLDocument::put_charset(/* [in] */ BSTR p) +{ + return E_NOTIMPL; +} + + +HRESULT STDMETHODCALLTYPE CXMLDocument::get_version(/* [out][retval] */ BSTR __RPC_FAR *p) +{ + return E_NOTIMPL; +} + + +HRESULT STDMETHODCALLTYPE CXMLDocument::get_doctype(/* [out][retval] */ BSTR __RPC_FAR *p) +{ + return E_NOTIMPL; +} + + +HRESULT STDMETHODCALLTYPE CXMLDocument::get_dtdURL(/* [out][retval] */ BSTR __RPC_FAR *p) +{ + return E_NOTIMPL; +} + + +HRESULT STDMETHODCALLTYPE CXMLDocument::createElement(/* [in] */ VARIANT vType, /* [in][optional] */ VARIANT var1, /* [out][retval] */ IXMLElement __RPC_FAR *__RPC_FAR *ppElem) +{ + if (vType.vt != VT_I4) + { + return E_INVALIDARG; + } + if (ppElem == NULL) + { + return E_INVALIDARG; + } + + CXMLElementInstance *pInstance = NULL; + CXMLElementInstance::CreateInstance(&pInstance); + if (pInstance == NULL) + { + return E_OUTOFMEMORY; + } + + return pInstance->QueryInterface(IID_IXMLElement, (void **) ppElem); +} + + diff --git a/webshell/embed/ActiveX/xml/XMLDocument.h b/webshell/embed/ActiveX/xml/XMLDocument.h new file mode 100644 index 000000000000..65be0161cf1f --- /dev/null +++ b/webshell/embed/ActiveX/xml/XMLDocument.h @@ -0,0 +1,79 @@ +// XMLDocument.h : Declaration of the CXMLDocument + +#ifndef __XMLDOCUMENT_H_ +#define __XMLDOCUMENT_H_ + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CXMLDocument +class ATL_NO_VTABLE CXMLDocument : + public CComObjectRootEx, + public CComCoClass, + public ISupportErrorInfo, + public IDispatchImpl, + public IPersistMoniker, + public IPersistStreamInit +{ +public: + CXMLDocument(); + virtual ~CXMLDocument(); + +DECLARE_REGISTRY_RESOURCEID(IDR_XMLDOCUMENT) + +DECLARE_PROTECT_FINAL_CONSTRUCT() + +BEGIN_COM_MAP(CXMLDocument) + COM_INTERFACE_ENTRY(IXMLDocument) + COM_INTERFACE_ENTRY(IDispatch) + COM_INTERFACE_ENTRY(IPersistMoniker) + COM_INTERFACE_ENTRY(IPersistStreamInit) + COM_INTERFACE_ENTRY(ISupportErrorInfo) +END_COM_MAP() + + LONG m_nReadyState; + +// ISupportsErrorInfo + STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid); + +// IPersistStreamInit + //virtual HRESULT STDMETHODCALLTYPE IsDirty(void); + virtual HRESULT STDMETHODCALLTYPE Load(/* [in] */ LPSTREAM pStm); + virtual HRESULT STDMETHODCALLTYPE Save(/* [in] */ LPSTREAM pStm, /* [in] */ BOOL fClearDirty); + virtual HRESULT STDMETHODCALLTYPE GetSizeMax(/* [out] */ ULARGE_INTEGER __RPC_FAR *pCbSize); + virtual HRESULT STDMETHODCALLTYPE InitNew(void); + +// IPersistMoniker + HRESULT STDMETHODCALLTYPE GetClassID(/* [out] */ CLSID __RPC_FAR *pClassID); + HRESULT STDMETHODCALLTYPE IsDirty(void); + HRESULT STDMETHODCALLTYPE Load(/* [in] */ BOOL fFullyAvailable, /* [in] */ IMoniker __RPC_FAR *pimkName, /* [in] */ LPBC pibc, /* [in] */ DWORD grfMode); + HRESULT STDMETHODCALLTYPE Save(/* [in] */ IMoniker __RPC_FAR *pimkName, /* [in] */ LPBC pbc, /* [in] */ BOOL fRemember); + HRESULT STDMETHODCALLTYPE SaveCompleted(/* [in] */ IMoniker __RPC_FAR *pimkName, /* [in] */ LPBC pibc); + HRESULT STDMETHODCALLTYPE GetCurMoniker(/* [out] */ IMoniker __RPC_FAR *__RPC_FAR *ppimkName); + + + +// IXMLError + HRESULT STDMETHODCALLTYPE GetErrorInfo(XML_ERROR __RPC_FAR *pErrorReturn); + +// IXMLDocument + HRESULT STDMETHODCALLTYPE get_root(/* [out][retval] */ IXMLElement __RPC_FAR *__RPC_FAR *p); + HRESULT STDMETHODCALLTYPE get_fileSize(/* [out][retval] */ BSTR __RPC_FAR *p); + HRESULT STDMETHODCALLTYPE get_fileModifiedDate(/* [out][retval] */ BSTR __RPC_FAR *p); + HRESULT STDMETHODCALLTYPE get_fileUpdatedDate(/* [out][retval] */ BSTR __RPC_FAR *p); + HRESULT STDMETHODCALLTYPE get_URL(/* [out][retval] */ BSTR __RPC_FAR *p); + HRESULT STDMETHODCALLTYPE put_URL(/* [in] */ BSTR p); + HRESULT STDMETHODCALLTYPE get_mimeType(/* [out][retval] */ BSTR __RPC_FAR *p); + HRESULT STDMETHODCALLTYPE get_readyState(/* [out][retval] */ long __RPC_FAR *pl); + HRESULT STDMETHODCALLTYPE get_charset(/* [out][retval] */ BSTR __RPC_FAR *p); + HRESULT STDMETHODCALLTYPE put_charset(/* [in] */ BSTR p); + HRESULT STDMETHODCALLTYPE get_version(/* [out][retval] */ BSTR __RPC_FAR *p); + HRESULT STDMETHODCALLTYPE get_doctype(/* [out][retval] */ BSTR __RPC_FAR *p); + HRESULT STDMETHODCALLTYPE get_dtdURL(/* [out][retval] */ BSTR __RPC_FAR *p); + HRESULT STDMETHODCALLTYPE createElement(/* [in] */ VARIANT vType, /* [in][optional] */ VARIANT var1, /* [out][retval] */ IXMLElement __RPC_FAR *__RPC_FAR *ppElem); +public: +}; + +typedef CComObject CXMLDocumentInstance; + +#endif //__XMLDOCUMENT_H_ diff --git a/webshell/embed/ActiveX/xml/XMLDocument.rgs b/webshell/embed/ActiveX/xml/XMLDocument.rgs new file mode 100644 index 000000000000..b195d6015aa5 --- /dev/null +++ b/webshell/embed/ActiveX/xml/XMLDocument.rgs @@ -0,0 +1,26 @@ +HKCR +{ + Mozilla.XMLDocument.1 = s 'XMLDocument Class' + { + CLSID = s '{45E5B41D-2805-11D3-9425-000000000000}' + } + Mozilla.XMLDocument = s 'XMLDocument Class' + { + CLSID = s '{45E5B41D-2805-11D3-9425-000000000000}' + CurVer = s 'Mozilla.XMLDocument.1' + } + NoRemove CLSID + { + ForceRemove {45E5B41D-2805-11D3-9425-000000000000} = s 'XMLDocument Class' + { + ProgID = s 'Mozilla.XMLDocument.1' + VersionIndependentProgID = s 'Mozilla.XMLDocument' + ForceRemove 'Programmable' + InprocServer32 = s '%MODULE%' + { + val ThreadingModel = s 'Apartment' + } + 'TypeLib' = s '{45E5B410-2805-11D3-9425-000000000000}' + } + } +} diff --git a/webshell/embed/ActiveX/xml/XMLElement.cpp b/webshell/embed/ActiveX/xml/XMLElement.cpp new file mode 100644 index 000000000000..36d1561db6b5 --- /dev/null +++ b/webshell/embed/ActiveX/xml/XMLElement.cpp @@ -0,0 +1,182 @@ +// XMLElement.cpp : Implementation of CXMLElement +#include "stdafx.h" +#include "Activexml.h" +#include "XMLElement.h" + + +CXMLElement::CXMLElement() +{ + m_nType = 0; +} + + +CXMLElement::~CXMLElement() +{ +} + + +HRESULT CXMLElement::SetParent(IXMLElement *pParent) +{ + // Note: parent is not refcounted + m_pParent = pParent; + return S_OK; +} + +HRESULT CXMLElement::ReleaseAll() +{ + // Release all children + m_cChildren.clear(); + return S_OK; +} + + +///////////////////////////////////////////////////////////////////////////// +// CXMLElement + +HRESULT STDMETHODCALLTYPE CXMLElement::get_tagName(/* [out][retval] */ BSTR __RPC_FAR *p) +{ + if (p == NULL) + { + return E_INVALIDARG; + } + USES_CONVERSION; + *p = SysAllocString(A2OLE(m_szTagName.c_str())); + return S_OK; +} + + +HRESULT STDMETHODCALLTYPE CXMLElement::put_tagName(/* [in] */ BSTR p) +{ + if (p == NULL) + { + return E_INVALIDARG; + } + USES_CONVERSION; + m_szTagName = OLE2A(p); + return S_OK; +} + + +HRESULT STDMETHODCALLTYPE CXMLElement::get_parent(/* [out][retval] */ IXMLElement __RPC_FAR *__RPC_FAR *ppParent) +{ + if (ppParent == NULL) + { + return E_INVALIDARG; + } + + *ppParent = NULL; + if (m_pParent) + { + return m_pParent->QueryInterface(IID_IXMLElement, (void **) ppParent); + } + + return S_OK; +} + + +HRESULT STDMETHODCALLTYPE CXMLElement::setAttribute(/* [in] */ BSTR strPropertyName, /* [in] */ VARIANT PropertyValue) +{ + if (strPropertyName == NULL || PropertyValue.vt != VT_BSTR) + { + return E_INVALIDARG; + } + + USES_CONVERSION; + std::string szPropertyName = OLE2A(strPropertyName); + std::string szPropertyValue = OLE2A(PropertyValue.bstrVal); + m_cAttributes[szPropertyName] = szPropertyValue; + + return S_OK; +} + + +HRESULT STDMETHODCALLTYPE CXMLElement::getAttribute(/* [in] */ BSTR strPropertyName, /* [out][retval] */ VARIANT __RPC_FAR *PropertyValue) +{ + if (strPropertyName == NULL || PropertyValue == NULL) + { + return E_INVALIDARG; + } + + USES_CONVERSION; + std::string szPropertyName = OLE2A(strPropertyName); + StringMap::iterator i = m_cAttributes.find(szPropertyName); + if (i == m_cAttributes.end()) + { + return S_FALSE; + } + + PropertyValue->vt = VT_BSTR; + PropertyValue->bstrVal = SysAllocString(A2OLE((*i).second.c_str())); + return S_OK; +} + + +HRESULT STDMETHODCALLTYPE CXMLElement::removeAttribute(/* [in] */ BSTR strPropertyName) +{ + if (strPropertyName == NULL) + { + return E_INVALIDARG; + } + + USES_CONVERSION; + std::string szPropertyName = OLE2A(strPropertyName); + StringMap::iterator i = m_cAttributes.find(szPropertyName); + if (i == m_cAttributes.end()) + { + return E_INVALIDARG; + } + + m_cAttributes.erase(i); + + return S_OK; +} + + +HRESULT STDMETHODCALLTYPE CXMLElement::get_children(/* [out][retval] */ IXMLElementCollection __RPC_FAR *__RPC_FAR *pp) +{ + // TODO + return E_NOTIMPL; +} + + +HRESULT STDMETHODCALLTYPE CXMLElement::get_type(/* [out][retval] */ long __RPC_FAR *plType) +{ + if (plType == NULL) + { + return E_INVALIDARG; + } + *plType = m_nType; + return S_OK; +} + + +HRESULT STDMETHODCALLTYPE CXMLElement::get_text(/* [out][retval] */ BSTR __RPC_FAR *p) +{ + return E_NOTIMPL; +} + + +HRESULT STDMETHODCALLTYPE CXMLElement::put_text(/* [in] */ BSTR p) +{ + return E_NOTIMPL; +} + + +HRESULT STDMETHODCALLTYPE CXMLElement::addChild(/* [in] */ IXMLElement __RPC_FAR *pChildElem, long lIndex, long lReserved) +{ + if (pChildElem == NULL) + { + return E_INVALIDARG; + } + + //TODO + return E_NOTIMPL; +} + + +HRESULT STDMETHODCALLTYPE CXMLElement::removeChild(/* [in] */ IXMLElement __RPC_FAR *pChildElem) +{ + // TODO + return E_NOTIMPL; +} + diff --git a/webshell/embed/ActiveX/xml/XMLElement.h b/webshell/embed/ActiveX/xml/XMLElement.h new file mode 100644 index 000000000000..693301070d3b --- /dev/null +++ b/webshell/embed/ActiveX/xml/XMLElement.h @@ -0,0 +1,69 @@ +// XMLElement.h : Declaration of the CXMLElement + +#ifndef __XMLELEMENT_H_ +#define __XMLELEMENT_H_ + +#include "resource.h" // main symbols + +#include +#include +#include + +typedef std::map StringMap; + +///////////////////////////////////////////////////////////////////////////// +// CXMLElement +class ATL_NO_VTABLE CXMLElement : + public CComObjectRootEx, + public CComCoClass, + public IDispatchImpl +{ + // Pointer to parent + IXMLElement *m_pParent; + // List of children + std::vector< CComQIPtr > m_cChildren; + // Tag name + std::string m_szTagName; + // Text + std::string m_szText; + // Type + long m_nType; + // Attribute list + StringMap m_cAttributes; + +public: + CXMLElement(); + virtual ~CXMLElement(); + + virtual HRESULT SetParent(IXMLElement *pParent); + virtual HRESULT ReleaseAll(); + +DECLARE_REGISTRY_RESOURCEID(IDR_XMLELEMENT) + +DECLARE_PROTECT_FINAL_CONSTRUCT() + +BEGIN_COM_MAP(CXMLElement) + COM_INTERFACE_ENTRY(IXMLElement) + COM_INTERFACE_ENTRY(IDispatch) +END_COM_MAP() + +// IXMLElement + virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_tagName(/* [out][retval] */ BSTR __RPC_FAR *p); + virtual /* [id][propput] */ HRESULT STDMETHODCALLTYPE put_tagName(/* [in] */ BSTR p); + virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_parent(/* [out][retval] */ IXMLElement __RPC_FAR *__RPC_FAR *ppParent); + virtual /* [id] */ HRESULT STDMETHODCALLTYPE setAttribute(/* [in] */ BSTR strPropertyName, /* [in] */ VARIANT PropertyValue); + virtual /* [id] */ HRESULT STDMETHODCALLTYPE getAttribute(/* [in] */ BSTR strPropertyName, /* [out][retval] */ VARIANT __RPC_FAR *PropertyValue); + virtual /* [id] */ HRESULT STDMETHODCALLTYPE removeAttribute(/* [in] */ BSTR strPropertyName); + virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_children(/* [out][retval] */ IXMLElementCollection __RPC_FAR *__RPC_FAR *pp); + virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_type(/* [out][retval] */ long __RPC_FAR *plType); + virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_text(/* [out][retval] */ BSTR __RPC_FAR *p); + virtual /* [id][propput] */ HRESULT STDMETHODCALLTYPE put_text(/* [in] */ BSTR p); + virtual /* [id] */ HRESULT STDMETHODCALLTYPE addChild(/* [in] */ IXMLElement __RPC_FAR *pChildElem, long lIndex, long lReserved); + virtual /* [id] */ HRESULT STDMETHODCALLTYPE removeChild(/* [in] */ IXMLElement __RPC_FAR *pChildElem); + +public: +}; + +typedef CComObject CXMLElementInstance; + +#endif //__XMLELEMENT_H_ diff --git a/webshell/embed/ActiveX/xml/XMLElement.rgs b/webshell/embed/ActiveX/xml/XMLElement.rgs new file mode 100644 index 000000000000..426cc4262018 --- /dev/null +++ b/webshell/embed/ActiveX/xml/XMLElement.rgs @@ -0,0 +1,26 @@ +HKCR +{ + Mozilla..XMLElement.1 = s 'XMLElement Class' + { + CLSID = s '{45E5B420-2805-11D3-9425-000000000000}' + } + Mozilla..XMLElement = s 'XMLElement Class' + { + CLSID = s '{45E5B420-2805-11D3-9425-000000000000}' + CurVer = s 'Mozilla..XMLElement.1' + } + NoRemove CLSID + { + ForceRemove {45E5B420-2805-11D3-9425-000000000000} = s 'XMLElement Class' + { + ProgID = s 'Mozilla..XMLElement.1' + VersionIndependentProgID = s 'Mozilla..XMLElement' + ForceRemove 'Programmable' + InprocServer32 = s '%MODULE%' + { + val ThreadingModel = s 'Apartment' + } + 'TypeLib' = s '{45E5B410-2805-11D3-9425-000000000000}' + } + } +} diff --git a/webshell/embed/ActiveX/xml/XMLElementCollection.cpp b/webshell/embed/ActiveX/xml/XMLElementCollection.cpp new file mode 100644 index 000000000000..b5720630083e --- /dev/null +++ b/webshell/embed/ActiveX/xml/XMLElementCollection.cpp @@ -0,0 +1,32 @@ +// XMLElementCollection.cpp : Implementation of CXMLElementCollection +#include "stdafx.h" +#include "Activexml.h" +#include "XMLElementCollection.h" + +///////////////////////////////////////////////////////////////////////////// +// CXMLElementCollection + +HRESULT STDMETHODCALLTYPE put_length(/* [in] */ long v) +{ + return E_NOTIMPL; +} + + +HRESULT STDMETHODCALLTYPE get_length(/* [out][retval] */ long __RPC_FAR *p) +{ + return E_NOTIMPL; +} + + +HRESULT STDMETHODCALLTYPE get__newEnum(/* [out][retval] */ IUnknown __RPC_FAR *__RPC_FAR *ppUnk) +{ + return E_NOTIMPL; +} + + +HRESULT STDMETHODCALLTYPE item(/* [in][optional] */ VARIANT var1, /* [in][optional] */ VARIANT var2, /* [out][retval] */ IDispatch __RPC_FAR *__RPC_FAR *ppDisp) +{ + return E_NOTIMPL; +} + + diff --git a/webshell/embed/ActiveX/xml/XMLElementCollection.h b/webshell/embed/ActiveX/xml/XMLElementCollection.h new file mode 100644 index 000000000000..20ef45a13853 --- /dev/null +++ b/webshell/embed/ActiveX/xml/XMLElementCollection.h @@ -0,0 +1,41 @@ +// XMLElementCollection.h : Declaration of the CXMLElementCollection + +#ifndef __XMLELEMENTCOLLECTION_H_ +#define __XMLELEMENTCOLLECTION_H_ + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CXMLElementCollection +class ATL_NO_VTABLE CXMLElementCollection : + public CComObjectRootEx, + public CComCoClass, + public IDispatchImpl, + public IPersistMoniker +{ +public: + CXMLElementCollection() + { + } + +DECLARE_REGISTRY_RESOURCEID(IDR_XMLELEMENTCOLLECTION) + +DECLARE_PROTECT_FINAL_CONSTRUCT() + +BEGIN_COM_MAP(CXMLElementCollection) + COM_INTERFACE_ENTRY(IXMLElementCollection) + COM_INTERFACE_ENTRY(IDispatch) +END_COM_MAP() + +// IXMLElementCollection + virtual HRESULT STDMETHODCALLTYPE put_length(/* [in] */ long v); + virtual HRESULT STDMETHODCALLTYPE get_length(/* [out][retval] */ long __RPC_FAR *p); + virtual HRESULT STDMETHODCALLTYPE get__newEnum(/* [out][retval] */ IUnknown __RPC_FAR *__RPC_FAR *ppUnk); + virtual HRESULT STDMETHODCALLTYPE item(/* [in][optional] */ VARIANT var1, /* [in][optional] */ VARIANT var2, /* [out][retval] */ IDispatch __RPC_FAR *__RPC_FAR *ppDisp); + +public: +}; + +typedef CComObject CXMLElementCollectionInstance; + +#endif //__XMLELEMENTCOLLECTION_H_ diff --git a/webshell/embed/ActiveX/xml/XMLElementCollection.rgs b/webshell/embed/ActiveX/xml/XMLElementCollection.rgs new file mode 100644 index 000000000000..b790f5b4a478 --- /dev/null +++ b/webshell/embed/ActiveX/xml/XMLElementCollection.rgs @@ -0,0 +1,26 @@ +HKCR +{ + Mozilla.XMLElementCollection.1 = s 'XMLElementCollection Class' + { + CLSID = s '{45E5B422-2805-11D3-9425-000000000000}' + } + Mozilla.XMLElementCollection = s 'XMLElementCollection Class' + { + CLSID = s '{45E5B422-2805-11D3-9425-000000000000}' + CurVer = s 'Mozilla.XMLElementCollection.1' + } + NoRemove CLSID + { + ForceRemove {45E5B422-2805-11D3-9425-000000000000} = s 'XMLElementCollection Class' + { + ProgID = s 'Mozilla.XMLElementCollection.1' + VersionIndependentProgID = s 'Mozilla.XMLElementCollection' + ForceRemove 'Programmable' + InprocServer32 = s '%MODULE%' + { + val ThreadingModel = s 'Apartment' + } + 'TypeLib' = s '{45E5B410-2805-11D3-9425-000000000000}' + } + } +} diff --git a/webshell/embed/ActiveX/xml/activexml.cpp b/webshell/embed/ActiveX/xml/activexml.cpp new file mode 100644 index 000000000000..15f1af7eadcc --- /dev/null +++ b/webshell/embed/ActiveX/xml/activexml.cpp @@ -0,0 +1,76 @@ +// activexml.cpp : Implementation of DLL Exports. + + +// Note: Proxy/Stub Information +// To build a separate proxy/stub DLL, +// run nmake -f activexmlps.mk in the project directory. + +#include "stdafx.h" +#include "resource.h" +#include +#include "activexml.h" + +#include "activexml_i.c" +#include "XMLDocument.h" +#include "XMLElement.h" +#include "XMLElementCollection.h" + + +CComModule _Module; + +BEGIN_OBJECT_MAP(ObjectMap) +OBJECT_ENTRY(CLSID_XMLDocument, CXMLDocument) +//OBJECT_ENTRY(CLSID_XMLElement, CXMLElement) +//OBJECT_ENTRY(CLSID_XMLElementCollection, CXMLElementCollection) +END_OBJECT_MAP() + +///////////////////////////////////////////////////////////////////////////// +// DLL Entry Point + +extern "C" +BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID /*lpReserved*/) +{ + if (dwReason == DLL_PROCESS_ATTACH) + { + _Module.Init(ObjectMap, hInstance, &LIBID_MozActiveXMLLib); + DisableThreadLibraryCalls(hInstance); + } + else if (dwReason == DLL_PROCESS_DETACH) + _Module.Term(); + return TRUE; // ok +} + +///////////////////////////////////////////////////////////////////////////// +// Used to determine whether the DLL can be unloaded by OLE + +STDAPI DllCanUnloadNow(void) +{ + return (_Module.GetLockCount()==0) ? S_OK : S_FALSE; +} + +///////////////////////////////////////////////////////////////////////////// +// Returns a class factory to create an object of the requested type + +STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv) +{ + return _Module.GetClassObject(rclsid, riid, ppv); +} + +///////////////////////////////////////////////////////////////////////////// +// DllRegisterServer - Adds entries to the system registry + +STDAPI DllRegisterServer(void) +{ + // registers object, typelib and all interfaces in typelib + return _Module.RegisterServer(TRUE); +} + +///////////////////////////////////////////////////////////////////////////// +// DllUnregisterServer - Removes entries from the system registry + +STDAPI DllUnregisterServer(void) +{ + return _Module.UnregisterServer(TRUE); +} + + diff --git a/webshell/embed/ActiveX/xml/activexml.def b/webshell/embed/ActiveX/xml/activexml.def new file mode 100644 index 000000000000..13f5afdb56dc --- /dev/null +++ b/webshell/embed/ActiveX/xml/activexml.def @@ -0,0 +1,9 @@ +; activexml.def : Declares the module parameters. + +LIBRARY "activexml.DLL" + +EXPORTS + DllCanUnloadNow @1 PRIVATE + DllGetClassObject @2 PRIVATE + DllRegisterServer @3 PRIVATE + DllUnregisterServer @4 PRIVATE diff --git a/webshell/embed/ActiveX/xml/activexml.dsp b/webshell/embed/ActiveX/xml/activexml.dsp new file mode 100644 index 000000000000..79a895b9321a --- /dev/null +++ b/webshell/embed/ActiveX/xml/activexml.dsp @@ -0,0 +1,360 @@ +# Microsoft Developer Studio Project File - Name="activexml" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=activexml - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "activexml.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "activexml.mak" CFG="activexml - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "activexml - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "activexml - Win32 Unicode Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "activexml - Win32 Release MinSize" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "activexml - Win32 Release MinDependency" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "activexml - Win32 Unicode Release MinSize" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "activexml - Win32 Unicode Release MinDependency" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "activexml - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MTd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "M:\moz\mozilla\dist\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /Yu"stdafx.h" /FD /GZ /c +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib M:\moz\mozilla\dist\WIN32_D.OBJ\lib\expat.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept +# Begin Custom Build - Performing registration +OutDir=.\Debug +TargetPath=.\Debug\activexml.dll +InputPath=.\Debug\activexml.dll +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + regsvr32 /s /c "$(TargetPath)" + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + +# End Custom Build + +!ELSEIF "$(CFG)" == "activexml - Win32 Unicode Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "DebugU" +# PROP BASE Intermediate_Dir "DebugU" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "DebugU" +# PROP Intermediate_Dir "DebugU" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MTd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /Yu"stdafx.h" /FD /GZ /c +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept +# Begin Custom Build - Performing registration +OutDir=.\DebugU +TargetPath=.\DebugU\activexml.dll +InputPath=.\DebugU\activexml.dll +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + if "%OS%"=="" goto NOTNT + if not "%OS%"=="Windows_NT" goto NOTNT + regsvr32 /s /c "$(TargetPath)" + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + goto end + :NOTNT + echo Warning : Cannot register Unicode DLL on Windows 95 + :end + +# End Custom Build + +!ELSEIF "$(CFG)" == "activexml - Win32 Release MinSize" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseMinSize" +# PROP BASE Intermediate_Dir "ReleaseMinSize" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseMinSize" +# PROP Intermediate_Dir "ReleaseMinSize" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ATL_DLL" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ATL_DLL" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# Begin Custom Build - Performing registration +OutDir=.\ReleaseMinSize +TargetPath=.\ReleaseMinSize\activexml.dll +InputPath=.\ReleaseMinSize\activexml.dll +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + regsvr32 /s /c "$(TargetPath)" + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + +# End Custom Build + +!ELSEIF "$(CFG)" == "activexml - Win32 Release MinDependency" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseMinDependency" +# PROP BASE Intermediate_Dir "ReleaseMinDependency" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseMinDependency" +# PROP Intermediate_Dir "ReleaseMinDependency" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# Begin Custom Build - Performing registration +OutDir=.\ReleaseMinDependency +TargetPath=.\ReleaseMinDependency\activexml.dll +InputPath=.\ReleaseMinDependency\activexml.dll +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + regsvr32 /s /c "$(TargetPath)" + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + +# End Custom Build + +!ELSEIF "$(CFG)" == "activexml - Win32 Unicode Release MinSize" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseUMinSize" +# PROP BASE Intermediate_Dir "ReleaseUMinSize" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseUMinSize" +# PROP Intermediate_Dir "ReleaseUMinSize" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /D "_ATL_DLL" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /D "_ATL_DLL" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# Begin Custom Build - Performing registration +OutDir=.\ReleaseUMinSize +TargetPath=.\ReleaseUMinSize\activexml.dll +InputPath=.\ReleaseUMinSize\activexml.dll +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + if "%OS%"=="" goto NOTNT + if not "%OS%"=="Windows_NT" goto NOTNT + regsvr32 /s /c "$(TargetPath)" + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + goto end + :NOTNT + echo Warning : Cannot register Unicode DLL on Windows 95 + :end + +# End Custom Build + +!ELSEIF "$(CFG)" == "activexml - Win32 Unicode Release MinDependency" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "ReleaseUMinDependency" +# PROP BASE Intermediate_Dir "ReleaseUMinDependency" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "ReleaseUMinDependency" +# PROP Intermediate_Dir "ReleaseUMinDependency" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W3 /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_UNICODE" /D "_ATL_STATIC_REGISTRY" /D "_ATL_MIN_CRT" /Yu"stdafx.h" /FD /c +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# Begin Custom Build - Performing registration +OutDir=.\ReleaseUMinDependency +TargetPath=.\ReleaseUMinDependency\activexml.dll +InputPath=.\ReleaseUMinDependency\activexml.dll +SOURCE="$(InputPath)" + +"$(OutDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + if "%OS%"=="" goto NOTNT + if not "%OS%"=="Windows_NT" goto NOTNT + regsvr32 /s /c "$(TargetPath)" + echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg" + goto end + :NOTNT + echo Warning : Cannot register Unicode DLL on Windows 95 + :end + +# End Custom Build + +!ENDIF + +# Begin Target + +# Name "activexml - Win32 Debug" +# Name "activexml - Win32 Unicode Debug" +# Name "activexml - Win32 Release MinSize" +# Name "activexml - Win32 Release MinDependency" +# Name "activexml - Win32 Unicode Release MinSize" +# Name "activexml - Win32 Unicode Release MinDependency" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\activexml.cpp +# End Source File +# Begin Source File + +SOURCE=.\activexml.def +# End Source File +# Begin Source File + +SOURCE=.\activexml.idl +# ADD MTL /tlb ".\activexml.tlb" /h "activexml.h" /iid "activexml_i.c" /Oicf +# End Source File +# Begin Source File + +SOURCE=.\activexml.rc +# End Source File +# Begin Source File + +SOURCE=.\ParseExpat.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# Begin Source File + +SOURCE=.\XMLDocument.cpp +# End Source File +# Begin Source File + +SOURCE=.\XMLElement.cpp +# End Source File +# Begin Source File + +SOURCE=.\XMLElementCollection.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# Begin Source File + +SOURCE=.\XMLDocument.h +# End Source File +# Begin Source File + +SOURCE=.\XMLElement.h +# End Source File +# Begin Source File + +SOURCE=.\XMLElementCollection.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\XMLDocument.rgs +# End Source File +# Begin Source File + +SOURCE=.\XMLElement.rgs +# End Source File +# Begin Source File + +SOURCE=.\XMLElementCollection.rgs +# End Source File +# End Group +# Begin Group "Expat" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\..\expat\xmlparse\xmlparse.h +# End Source File +# End Group +# End Target +# End Project diff --git a/webshell/embed/ActiveX/xml/activexml.idl b/webshell/embed/ActiveX/xml/activexml.idl new file mode 100644 index 000000000000..55ba32894266 --- /dev/null +++ b/webshell/embed/ActiveX/xml/activexml.idl @@ -0,0 +1,49 @@ +// activexml.idl : IDL source for activexml.dll +// + +// This file will be processed by the MIDL tool to +// produce the type library (activexml.tlb) and marshalling code. + +import "oaidl.idl"; +import "ocidl.idl"; +import "msxml.idl"; + +[ + uuid(45E5B410-2805-11D3-9425-000000000000), + version(1.0), + helpstring("Mozilla XML 1.0 Type Library") +] +library MozActiveXMLLib +{ + importlib("stdole32.tlb"); + importlib("stdole2.tlb"); + + + [ + uuid(45E5B41D-2805-11D3-9425-000000000000), + helpstring("MozXMLDocument Class") + ] + coclass MozXMLDocument + { + [default] interface IDispatch; +// [default] interface IXMLDocument; + }; + [ + uuid(45E5B420-2805-11D3-9425-000000000000), + helpstring("MozXMLElement Class") + ] + coclass MozXMLElement + { + [default] interface IDispatch; +// [default] interface IXMLElement; + }; + [ + uuid(45E5B422-2805-11D3-9425-000000000000), + helpstring("MozXMLElementCollection Class") + ] + coclass MozXMLElementCollection + { + [default] interface IDispatch; +// [default] interface IXMLElementCollection; + }; +}; diff --git a/webshell/embed/ActiveX/xml/activexml.rc b/webshell/embed/ActiveX/xml/activexml.rc new file mode 100644 index 000000000000..cb2dd1cf6dc6 --- /dev/null +++ b/webshell/embed/ActiveX/xml/activexml.rc @@ -0,0 +1,142 @@ +//Microsoft Developer Studio generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "winres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""winres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "1 TYPELIB ""activexml.tlb""\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 1,0,0,1 + PRODUCTVERSION 1,0,0,1 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "\0" + VALUE "CompanyName", "\0" + VALUE "FileDescription", "Mozilla XML Module\0" + VALUE "FileVersion", "1, 0, 0, 1\0" + VALUE "InternalName", "activexml\0" + VALUE "LegalCopyright", "Copyright 1999\0" + VALUE "LegalTrademarks", "\0" + VALUE "OLESelfRegister", "\0" + VALUE "OriginalFilename", "activexml.DLL\0" + VALUE "PrivateBuild", "\0" + VALUE "ProductName", "activexml Module\0" + VALUE "ProductVersion", "1, 0, 0, 1\0" + VALUE "SpecialBuild", "\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // !_MAC + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE DISCARDABLE +BEGIN + IDS_PROJNAME "activexml" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// English (U.K.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENG) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// REGISTRY +// + +IDR_XMLDOCUMENT REGISTRY DISCARDABLE "XMLDocument.rgs" +IDR_XMLELEMENT REGISTRY DISCARDABLE "XMLElement.rgs" +IDR_XMLELEMENTCOLLECTION REGISTRY DISCARDABLE "XMLElementCollection.rgs" +#endif // English (U.K.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +1 TYPELIB "activexml.tlb" + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/webshell/embed/ActiveX/xml/activexmlps.def b/webshell/embed/ActiveX/xml/activexmlps.def new file mode 100644 index 000000000000..dd90ac20c651 --- /dev/null +++ b/webshell/embed/ActiveX/xml/activexmlps.def @@ -0,0 +1,11 @@ + +LIBRARY "activexmlPS" + +DESCRIPTION 'Proxy/Stub DLL' + +EXPORTS + DllGetClassObject @1 PRIVATE + DllCanUnloadNow @2 PRIVATE + GetProxyDllInfo @3 PRIVATE + DllRegisterServer @4 PRIVATE + DllUnregisterServer @5 PRIVATE diff --git a/webshell/embed/ActiveX/xml/resource.h b/webshell/embed/ActiveX/xml/resource.h new file mode 100644 index 000000000000..0a0d95a8af55 --- /dev/null +++ b/webshell/embed/ActiveX/xml/resource.h @@ -0,0 +1,19 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by activexml.rc +// +#define IDS_PROJNAME 100 +#define IDR_XMLDOCUMENT 101 +#define IDR_XMLELEMENT 102 +#define IDR_XMLELEMENTCOLLECTION 103 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 201 +#define _APS_NEXT_COMMAND_VALUE 32768 +#define _APS_NEXT_CONTROL_VALUE 201 +#define _APS_NEXT_SYMED_VALUE 104 +#endif +#endif