2016-01-06 00:01:17 +09:00
|
|
|
#pragma once
|
|
|
|
|
2018-08-22 12:24:55 -04:00
|
|
|
#include "common.h"
|
2018-07-23 12:25:02 -07:00
|
|
|
#include "textthread.h"
|
|
|
|
|
|
|
|
namespace Host
|
|
|
|
{
|
2018-12-01 15:55:32 -05:00
|
|
|
using ProcessEventCallback = std::function<void(DWORD)>;
|
2018-11-27 15:54:04 -05:00
|
|
|
void Start(ProcessEventCallback OnConnect, ProcessEventCallback OnDisconnect, TextThread::EventCallback OnCreate, TextThread::EventCallback OnDestroy, TextThread::OutputCallback Output);
|
2018-08-24 14:04:23 -04:00
|
|
|
|
2018-10-31 12:04:32 -04:00
|
|
|
bool InjectProcess(DWORD processId, DWORD timeout = 5000);
|
|
|
|
void DetachProcess(DWORD processId);
|
2018-12-01 15:55:32 -05:00
|
|
|
void InsertHook(DWORD processId, HookParam hp);
|
2018-08-24 12:50:20 -04:00
|
|
|
|
2018-12-01 15:55:32 -05:00
|
|
|
HookParam GetHookParam(ThreadParam tp);
|
2018-08-24 12:50:20 -04:00
|
|
|
|
2018-10-31 01:20:44 -04:00
|
|
|
std::shared_ptr<TextThread> GetThread(ThreadParam tp);
|
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;
|
2018-07-23 12:25:02 -07:00
|
|
|
}
|