2018-12-01 19:12:45 -05:00
|
|
|
#pragma once
|
2018-07-25 21:48:18 -07:00
|
|
|
|
2018-08-22 12:24:55 -04:00
|
|
|
#include "qtcommon.h"
|
2018-08-24 12:50:20 -04:00
|
|
|
#include "types.h"
|
2018-07-25 21:48:18 -07:00
|
|
|
|
2018-11-27 15:54:04 -05:00
|
|
|
class QAutoFile
|
|
|
|
{
|
|
|
|
public:
|
2018-12-22 16:17:08 -05:00
|
|
|
QAutoFile(const QString& name, QIODevice::OpenMode mode) : f(name) { f.open(mode); }
|
2018-11-27 15:54:04 -05:00
|
|
|
QFile* operator->() { return &f; }
|
2018-12-22 16:17:08 -05:00
|
|
|
|
2018-11-27 15:54:04 -05:00
|
|
|
private:
|
|
|
|
QFile f;
|
|
|
|
};
|
|
|
|
|
2018-12-22 16:17:08 -05:00
|
|
|
inline std::wstring S(const QString& S) { return { S.toStdWString() }; }
|
|
|
|
inline QString S(const std::wstring& S) { return QString::fromStdWString(S); }
|
2018-08-24 14:24:46 -04:00
|
|
|
std::optional<HookParam> ParseCode(QString HCode);
|
2018-08-04 18:01:59 -04:00
|
|
|
QString GenerateCode(HookParam hp, DWORD processId);
|