OLD | NEW |
1 #include "PluginStdAfx.h" | 1 #include "PluginStdAfx.h" |
2 #include "PluginSettings.h" | 2 #include "PluginSettings.h" |
3 #include "PluginSystem.h" | 3 #include "PluginSystem.h" |
4 #include "PluginFilter.h" | 4 #include "PluginFilter.h" |
5 #include "PluginClientFactory.h" | 5 #include "PluginClientFactory.h" |
6 #include "PluginMutex.h" | 6 #include "PluginMutex.h" |
7 #include "PluginClass.h" | 7 #include "PluginClass.h" |
8 | 8 |
9 #include "AdblockPlusClient.h" | 9 #include "AdblockPlusClient.h" |
10 | 10 |
11 #include "../shared/Utils.h" | 11 #include "../shared/Utils.h" |
12 | 12 |
13 namespace | 13 namespace |
14 { | 14 { |
15 void SpawnAdblockPlusEngine() | 15 void SpawnAdblockPlusEngine() |
16 { | 16 { |
17 std::wstring engineExecutablePath = GetDllDir() + L"AdblockPlusEngine.exe"; | 17 std::wstring engineExecutablePath = GetDllDir() + L"AdblockPlusEngine.exe"; |
18 CString params = L"AdblockPlusEngine.exe " + CPluginSystem::GetInstance()->G
etBrowserLanguage(); | 18 CString params = to_CString(L"AdblockPlusEngine.exe " + GetBrowserLanguage()
); |
19 | 19 |
20 STARTUPINFO startupInfo = {}; | 20 STARTUPINFO startupInfo = {}; |
21 PROCESS_INFORMATION processInformation = {}; | 21 PROCESS_INFORMATION processInformation = {}; |
22 | 22 |
23 HANDLE token; | 23 HANDLE token; |
24 OpenProcessToken(GetCurrentProcess(), TOKEN_DUPLICATE | TOKEN_ADJUST_DEFAULT
| TOKEN_QUERY | TOKEN_ASSIGN_PRIMARY, &token); | 24 OpenProcessToken(GetCurrentProcess(), TOKEN_DUPLICATE | TOKEN_ADJUST_DEFAULT
| TOKEN_QUERY | TOKEN_ASSIGN_PRIMARY, &token); |
25 | 25 |
26 TOKEN_APPCONTAINER_INFORMATION *acs = NULL; | 26 TOKEN_APPCONTAINER_INFORMATION *acs = NULL; |
27 DWORD length = 0; | 27 DWORD length = 0; |
28 | 28 |
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
529 Communication::OutputBuffer request; | 529 Communication::OutputBuffer request; |
530 request << Communication::PROC_GET_HOST << ToUtf8String(url); | 530 request << Communication::PROC_GET_HOST << ToUtf8String(url); |
531 | 531 |
532 Communication::InputBuffer response; | 532 Communication::InputBuffer response; |
533 if (!CallEngine(request, response)) | 533 if (!CallEngine(request, response)) |
534 return L""; | 534 return L""; |
535 std::string host; | 535 std::string host; |
536 response >> host; | 536 response >> host; |
537 return ToUtf16String(host); | 537 return ToUtf16String(host); |
538 } | 538 } |
OLD | NEW |