26 lines
969 B
C
Raw Normal View History

#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
{
typedef std::function<void(DWORD)> ProcessEventCallback;
void Start(ProcessEventCallback OnConnect, ProcessEventCallback OnDisconnect, TextThread::EventCallback OnCreate, TextThread::EventCallback OnDestroy, TextThread::OutputCallback Output);
2018-08-24 12:50:20 -04:00
void Close();
2018-08-24 14:04:23 -04:00
bool InjectProcess(DWORD processId, DWORD timeout = 5000);
void DetachProcess(DWORD processId);
2018-08-24 14:04:23 -04:00
void InsertHook(DWORD processId, HookParam hp, std::string name = "");
void RemoveHook(DWORD processId, uint64_t addr);
2018-08-24 12:50:20 -04:00
HookParam GetHookParam(DWORD processId, uint64_t addr);
2018-11-04 20:48:46 -05:00
inline HookParam GetHookParam(ThreadParam tp) { return GetHookParam(tp.processId, tp.addr); }
std::wstring GetHookName(DWORD processId, uint64_t addr);
2018-11-04 20:48:46 -05:00
inline std::wstring GetHookName(ThreadParam tp) { return GetHookName(tp.processId, tp.addr); }
2018-08-24 12:50:20 -04:00
std::shared_ptr<TextThread> GetThread(ThreadParam tp);
2018-08-24 12:50:20 -04:00
void AddConsoleOutput(std::wstring text);
2018-07-23 12:25:02 -07:00
}