bugfix read code/rio hook

This commit is contained in:
Akash Mozumdar 2018-09-02 18:28:37 -04:00
parent 6ca7eb3f54
commit 0c4bb85f50
2 changed files with 3 additions and 3 deletions

View File

@ -5732,7 +5732,7 @@ int GetShinaRioVersion()
fname[len -1] = 'i'; fname[len -1] = 'i';
fname[len -2] = 'n'; fname[len -2] = 'n';
fname[len -3] = 'i'; fname[len -3] = 'i';
hFile = CreateFileW(fname, FILE_READ_DATA, FILE_SHARE_READ, nullptr, FILE_OPEN, FILE_ATTRIBUTE_NORMAL, nullptr); hFile = CreateFileW(fname, FILE_READ_DATA, FILE_SHARE_READ, nullptr, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, nullptr);
} }
} }
@ -5765,7 +5765,7 @@ bool InsertShinaHook()
hp.text_fun = SpecialHookShina2; hp.text_fun = SpecialHookShina2;
hp.type = USING_STRING; hp.type = USING_STRING;
ConsoleOutput("vnreng: INSERT ShinaRio > 2.47"); ConsoleOutput("vnreng: INSERT ShinaRio > 2.47");
NewHook(hp, "ShinaRio"); // NewHook(hp, "ShinaRio");
//RegisterEngineType(ENGINE_SHINA); //RegisterEngineType(ENGINE_SHINA);
return true; return true;

View File

@ -350,7 +350,7 @@ DWORD WINAPI ReaderThread(LPVOID hookPtr)
bool TextHook::InsertReadCode() bool TextHook::InsertReadCode()
{ {
RemoveHook(hp.address); // Artikash 8/25/2018: clear existing //RemoveHook(hp.address); // Artikash 8/25/2018: clear existing
hp.readerHandle = CreateThread(nullptr, 0, ReaderThread, this, 0, nullptr); hp.readerHandle = CreateThread(nullptr, 0, ReaderThread, this, 0, nullptr);
return true; return true;
} }