Index: src/engine/main.cpp |
=================================================================== |
--- a/src/engine/main.cpp |
+++ b/src/engine/main.cpp |
@@ -1,15 +1,16 @@ |
#include <AdblockPlus.h> |
#include <functional> |
#include <vector> |
#include <Windows.h> |
#include "../shared/AutoHandle.h" |
#include "../shared/Communication.h" |
+#include "../shared/Dictionary.h" |
#include "../shared/Utils.h" |
#include "../shared/Version.h" |
#include "Debug.h" |
#include "Updater.h" |
namespace |
{ |
std::auto_ptr<AdblockPlus::FilterEngine> filterEngine; |
@@ -193,19 +194,20 @@ int WINAPI WinMain(HINSTANCE, HINSTANCE, |
// fails. Since multiple instances of the engine could be running, |
// this may need named mutices to avoid race conditions. |
// Note that as soon as the pipe is created first, we can reduce the |
// client timeout after CreateProcess(), but should increase the one |
// in WaitNamedPipe(). |
int argc; |
LPWSTR* argv = CommandLineToArgvW(GetCommandLineW(), &argc); |
- std::wstring locale(argc >= 1 ? argv[0] : L""); |
+ std::wstring locale(argc >= 2 ? argv[1] : L""); |
LocalFree(argv); |
+ Dictionary::Create(locale); |
filterEngine = CreateFilterEngine(locale); |
for (;;) |
{ |
try |
{ |
Communication::Pipe* pipe = new Communication::Pipe(Communication::pipeName, |
Communication::Pipe::MODE_CREATE); |