mirror of
https://github.com/Artikash/Textractor.git
synced 2024-12-24 01:14:12 +08:00
continue implementing the removal of section object
This commit is contained in:
parent
3d342503f0
commit
9da6875444
@ -479,11 +479,6 @@ void RemoveFromCombo(TextThread* thread)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ComboSelectCurrent(TextThread* thread)
|
|
||||||
{
|
|
||||||
ComboBox_SetCurSel(hwndCombo, thread->Number());
|
|
||||||
}
|
|
||||||
|
|
||||||
DWORD SetEditText(LPWSTR wc)
|
DWORD SetEditText(LPWSTR wc)
|
||||||
{
|
{
|
||||||
DWORD line;
|
DWORD line;
|
||||||
|
@ -171,7 +171,7 @@ DWORD NewHook(const HookParam &hp, LPCSTR name, DWORD flag)
|
|||||||
|
|
||||||
if (::hookman[current].InsertHook() == 0) {
|
if (::hookman[current].InsertHook() == 0) {
|
||||||
ConsoleOutput("vnrcli:NewHook: hook inserted");
|
ConsoleOutput("vnrcli:NewHook: hook inserted");
|
||||||
NotifyHookInsert(hp.address);
|
NotifyHookInsert(hp, name);
|
||||||
} else
|
} else
|
||||||
ConsoleOutput("vnrcli:NewHook:WARNING: failed to insert hook");
|
ConsoleOutput("vnrcli:NewHook:WARNING: failed to insert hook");
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
#include "include/types.h"
|
#include "include/types.h"
|
||||||
|
|
||||||
void ConsoleOutput(LPCSTR text); // jichi 12/25/2013: Used to return length of sent text
|
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 NewHook(const HookParam &hp, LPCSTR name, DWORD flag = HOOK_ENGINE);
|
||||||
DWORD RemoveHook(DWORD addr);
|
DWORD RemoveHook(DWORD addr);
|
||||||
DWORD SwitchTrigger(DWORD on);
|
DWORD SwitchTrigger(DWORD on);
|
||||||
|
@ -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
|
// 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)
|
if (!::live)
|
||||||
{
|
{
|
||||||
@ -144,9 +144,9 @@ void NotifyHookInsert(DWORD addr, LPCSTR name)
|
|||||||
BYTE buffer[PIPE_BUFFER_SIZE];
|
BYTE buffer[PIPE_BUFFER_SIZE];
|
||||||
*(DWORD*)buffer = HOST_NOTIFICATION;
|
*(DWORD*)buffer = HOST_NOTIFICATION;
|
||||||
*(DWORD*)(buffer + 4) = HOST_NOTIFICATION_NEWHOOK;
|
*(DWORD*)(buffer + 4) = HOST_NOTIFICATION_NEWHOOK;
|
||||||
*(DWORD*)(buffer + 8) = addr;
|
*(HookParam*)(buffer + 8) = hp;
|
||||||
strcpy((char*)buffer + 12, name);
|
strcpy((char*)buffer + 8 + sizeof(HookParam), name);
|
||||||
WriteFile(::hookPipe, buffer, strlen(name) + 12, nullptr, nullptr);
|
WriteFile(::hookPipe, buffer, strlen(name) + 8 + sizeof(HookParam), nullptr, nullptr);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user