Textractor_test/GUI/host/host.h
2019-01-09 22:35:01 -05:00

24 lines
727 B
C++

#pragma once
#include "common.h"
#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);
bool InjectProcess(DWORD processId, DWORD timeout = 5000);
void DetachProcess(DWORD processId);
void InsertHook(DWORD processId, HookParam hp);
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 };
}