OLD | NEW |
1 #include "PluginStdAfx.h" | 1 #include "PluginStdAfx.h" |
2 | 2 |
3 #include "Plugin.h" | 3 #include "Plugin.h" |
4 #ifdef _WIN64 | 4 #ifdef _WIN64 |
5 #include "../../build/x64/AdblockPlus_i.c" | 5 #include "../../build/x64/AdblockPlus_i.c" |
6 #else | 6 #else |
7 #include "../../build/ia32/AdblockPlus_i.c" | 7 #include "../../build/ia32/AdblockPlus_i.c" |
8 #endif | 8 #endif |
9 | 9 |
10 #include "PluginClass.h" | 10 #include "PluginClass.h" |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 STDAPI DllCanUnloadNow(void) | 67 STDAPI DllCanUnloadNow(void) |
68 { | 68 { |
69 LONG count = _Module.GetLockCount(); | 69 LONG count = _Module.GetLockCount(); |
70 if (_Module.GetLockCount() == 0) | 70 if (_Module.GetLockCount() == 0) |
71 { | 71 { |
72 if (CPluginSettings::s_instance != NULL) | 72 if (CPluginSettings::s_instance != NULL) |
73 { | 73 { |
74 delete CPluginSettings::s_instance; | 74 delete CPluginSettings::s_instance; |
75 } | 75 } |
76 | 76 |
77 | |
78 if (CPluginSystem::s_instance != NULL) | |
79 { | |
80 delete CPluginSystem::s_instance; | |
81 } | |
82 | |
83 if (CPluginClass::s_mimeFilter != NULL) | 77 if (CPluginClass::s_mimeFilter != NULL) |
84 { | 78 { |
85 CPluginClass::s_mimeFilter->Unregister(); | 79 CPluginClass::s_mimeFilter->Unregister(); |
86 CPluginClass::s_mimeFilter = NULL; | 80 CPluginClass::s_mimeFilter = NULL; |
87 } | 81 } |
88 | 82 |
89 _CrtDumpMemoryLeaks(); | 83 _CrtDumpMemoryLeaks(); |
90 } | 84 } |
91 return (_Module.GetLockCount() == 0) ? S_OK : S_FALSE; | 85 return (_Module.GetLockCount() == 0) ? S_OK : S_FALSE; |
92 } | 86 } |
93 | 87 |
94 STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv) | 88 STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv) |
95 { | 89 { |
96 return _Module.GetClassObject(rclsid, riid, ppv); | 90 return _Module.GetClassObject(rclsid, riid, ppv); |
97 } | 91 } |
98 | 92 |
99 STDAPI DllRegisterServer(void) | 93 STDAPI DllRegisterServer(void) |
100 { | 94 { |
101 return _Module.RegisterServer(TRUE); | 95 return _Module.RegisterServer(TRUE); |
102 } | 96 } |
103 | 97 |
104 STDAPI DllUnregisterServer(void) | 98 STDAPI DllUnregisterServer(void) |
105 { | 99 { |
106 return _Module.UnregisterServer(TRUE); | 100 return _Module.UnregisterServer(TRUE); |
107 } | 101 } |
108 | 102 |
109 void InitPlugin(bool isInstall) | 103 void InitPlugin(bool isInstall) |
110 { | 104 { |
111 CPluginSystem* system = CPluginSystem::GetInstance(); | |
112 | |
113 CPluginSettings* settings = CPluginSettings::GetInstance(); | 105 CPluginSettings* settings = CPluginSettings::GetInstance(); |
114 | 106 |
115 if (isInstall) | 107 if (isInstall) |
116 { | 108 { |
117 DEBUG_GENERAL( | 109 DEBUG_GENERAL( |
118 L"========================================================================
========\nINSTALLER " + | 110 L"========================================================================
========\nINSTALLER " + |
119 CString(IEPLUGIN_VERSION) + | 111 CString(IEPLUGIN_VERSION) + |
120 L"\n======================================================================
==========") | 112 L"\n======================================================================
==========") |
121 } | 113 } |
122 else | 114 else |
(...skipping 16 matching lines...) Expand all Loading... |
139 EXTERN_C void STDAPICALLTYPE OnInstall(MSIHANDLE hInstall, MSIHANDLE tmp) | 131 EXTERN_C void STDAPICALLTYPE OnInstall(MSIHANDLE hInstall, MSIHANDLE tmp) |
140 { | 132 { |
141 InitPlugin(true); | 133 InitPlugin(true); |
142 } | 134 } |
143 | 135 |
144 // Called from updater | 136 // Called from updater |
145 EXTERN_C void STDAPICALLTYPE OnUpdate(void) | 137 EXTERN_C void STDAPICALLTYPE OnUpdate(void) |
146 { | 138 { |
147 InitPlugin(false); | 139 InitPlugin(false); |
148 } | 140 } |
OLD | NEW |