00001
00002
00003
00004
00005
00006 #include "stdafx.h"
00007 #include "resource.h"
00008 #include <initguid.h>
00009 #include "iefdm.h"
00010
00011 #include "iefdm_i.c"
00012 #include "IEWGMonitor.h"
00013 #include "WgBHO.h"
00014
00015 CComModule _Module;
00016
00017 BEGIN_OBJECT_MAP(ObjectMap)
00018 OBJECT_ENTRY(CLSID_IEWGMonitor, CIEWGMonitor)
00019 OBJECT_ENTRY(CLSID_WgBHO, CWgBHO)
00020 END_OBJECT_MAP()
00021
00022 extern "C"
00023 BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID )
00024 {
00025 if (dwReason == DLL_PROCESS_ATTACH)
00026 {
00027 _Module.Init(ObjectMap, hInstance, &LIBID_IEFDMLib);
00028 DisableThreadLibraryCalls(hInstance);
00029 }
00030 else if (dwReason == DLL_PROCESS_DETACH)
00031 _Module.Term();
00032 return TRUE;
00033 }
00034
00035 STDAPI DllCanUnloadNow(void)
00036 {
00037 return (_Module.GetLockCount()==0) ? S_OK : S_FALSE;
00038 }
00039
00040 STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv)
00041 {
00042 return _Module.GetClassObject(rclsid, riid, ppv);
00043 }
00044
00045 STDAPI DllRegisterServer(void)
00046 {
00047 HRESULT hr = _Module.RegisterServer(TRUE);
00048
00049 return hr;
00050 }
00051
00052 STDAPI DllUnregisterServer(void)
00053 {
00054 return _Module.UnregisterServer(TRUE);
00055 }
00056