1
// GPAX.cpp : Implementation of DLL Exports.
4
// Note: Proxy/Stub Information
5
// To build a separate proxy/stub DLL,
6
// run nmake -f GPAXps.mk in the project directory.
14
#include "GPAXPlugin.h"
19
BEGIN_OBJECT_MAP(ObjectMap)
20
OBJECT_ENTRY(CLSID_GPAX, CGPAXPlugin)
23
/////////////////////////////////////////////////////////////////////////////
28
BOOL WINAPI DllMain(HANDLE hInstance, DWORD dwReason, LPVOID /*lpReserved*/)
30
BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID /*lpReserved*/)
33
if (dwReason == DLL_PROCESS_ATTACH)
35
_Module.Init(ObjectMap, (HINSTANCE) hInstance, &LIBID_GPAXLib);
36
DisableThreadLibraryCalls((HINSTANCE) 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);