diff --git a/gui/window.cpp b/gui/window.cpp index 3597e62..4a58fd4 100644 --- a/gui/window.cpp +++ b/gui/window.cpp @@ -479,11 +479,6 @@ void RemoveFromCombo(TextThread* thread) } } -void ComboSelectCurrent(TextThread* thread) -{ - ComboBox_SetCurSel(hwndCombo, thread->Number()); -} - DWORD SetEditText(LPWSTR wc) { DWORD line; diff --git a/vnr/vnrhook/src/main.cc b/vnr/vnrhook/src/main.cc index b1f5f72..1e1b98c 100644 --- a/vnr/vnrhook/src/main.cc +++ b/vnr/vnrhook/src/main.cc @@ -171,7 +171,7 @@ DWORD NewHook(const HookParam &hp, LPCSTR name, DWORD flag) if (::hookman[current].InsertHook() == 0) { ConsoleOutput("vnrcli:NewHook: hook inserted"); - NotifyHookInsert(hp.address); + NotifyHookInsert(hp, name); } else ConsoleOutput("vnrcli:NewHook:WARNING: failed to insert hook"); } diff --git a/vnr/vnrhook/src/main.h b/vnr/vnrhook/src/main.h index ab1c185..d42c956 100644 --- a/vnr/vnrhook/src/main.h +++ b/vnr/vnrhook/src/main.h @@ -8,7 +8,7 @@ #include "include/types.h" void ConsoleOutput(LPCSTR text); // jichi 12/25/2013: Used to return length of sent text -void NotifyHookInsert(DWORD addr); +void NotifyHookInsert(HookParam hp, LPCSTR name); DWORD NewHook(const HookParam &hp, LPCSTR name, DWORD flag = HOOK_ENGINE); DWORD RemoveHook(DWORD addr); DWORD SwitchTrigger(DWORD on); diff --git a/vnr/vnrhook/src/pipe.cc b/vnr/vnrhook/src/pipe.cc index 9470d5e..232c379 100644 --- a/vnr/vnrhook/src/pipe.cc +++ b/vnr/vnrhook/src/pipe.cc @@ -135,7 +135,7 @@ void ConsoleOutput(LPCSTR text) } // Artikash 7/3/2018: TODO: Finish using this in vnrhost instead of section to deliver hook name -void NotifyHookInsert(DWORD addr, LPCSTR name) +void NotifyHookInsert(HookParam hp, LPCSTR name) { if (!::live) { @@ -144,9 +144,9 @@ void NotifyHookInsert(DWORD addr, LPCSTR name) BYTE buffer[PIPE_BUFFER_SIZE]; *(DWORD*)buffer = HOST_NOTIFICATION; *(DWORD*)(buffer + 4) = HOST_NOTIFICATION_NEWHOOK; - *(DWORD*)(buffer + 8) = addr; - strcpy((char*)buffer + 12, name); - WriteFile(::hookPipe, buffer, strlen(name) + 12, nullptr, nullptr); + *(HookParam*)(buffer + 8) = hp; + strcpy((char*)buffer + 8 + sizeof(HookParam), name); + WriteFile(::hookPipe, buffer, strlen(name) + 8 + sizeof(HookParam), nullptr, nullptr); return; }