1
// activexml.cpp : Implementation of DLL Exports.
4
// Note: Proxy/Stub Information
5
// To build a separate proxy/stub DLL,
6
// run nmake -f activexmlps.mk in the project directory.
10
//#include <initguid.h>
11
//#include "activexml.h"
13
#include "activexml_i.c"
14
#include "XMLDocument.h"
15
#include "XMLElement.h"
16
#include "XMLElementCollection.h"
21
BEGIN_OBJECT_MAP(ObjectMap)
22
OBJECT_ENTRY(CLSID_MozXMLDocument, CXMLDocument)
23
//OBJECT_ENTRY(CLSID_MozXMLElement, CXMLElement)
24
//OBJECT_ENTRY(CLSID_MozXMLElementCollection, CXMLElementCollection)
27
/////////////////////////////////////////////////////////////////////////////
31
BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID /*lpReserved*/)
33
if (dwReason == DLL_PROCESS_ATTACH)
35
_Module.Init(ObjectMap, hInstance, &LIBID_MozActiveXMLLib);
36
DisableThreadLibraryCalls(hInstance);
38
else if (dwReason == DLL_PROCESS_DETACH)
43
/////////////////////////////////////////////////////////////////////////////
44
// Used to determine whether the DLL can be unloaded by OLE
46
STDAPI DllCanUnloadNow(void)
48
return (_Module.GetLockCount()==0) ? S_OK : S_FALSE;
51
/////////////////////////////////////////////////////////////////////////////
52
// Returns a class factory to create an object of the requested type
54
STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv)
56
return _Module.GetClassObject(rclsid, riid, ppv);
59
/////////////////////////////////////////////////////////////////////////////
60
// DllRegisterServer - Adds entries to the system registry
62
STDAPI DllRegisterServer(void)
64
// registers object, typelib and all interfaces in typelib
65
return _Module.RegisterServer(TRUE);
68
/////////////////////////////////////////////////////////////////////////////
69
// DllUnregisterServer - Removes entries from the system registry
71
STDAPI DllUnregisterServer(void)
73
return _Module.UnregisterServer(TRUE);