📄 global.h
字号:
// Global.h: interface for the CGlobal class.
//
//////////////////////////////////////////////////////////////////////
#ifndef __global_h__
#define __global_h__
#include <string>
#include <tchar.h>
#include <memory>
using namespace std;
//#define AUTH_TYPE 1 // Fixed Serial Numbers
#define AUTH_TYPE 2 // CDrive Serial + Auth using HEX STRING
//#define AUTH_TYPE 3 // CDrive Serial + Auth using FILE
#define APP_AUTH1 _T("SS31425869029137")
#define APP_NAME _T("SuperCharger")
#define APP_EXE _T("supercharger.exe")
#define APP_ID _T("SS71453")
#define DEMO_DLL _T("MSQSS369") // Encrypted demo dll in Windows directory
#define DEMO_DAYS 20 // Number of demo days
#define DEMO_TRYS 0 // Number of demo trys
#define DEMO_END 0 // 0=none; >0=days to demo cutoff-coded value!!!
#define W95 "W95"
#define W98 "W98"
#define WME "WME"
#define WNT4 "WNT4"
#define W2K "W2K"
enum Win32Type
{
Win32s,
WinNT3,
Win95,
Win98,
WinME,
WinNT4,
Win2000,
WinXP
};
#define TAB 9
#define LINEFEED 10
#define SPACE 32
#define MAX_LINE_LENGTH 1023
// We use a 16 digit binary for 16 options!
// 1000100000001011 converted to Hexadecimal
typedef std::basic_string<TCHAR> tstring;
#define WM_LOADHOSTS_FINISHED WM_APP + 100
#define LOADHOSTS_INTERRUPT_MSG WM_APP + 101
/////////////////////////////////////////////////////////////////////////////
// GLOBAL MACROS
// getrandom returns a random number between min and max, must be in integer range.
#define getrandom( min, max ) ((rand() % (int)(((max) + 1) - (min))) + (min))
/////////////////////////////////////////////////////////////////////////////
// GLOBAL CONSTANTS
///////////////////////////////////////////////////////
class CGlobal
{
public:
void GetReg(BOOL bDlg);
CGlobal();
virtual ~CGlobal();
TCHAR szExeDir[MAX_PATH]; // Exe or Dll Directory
// Authorization shit
TCHAR szSN[MAX_PATH]; // Serial Number
TCHAR szAC[MAX_PATH]; // Auth Code
int m_iType; // AUTH_TYPE=1,2,3
int m_iProg; // 0=prog NOT authorized, 1=prog authorized
int m_iDemo; // 0=demo NOT authorized, >0=demo days left
TCHAR szHosts[MAX_PATH]; // Hosts File
TCHAR szHostsBk[MAX_PATH]; // Hosts File
BOOL m_bAbort;
protected:
private:
};
/////////////////////////////////////////////////////////////////////////////
// GLOBAL FUNCTIONS
///////////////////////////////////////////
BOOL FileExists( char* sFilename );
//bool FileExists(const char *pszPath);
//BOOL FileExists( LPCTSTR sFilename );
void GetAppPath();
Win32Type IsShellType();
///////////////////////////////////////////
#ifndef __g_Global__
extern CGlobal g_Global;
#endif //__g_Global__
#endif //__global_h__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -