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