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" |
11 #include "PluginClient.h" | 11 #include "PluginClient.h" |
12 #include "PluginSystem.h" | 12 #include "PluginSystem.h" |
13 #include "PluginSettings.h" | 13 #include "PluginSettings.h" |
14 #include "PluginMimeFilterClient.h" | 14 #include "PluginMimeFilterClient.h" |
15 #include "Msiquery.h" | 15 #include "Msiquery.h" |
| 16 #include "../shared/Utils.h" |
16 | 17 |
17 #ifdef SUPPORT_FILTER | 18 #ifdef SUPPORT_FILTER |
18 #include "PluginFilter.h" | 19 #include "PluginFilter.h" |
19 #endif | 20 #endif |
20 #ifdef SUPPORT_CONFIG | 21 #ifdef SUPPORT_CONFIG |
21 #include "PluginConfig.h" | 22 #include "PluginConfig.h" |
22 #endif | 23 #endif |
23 | 24 |
24 #include "../shared/Dictionary.h" | 25 #include "../shared/Dictionary.h" |
25 | 26 |
(...skipping 11 matching lines...) Expand all Loading... |
37 case DLL_PROCESS_ATTACH: | 38 case DLL_PROCESS_ATTACH: |
38 TCHAR szFilename[MAX_PATH]; | 39 TCHAR szFilename[MAX_PATH]; |
39 GetModuleFileName(NULL, szFilename, MAX_PATH); | 40 GetModuleFileName(NULL, szFilename, MAX_PATH); |
40 _tcslwr_s(szFilename); | 41 _tcslwr_s(szFilename); |
41 | 42 |
42 if (_tcsstr(szFilename, _T("explorer.exe"))) | 43 if (_tcsstr(szFilename, _T("explorer.exe"))) |
43 { | 44 { |
44 return FALSE; | 45 return FALSE; |
45 } | 46 } |
46 | 47 |
| 48 /* |
| 49 * Do a quick validation of the installation. |
| 50 */ |
| 51 if ( ! Location::all_known() ){ |
| 52 return FALSE; |
| 53 /* |
| 54 * Future: Write an event to the Windows log file about failure to load. |
| 55 */ |
| 56 } |
| 57 |
| 58 |
47 _Module.Init(ObjectMap, _Module.GetModuleInstance(), &LIBID_PluginLib); | 59 _Module.Init(ObjectMap, _Module.GetModuleInstance(), &LIBID_PluginLib); |
48 break; | 60 break; |
49 | 61 |
50 case DLL_THREAD_ATTACH: | 62 case DLL_THREAD_ATTACH: |
51 // thread-specific initialization. | 63 // thread-specific initialization. |
52 break; | 64 break; |
53 | 65 |
54 case DLL_THREAD_DETACH: | 66 case DLL_THREAD_DETACH: |
55 // thread-specific cleanup. | 67 // thread-specific cleanup. |
56 break; | 68 break; |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 EXTERN_C void STDAPICALLTYPE OnInstall(MSIHANDLE hInstall, MSIHANDLE tmp) | 151 EXTERN_C void STDAPICALLTYPE OnInstall(MSIHANDLE hInstall, MSIHANDLE tmp) |
140 { | 152 { |
141 InitPlugin(true); | 153 InitPlugin(true); |
142 } | 154 } |
143 | 155 |
144 // Called from updater | 156 // Called from updater |
145 EXTERN_C void STDAPICALLTYPE OnUpdate(void) | 157 EXTERN_C void STDAPICALLTYPE OnUpdate(void) |
146 { | 158 { |
147 InitPlugin(false); | 159 InitPlugin(false); |
148 } | 160 } |
OLD | NEW |