2026-01-02 20:00:18 +01:00
|
|
|
|
// stdafx.h : include file for standard system include files,
|
2019-01-05 20:21:43 +08:00
|
|
|
|
// or project specific include files that are used frequently, but
|
|
|
|
|
|
// are changed infrequently
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
|
|
#if !defined(AFX_STDAFX_H__46CA6496_AAD6_4658_B6E9_D7AEB26CDCD5__INCLUDED_)
|
|
|
|
|
|
#define AFX_STDAFX_H__46CA6496_AAD6_4658_B6E9_D7AEB26CDCD5__INCLUDED_
|
|
|
|
|
|
|
2026-01-02 20:00:18 +01:00
|
|
|
|
// 是否使用ZLIB
|
2025-01-15 18:49:15 +08:00
|
|
|
|
#define USING_ZLIB 0
|
2019-01-17 11:58:26 +08:00
|
|
|
|
|
2019-01-17 20:41:51 +08:00
|
|
|
|
#if !USING_ZLIB
|
2025-02-07 18:59:15 +08:00
|
|
|
|
|
|
|
|
|
|
#define USING_ZSTD 1
|
|
|
|
|
|
#define USING_CTX 1
|
|
|
|
|
|
|
2019-01-17 20:41:51 +08:00
|
|
|
|
#endif
|
|
|
|
|
|
|
2019-01-05 20:21:43 +08:00
|
|
|
|
#if _MSC_VER > 1000
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
#endif // _MSC_VER > 1000
|
|
|
|
|
|
|
2025-07-16 02:37:33 +08:00
|
|
|
|
#ifdef _DEBUG
|
2026-01-02 20:00:18 +01:00
|
|
|
|
// 检测内存泄漏,需安装VLD;否则请注释此行
|
2019-01-05 20:21:43 +08:00
|
|
|
|
#include "vld.h"
|
2025-07-19 16:18:56 +08:00
|
|
|
|
#ifndef VLD_RPTHOOK_REMOVE
|
2026-01-02 20:00:18 +01:00
|
|
|
|
#error 检测内存泄漏,需安装VLD;否则请注释#include "vld.h",或使用Release编译
|
2025-07-19 16:18:56 +08:00
|
|
|
|
#endif
|
2025-07-16 02:37:33 +08:00
|
|
|
|
#define USING_SAFETHRED 0
|
2025-07-27 17:32:28 +08:00
|
|
|
|
#define IsDebug 1
|
2025-07-16 02:37:33 +08:00
|
|
|
|
#else
|
|
|
|
|
|
#define USING_SAFETHRED 1
|
2025-07-27 17:32:28 +08:00
|
|
|
|
#define IsDebug 0
|
2025-07-16 02:37:33 +08:00
|
|
|
|
#endif
|
2019-01-05 20:21:43 +08:00
|
|
|
|
|
|
|
|
|
|
// Insert your headers here
|
|
|
|
|
|
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
|
|
|
|
|
|
|
|
|
|
|
|
#include <windows.h>
|
|
|
|
|
|
|
|
|
|
|
|
// TODO: reference additional headers your program requires here
|
|
|
|
|
|
|
|
|
|
|
|
//{{AFX_INSERT_LOCATION}}
|
|
|
|
|
|
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
|
|
|
|
|
|
|
|
|
|
|
|
#endif // !defined(AFX_STDAFX_H__46CA6496_AAD6_4658_B6E9_D7AEB26CDCD5__INCLUDED_)
|
|
|
|
|
|
|
|
|
|
|
|
#include <assert.h>
|
|
|
|
|
|
#include <MMSystem.h>
|
|
|
|
|
|
#pragma comment(lib, "winmm.lib")
|
|
|
|
|
|
|
2025-03-13 23:34:33 +08:00
|
|
|
|
#ifndef SAFE_DELETE
|
|
|
|
|
|
#define SAFE_DELETE(p) if(NULL !=(p)){ delete (p);(p) = NULL;}
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef SAFE_DELETE_ARRAY
|
|
|
|
|
|
#define SAFE_DELETE_ARRAY(p) if(NULL !=(p)){ delete[] (p);(p) = NULL;}
|
|
|
|
|
|
#endif
|
2025-04-07 18:18:36 +08:00
|
|
|
|
|
2025-05-03 20:57:22 +08:00
|
|
|
|
#ifndef SAFE_DELETE_AR
|
|
|
|
|
|
#define SAFE_DELETE_AR(p) if(NULL !=(p)){ delete[] (p);(p) = NULL;}
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
2025-12-24 09:24:15 +01:00
|
|
|
|
#define SAFE_CLOSE_HANDLE(h) do{if((h)!=NULL&&(h)!=INVALID_HANDLE_VALUE){CloseHandle(h);(h)=NULL;}}while(0)
|
|
|
|
|
|
|
2025-05-09 03:09:25 +08:00
|
|
|
|
#include "common/logger.h"
|
|
|
|
|
|
#include "common/locker.h"
|