minor fixes

This commit is contained in:
Akash Mozumdar 2019-02-21 13:09:44 -05:00
parent f6a82984c2
commit 107544df70
3 changed files with 5 additions and 5 deletions

View File

@ -191,7 +191,7 @@ namespace Host
void DetachProcess(DWORD processId) void DetachProcess(DWORD processId)
{ {
processRecordsByIds->at(processId).Send(HostCommandType(HOST_COMMAND_DETACH)); processRecordsByIds->at(processId).Send(HOST_COMMAND_DETACH);
} }
void InsertHook(DWORD processId, HookParam hp) void InsertHook(DWORD processId, HookParam hp)

View File

@ -64,7 +64,7 @@ BOOL WINAPI DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved
bool ProcessSentence(std::wstring& sentence, SentenceInfo sentenceInfo) bool ProcessSentence(std::wstring& sentence, SentenceInfo sentenceInfo)
{ {
std::shared_lock l(m); std::shared_lock l(m);
if (window == nullptr || sentenceInfo["text number"] == 0) return false; if (sentenceInfo["text number"] == 0) return false;
sentence = std::regex_replace(sentence, regex, L""); sentence = std::regex_replace(sentence, regex, L"");
return true; return true;
} }

View File

@ -61,20 +61,20 @@ struct ThreadParam
struct InsertHookCmd // From host struct InsertHookCmd // From host
{ {
InsertHookCmd(HookParam hp) : hp(hp) {} InsertHookCmd(HookParam hp) : hp(hp) {}
int command = HOST_COMMAND_NEW_HOOK; HostCommandType command = HOST_COMMAND_NEW_HOOK;
HookParam hp; HookParam hp;
}; };
struct ConsoleOutputNotif // From hook struct ConsoleOutputNotif // From hook
{ {
ConsoleOutputNotif(std::string message = "") { strncpy_s(this->message, message.c_str(), MESSAGE_SIZE - 1); } ConsoleOutputNotif(std::string message = "") { strncpy_s(this->message, message.c_str(), MESSAGE_SIZE - 1); }
int command = HOST_NOTIFICATION_TEXT; HostNotificationType command = HOST_NOTIFICATION_TEXT;
char message[MESSAGE_SIZE] = {}; char message[MESSAGE_SIZE] = {};
}; };
struct HookRemovedNotif // From hook struct HookRemovedNotif // From hook
{ {
HookRemovedNotif(uint64_t address) : address(address) {}; HookRemovedNotif(uint64_t address) : address(address) {};
int command = HOST_NOTIFICATION_RMVHOOK; HostNotificationType command = HOST_NOTIFICATION_RMVHOOK;
uint64_t address; uint64_t address;
}; };