Textractor_test/GUI/host/host.h

24 lines
727 B
C
Raw Normal View History

#pragma once
2018-08-23 00:24:55 +08:00
#include "common.h"
2018-07-24 03:25:02 +08:00
#include "textthread.h"
namespace Host
{
using ProcessEventCallback = std::function<void(DWORD)>;
void Start(ProcessEventCallback OnConnect, ProcessEventCallback OnDisconnect, TextThread::EventCallback OnCreate, TextThread::EventCallback OnDestroy, TextThread::OutputCallback Output);
2018-08-25 02:04:23 +08:00
bool InjectProcess(DWORD processId, DWORD timeout = 5000);
void DetachProcess(DWORD processId);
void InsertHook(DWORD processId, HookParam hp);
2018-08-25 00:50:20 +08:00
HookParam GetHookParam(ThreadParam tp);
2018-08-25 00:50:20 +08:00
2019-01-06 15:57:52 +08:00
TextThread* GetThread(ThreadParam tp);
2018-08-25 00:50:20 +08:00
void AddConsoleOutput(std::wstring text);
2019-01-05 16:47:32 +08:00
inline int defaultCodepage = SHIFT_JIS;
2019-01-10 11:35:01 +08:00
constexpr ThreadParam console{ 0, -1LL, -1LL, -1LL }, clipboard{ 0, 0, -1LL, -1LL };
2018-07-24 03:25:02 +08:00
}