OLD | NEW |
1 #include "PluginStdAfx.h" | 1 #include "PluginStdAfx.h" |
2 | 2 |
3 #include "PluginSettings.h" | 3 #include "PluginSettings.h" |
4 #include "PluginSystem.h" | 4 #include "PluginSystem.h" |
5 #include "PluginFilter.h" | 5 #include "PluginFilter.h" |
6 #include "PluginClientFactory.h" | 6 #include "PluginClientFactory.h" |
7 #include "PluginMutex.h" | 7 #include "PluginMutex.h" |
8 #include "PluginClass.h" | 8 #include "PluginClass.h" |
9 | 9 |
10 #include "AdblockPlusClient.h" | 10 #include "AdblockPlusClient.h" |
11 | 11 |
12 #include "../shared/Utils.h" | 12 #include "../shared/Utils.h" |
13 | 13 |
14 namespace | 14 namespace |
15 { | 15 { |
16 void SpawnAdblockPlusEngine() | 16 void SpawnAdblockPlusEngine() |
17 { | 17 { |
18 std::wstring engineExecutablePath = GetDllDir() + L"AdblockPlusEngine.exe"; | 18 std::wstring engineExecutablePath = Location::engine(); |
19 CString params = L"AdblockPlusEngine.exe " + CPluginSystem::GetInstance()->G
etBrowserLanguage(); | 19 CString params = L"AdblockPlusEngine.exe " + CPluginSystem::GetInstance()->G
etBrowserLanguage(); |
20 | 20 |
21 STARTUPINFO startupInfo = {}; | 21 STARTUPINFO startupInfo = {}; |
22 PROCESS_INFORMATION processInformation = {}; | 22 PROCESS_INFORMATION processInformation = {}; |
23 | 23 |
24 HANDLE token; | 24 HANDLE token; |
25 OpenProcessToken(GetCurrentProcess(), TOKEN_DUPLICATE | TOKEN_ADJUST_DEFAULT
| TOKEN_QUERY | TOKEN_ASSIGN_PRIMARY, &token); | 25 OpenProcessToken(GetCurrentProcess(), TOKEN_DUPLICATE | TOKEN_ADJUST_DEFAULT
| TOKEN_QUERY | TOKEN_ASSIGN_PRIMARY, &token); |
26 HANDLE newToken; | 26 HANDLE newToken; |
27 DuplicateTokenEx(token, 0, 0, SecurityImpersonation, TokenPrimary, &newToken
); | 27 DuplicateTokenEx(token, 0, 0, SecurityImpersonation, TokenPrimary, &newToken
); |
28 | 28 |
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
408 response >> success; | 408 response >> success; |
409 if (success) | 409 if (success) |
410 { | 410 { |
411 int64_t value; | 411 int64_t value; |
412 response >> value; | 412 response >> value; |
413 return value; | 413 return value; |
414 } | 414 } |
415 else | 415 else |
416 return defaultValue; | 416 return defaultValue; |
417 } | 417 } |
OLD | NEW |