mirror of
https://github.com/Artikash/Textractor.git
synced 2024-12-23 17:04:12 +08:00
7a2ceec29e
This reverts commit 49c4af8c2c5b6f23a85dc99328044d1686b96ea2.
28 lines
1.0 KiB
C++
28 lines
1.0 KiB
C++
#pragma once
|
|
|
|
#include "common.h"
|
|
#include "textthread.h"
|
|
|
|
typedef std::function<void(DWORD)> ProcessEventCallback;
|
|
typedef std::function<void(std::shared_ptr<TextThread>)> ThreadEventCallback;
|
|
|
|
namespace Host
|
|
{
|
|
void Start(ProcessEventCallback onAttach, ProcessEventCallback onDetach, ThreadEventCallback onCreate, ThreadEventCallback onDestroy, TextThread::OutputCallback output);
|
|
void Close();
|
|
|
|
bool InjectProcess(DWORD processId, DWORD timeout = 5000);
|
|
void DetachProcess(DWORD processId);
|
|
|
|
void InsertHook(DWORD processId, HookParam hp, std::string name = "");
|
|
void RemoveHook(DWORD processId, uint64_t addr);
|
|
|
|
HookParam GetHookParam(DWORD processId, uint64_t addr);
|
|
inline HookParam GetHookParam(ThreadParam tp) { return GetHookParam(tp.processId, tp.addr); }
|
|
std::wstring GetHookName(DWORD processId, uint64_t addr);
|
|
inline std::wstring GetHookName(ThreadParam tp) { return GetHookName(tp.processId, tp.addr); }
|
|
|
|
std::shared_ptr<TextThread> GetThread(ThreadParam tp);
|
|
void AddConsoleOutput(std::wstring text);
|
|
}
|