2018-12-02 08:12:45 +08:00
|
|
|
#pragma once
|
2018-07-22 06:40:16 +08:00
|
|
|
|
2018-08-23 00:24:55 +08:00
|
|
|
#include "qtcommon.h"
|
2019-02-09 13:30:38 +08:00
|
|
|
#include "extenwindow.h"
|
2018-10-28 14:27:24 +08:00
|
|
|
#include "host/host.h"
|
2018-07-22 06:40:16 +08:00
|
|
|
|
2018-07-24 03:25:02 +08:00
|
|
|
namespace Ui
|
|
|
|
{
|
2018-07-26 01:46:59 +08:00
|
|
|
class MainWindow;
|
2018-07-22 06:40:16 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
class MainWindow : public QMainWindow
|
|
|
|
{
|
|
|
|
public:
|
2018-07-26 01:46:59 +08:00
|
|
|
explicit MainWindow(QWidget *parent = nullptr);
|
|
|
|
~MainWindow();
|
2018-07-22 06:40:16 +08:00
|
|
|
|
|
|
|
private:
|
2019-01-12 06:14:49 +08:00
|
|
|
inline static thread_local bool ok = false;
|
|
|
|
|
2018-12-19 01:14:54 +08:00
|
|
|
void closeEvent(QCloseEvent*) override;
|
2018-11-28 04:54:04 +08:00
|
|
|
void ProcessConnected(DWORD processId);
|
|
|
|
void ProcessDisconnected(DWORD processId);
|
2019-02-05 04:18:47 +08:00
|
|
|
void ThreadAdded(TextThread& thread);
|
|
|
|
void ThreadRemoved(TextThread& thread);
|
|
|
|
bool SentenceReceived(TextThread& thread, std::wstring& sentence);
|
|
|
|
QString TextThreadString(TextThread& thread);
|
2018-11-28 04:54:04 +08:00
|
|
|
ThreadParam ParseTextThreadString(QString ttString);
|
2018-08-23 03:11:40 +08:00
|
|
|
DWORD GetSelectedProcessId();
|
2019-02-09 13:30:38 +08:00
|
|
|
std::array<InfoForExtension, 10> GetMiscInfo(TextThread& thread);
|
2018-12-19 01:14:54 +08:00
|
|
|
void AttachProcess();
|
2019-01-12 06:14:49 +08:00
|
|
|
void LaunchProcess();
|
2018-12-19 01:14:54 +08:00
|
|
|
void DetachProcess();
|
|
|
|
void AddHook();
|
|
|
|
void SaveHooks();
|
|
|
|
void Settings();
|
|
|
|
void Extensions();
|
|
|
|
void ViewThread(int index);
|
2018-07-26 12:48:18 +08:00
|
|
|
|
2018-09-02 01:56:45 +08:00
|
|
|
Ui::MainWindow* ui;
|
2018-11-02 02:07:42 +08:00
|
|
|
QWidget* extenWindow;
|
2019-02-03 21:49:58 +08:00
|
|
|
std::pair<uint64_t, uint64_t> savedThreadCtx;
|
|
|
|
wchar_t savedThreadCode[1000];
|
2019-02-09 13:30:38 +08:00
|
|
|
std::atomic<TextThread*> current;
|
2018-07-22 06:40:16 +08:00
|
|
|
};
|