mirror of
https://github.com/Artikash/Textractor.git
synced 2024-12-23 17:04:12 +08:00
28 lines
962 B
C++
28 lines
962 B
C++
#pragma once
|
|
|
|
#include "common.h"
|
|
#include "textthread.h"
|
|
|
|
namespace Host
|
|
{
|
|
using ProcessEventHandler = std::function<void(DWORD)>;
|
|
using ThreadEventHandler = std::function<void(TextThread&)>;
|
|
using HookEventHandler = std::function<void(HookParam, const std::wstring& text)>;
|
|
void Start(ProcessEventHandler Connect, ProcessEventHandler Disconnect, ThreadEventHandler Create, ThreadEventHandler Destroy, TextThread::OutputCallback Output);
|
|
|
|
void InjectProcess(DWORD processId);
|
|
void DetachProcess(DWORD processId);
|
|
void InsertHook(DWORD processId, HookParam hp);
|
|
void RemoveHook(DWORD processId, uint64_t address);
|
|
void FindHooks(DWORD processId, SearchParam sp, HookEventHandler HookFound = {});
|
|
|
|
HookParam GetHookParam(ThreadParam tp);
|
|
TextThread& GetThread(ThreadParam tp);
|
|
|
|
void AddConsoleOutput(std::wstring text);
|
|
|
|
inline int defaultCodepage = SHIFT_JIS;
|
|
|
|
constexpr ThreadParam console{ 0, -1LL, -1LL, -1LL }, clipboard{ 0, 0, -1LL, -1LL };
|
|
}
|