#pragma once #include "textthread.h" namespace Host { using HostInfoHandler = std::function; using ProcessEventHandler = std::function; using ThreadEventHandler = std::function; using HookEventHandler = std::function; using HookInsertHandler = std::function; using EmbedCallback = std::function; void Start(ProcessEventHandler Connect, ProcessEventHandler Disconnect, ThreadEventHandler Create, ThreadEventHandler Destroy, TextThread::OutputCallback Output, bool createconsole = true); void StartEx(std::optional Connect, std::optional Disconnect, std::optional Create, std::optional Destroy, std::optional Output, bool consolethread, std::optional hostinfo, std::optional hookinsert, std::optional embed); void InjectProcess(DWORD processId, const std::wstring locationX = L""); bool CreatePipeAndCheck(DWORD processId); void DetachProcess(DWORD processId); void InsertHook(DWORD processId, HookParam hp); void SetLanguage(const char*); void InsertPCHooks(DWORD processId, int which); void RemoveHook(DWORD processId, uint64_t address); void FindHooks(DWORD processId, SearchParam sp, HookEventHandler HookFound = {}); CommonSharedMem *GetCommonSharedMem(DWORD pid); TextThread *GetThread(int64_t handle); TextThread &GetThread(ThreadParam tp); void InfoOutput(HOSTINFO type, std::wstring text); void AddConsoleOutput(std::wstring text); inline int defaultCodepage = SHIFT_JIS; constexpr ThreadParam console{0, 0, 0, 0}; bool CheckIsUsingEmbed(ThreadParam tp); }