continue implementing the removal of section object

This commit is contained in:
Akash Mozumdar 2018-07-04 23:17:40 -04:00
parent 3d342503f0
commit 9da6875444
4 changed files with 6 additions and 11 deletions

View File

@ -479,11 +479,6 @@ void RemoveFromCombo(TextThread* thread)
}
}
void ComboSelectCurrent(TextThread* thread)
{
ComboBox_SetCurSel(hwndCombo, thread->Number());
}
DWORD SetEditText(LPWSTR wc)
{
DWORD line;

View File

@ -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");
}

View File

@ -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);

View File

@ -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;
}