2016-01-06 00:01:17 +09:00
|
|
|
#pragma once
|
|
|
|
|
2018-07-23 12:25:02 -07:00
|
|
|
#include "textthread.h"
|
|
|
|
|
|
|
|
namespace Host
|
|
|
|
{
|
2020-03-02 23:38:51 -07:00
|
|
|
using ProcessEventHandler = void(*)(DWORD);
|
2019-02-04 15:18:47 -05:00
|
|
|
using ThreadEventHandler = std::function<void(TextThread&)>;
|
2019-09-10 21:59:59 -04:00
|
|
|
using HookEventHandler = std::function<void(HookParam, std::wstring text)>;
|
2019-02-04 15:18:47 -05:00
|
|
|
void Start(ProcessEventHandler Connect, ProcessEventHandler Disconnect, ThreadEventHandler Create, ThreadEventHandler Destroy, TextThread::OutputCallback Output);
|
2018-08-24 14:04:23 -04:00
|
|
|
|
2019-02-16 00:33:38 -05:00
|
|
|
void InjectProcess(DWORD processId);
|
2018-10-31 12:04:32 -04:00
|
|
|
void DetachProcess(DWORD processId);
|
2019-06-16 22:57:41 -04:00
|
|
|
|
2018-12-01 15:55:32 -05:00
|
|
|
void InsertHook(DWORD processId, HookParam hp);
|
2019-06-10 01:49:11 -04:00
|
|
|
void RemoveHook(DWORD processId, uint64_t address);
|
2019-06-02 02:09:17 -04:00
|
|
|
void FindHooks(DWORD processId, SearchParam sp, HookEventHandler HookFound = {});
|
2018-08-24 12:50:20 -04:00
|
|
|
|
2019-06-16 22:57:41 -04:00
|
|
|
TextThread* GetThread(int64_t handle);
|
2019-02-04 15:18:47 -05:00
|
|
|
TextThread& GetThread(ThreadParam tp);
|
2019-06-10 01:49:11 -04:00
|
|
|
|
2018-08-24 12:50:20 -04:00
|
|
|
void AddConsoleOutput(std::wstring text);
|
2019-01-05 03:47:32 -05:00
|
|
|
|
|
|
|
inline int defaultCodepage = SHIFT_JIS;
|
2019-01-09 22:35:01 -05:00
|
|
|
|
|
|
|
constexpr ThreadParam console{ 0, -1LL, -1LL, -1LL }, clipboard{ 0, 0, -1LL, -1LL };
|
2018-07-23 12:25:02 -07:00
|
|
|
}
|