clean up hookman some more
This commit is contained in:
parent
dff4ae3463
commit
1fb66ddc04
@ -211,8 +211,6 @@ HookManager::~HookManager()
|
||||
TextThread *HookManager::FindSingle(DWORD number)
|
||||
{ return (number & 0x80008000) ? nullptr : thread_table->FindThread(number); }
|
||||
|
||||
void HookManager::DetachProcess(DWORD pid) {}
|
||||
|
||||
void HookManager::SetCurrent(TextThread *it)
|
||||
{
|
||||
if (current)
|
||||
@ -626,25 +624,6 @@ void HookManager::AddConsoleOutput(LPCWSTR text)
|
||||
}
|
||||
}
|
||||
|
||||
void HookManager::ClearText(DWORD pid, DWORD hook, DWORD retn, DWORD spl)
|
||||
{
|
||||
HM_LOCK;
|
||||
//bool flag=false;
|
||||
//ConsoleOutput("vnrhost:ClearText: lock");
|
||||
//EnterCriticalSection(&hmcs);
|
||||
ThreadParameter tp = {pid, hook, retn, spl};
|
||||
if (TreeNode<ThreadParameter *, DWORD> *in = Search(&tp))
|
||||
if (TextThread *it = thread_table->FindThread(in->data)) {
|
||||
it->Reset();
|
||||
//SetCurrent(it);
|
||||
if (reset)
|
||||
reset(it);
|
||||
//it->ResetEditText();
|
||||
}
|
||||
|
||||
//LeaveCriticalSection(&hmcs);
|
||||
//ConsoleOutput("vnrhost:ClearText: unlock");
|
||||
}
|
||||
void HookManager::ClearCurrent()
|
||||
{
|
||||
HM_LOCK;
|
||||
|
@ -57,14 +57,12 @@ public:
|
||||
void UnLink(WORD from);
|
||||
void UnLinkAll(WORD from);
|
||||
void SelectCurrent(DWORD num);
|
||||
void DetachProcess(DWORD pid);
|
||||
void SetCurrent(TextThread *it);
|
||||
void AddConsoleOutput(LPCWSTR text);
|
||||
|
||||
// jichi 10/27/2013: Add const; add space.
|
||||
void DispatchText(DWORD pid, const BYTE *text, DWORD hook, DWORD retn, DWORD split, int len, bool space);
|
||||
|
||||
void ClearText(DWORD pid, DWORD hook, DWORD retn, DWORD split); // private
|
||||
void RemoveProcessContext(DWORD pid); // private
|
||||
void RemoveSingleHook(DWORD pid, DWORD addr);
|
||||
void RegisterThread(TextThread*, DWORD); // private
|
||||
@ -78,9 +76,6 @@ public:
|
||||
ConsoleCallback RegisterConsoleCallback(ConsoleCallback cf)
|
||||
{ return (ConsoleCallback)_InterlockedExchange((long*)&console,(long)cf); }
|
||||
|
||||
ConsoleWCallback RegisterConsoleWCallback(ConsoleWCallback cf)
|
||||
{ return (ConsoleWCallback)_InterlockedExchange((long*)&wconsole,(long)cf); }
|
||||
|
||||
ThreadEventCallback RegisterThreadCreateCallback(ThreadEventCallback cf)
|
||||
{ return (ThreadEventCallback)_InterlockedExchange((long*)&create,(long)cf); }
|
||||
|
||||
@ -107,13 +102,6 @@ public:
|
||||
ProcessRecord *Records() { return record; } // private
|
||||
ThreadTable *Table() { return thread_table; } // private
|
||||
|
||||
//DWORD& SplitTime() { return split_time; }
|
||||
//DWORD& RepeatCount() { return repeat_count; }
|
||||
//DWORD& CyclicRemove() { return cyclic_remove; }
|
||||
//DWORD& GlobalFilter() { return global_filter; }
|
||||
void ConsoleOutput(LPCSTR text) { if (console) console(text); } // not thread safe
|
||||
void ConsoleOutputW(LPCWSTR text) { if (wconsole) wconsole(text); } // not thread safe
|
||||
|
||||
void OnThreadCreate(pugi::xml_node profile_node, TextThread* thread);
|
||||
void GetProfile(DWORD pid, pugi::xml_node profile_node);
|
||||
|
||||
|
@ -558,7 +558,7 @@ DWORD TextThread::GetEntryString(LPSTR str, DWORD max)
|
||||
|
||||
} else {
|
||||
len = ::sprintf(str, "%.4X:%.4d:0x%08X:0x%08X:0x%08X:",
|
||||
thread_number, tp. pid, tp.hook, tp.retn, tp.spl);
|
||||
thread_number, tp.pid, tp.hook, tp.retn, tp.spl);
|
||||
|
||||
len += GetHookName(str + len, tp.pid, tp.hook, max - len);
|
||||
thread_string = new char[len + 1];
|
||||
|
Loading…
Reference in New Issue
Block a user