完成框架目录和模块重构;新增核心、单例、工具、加密及框架 SDK;统一任务、相机和 RPC 接口,并增加离线检测、相机标定、备份恢复、版本管理、崩溃守护和心跳监控功能。
41 lines
1.4 KiB
C++
41 lines
1.4 KiB
C++
#pragma once
|
|
|
|
#include <windows.h>
|
|
#include <QString>
|
|
#include <QIcon>
|
|
#include <QSize>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
struct memUsage {
|
|
DWORDLONG totalPhys = 0, availPhys = 0, usedPhys = 0;
|
|
DWORDLONG totalVir = 0, availVir = 0, usedVir = 0;
|
|
DWORDLONG totalMem = 0, availMem = 0, usedMem = 0;
|
|
double usedPhysPercent = 0, usedVirPercent = 0, usedMemPercent = 0;
|
|
};
|
|
|
|
bool disableConsoleSelection();
|
|
bool enableConsoleSelection();
|
|
bool isWindowsTerminalHost();
|
|
void bindCrtToConsoleIO();
|
|
bool ensureNoSelectionConsole(bool detachWhenWT = true);
|
|
void DisableComPort(const char* portName);
|
|
void EnableComPort(const char* portName);
|
|
bool isRunAsAdmin();
|
|
void restartAsAdmin();
|
|
QString getShortcutTarget(const QString& shortcutPath);
|
|
QIcon getFileIcon(const QString& filePath, const QSize& size);
|
|
bool restartProgram(bool asAdmin = false, bool exitCurrent = true, int delayMs = 0,
|
|
const std::vector<std::wstring>& extraArgs = {});
|
|
memUsage getMemUsage();
|
|
std::wstring getQuotedExePath();
|
|
bool setRegString(HKEY hKeyRoot, const std::wstring& subKey, const std::wstring& valueName, const std::wstring& value);
|
|
bool deleteRegKeyRecursive(HKEY hKeyRoot, const std::wstring& subKey);
|
|
bool registerProgId();
|
|
bool unregisterProgId();
|
|
bool associateExtension(const std::wstring& ext);
|
|
bool disassociateExtension(const std::wstring& ext);
|
|
bool setAsDefaultImageViewer();
|
|
bool unsetDefaultImageViewer();
|
|
bool isDefaultImageViewer();
|