12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- #pragma once
- #include <stdio.h>
- #include <locale.h>
- #include <stdlib.h>
- #include <time.h> //或者 #include <ctime>
- #include <io.h>
- #pragma comment(lib,"version.lib")
- #include <tchar.h>
- #include <vector>
- #include <string>
- using namespace std;
- namespace Global
- {
- //////////////////////////////////////////////////////////////////////////
- // 全局变量;
- extern TCHAR g_szCurModuleDir[MAX_PATH];
- extern TCHAR g_szCurModulePath[MAX_PATH];
- extern TCHAR g_szFna[MAX_PATH];
- extern TCHAR g_szConfig[MAX_PATH];
- extern bool g_bEnableLog;
- extern TCHAR g_szLogPath[MAX_PATH];
- extern time_t g_time;
- typedef struct _TLOG_{
- string report_type;
- string report_data;
- }TLog, *pTLog;
- //////////////////////////////////////////////////////////////////////////
- // 全局函数;
- void Init();
- bool GetVersion(IN const TCHAR *fname, OUT WORD *pdwFileVersion, OUT WORD *pdwProductVerion);
- BOOL GetVersion(IN HMODULE hModule, OUT DWORD(&dwFVArray)[4], OUT DWORD(&dwPVArray)[4]);
- void WriteTextLog(const TCHAR *format, ...);
- void WritePythonLog(const TCHAR *format, ...);
- std::string EnCode_UTF8URL(IN const CHAR* pText);
- std::string &trim(std::string &str);
- // 字符串是否由数字、字母、符号组成;
- BOOL IsValidString(LPCTSTR lpszString);
- string DeCode_URLUNICODE(IN const CHAR* pURLText);
- };
|