31 lines
628 B
C
31 lines
628 B
C
#pragma once
|
|
|
|
#ifndef DONT_REDEFINE_TRYEXCEPT_IN_WARNING_H
|
|
#define DONT_REDEFINE_TRYEXCEPT_IN_WARNING_H
|
|
#endif
|
|
|
|
#define WIN32_LEAN_AND_MEAN // 从 Windows 头文件中排除极少使用的内容
|
|
// WinSock 必须在 windows.h 之前包含
|
|
#include <WinSock2.h>
|
|
#include <WS2tcpip.h>
|
|
|
|
// Windows 头文件
|
|
#include <windows.h>
|
|
#include <commdlg.h>
|
|
|
|
// 防止 Windows SDK 在某些编译配置下把 try/except/finally 重定义成 SEH 宏。
|
|
#ifdef try
|
|
#undef try
|
|
#endif
|
|
#ifdef except
|
|
#undef except
|
|
#endif
|
|
#ifdef finally
|
|
#undef finally
|
|
#endif
|
|
#ifdef leave
|
|
#undef leave
|
|
#endif
|
|
|
|
#pragma comment(lib, "comdlg32.lib")
|