UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
PreWindowsApi.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3// HEADER_UNIT_SKIP - Not included directly
4
5// #TODO: redirect to platform-agnostic version for the time being. Eventually this will become an error
6#include "HAL/Platform.h"
7#if !PLATFORM_WINDOWS
9#else
10
11// this file should only be included from WindowsHWrapper.h
12#if !defined(WINDOWS_H_WRAPPER_GUARD)
13#pragma message("WARNING: do not include Windows/PreWindowsApi.h directly. Use Windows/WindowsHWrapper.h or Windows/AllowWindowsPlatformTypes.h instead")
14#endif
15
16// Disable the warning that the pack size is changed in this header. We do this globally for
17// clang, since the mechanism of using a sub-header to modify packing generates a -Wpragma-pack
18// warning about modifying packing alignemnt in a header.
19#if !defined(__clang__)
20 #pragma warning(disable:4103)
21#endif // __clang__
22
23
24// The 10.0.18362.0 SDK introduces an error if the packing isn't the default for the platform.
26
27// Save these macros for later; Windows redefines them
28#pragma push_macro("MAX_uint8")
29#pragma push_macro("MAX_uint16")
30#pragma push_macro("MAX_uint32")
31#pragma push_macro("MAX_int32")
32#pragma push_macro("TEXT")
33#pragma push_macro("TRUE")
34#pragma push_macro("FALSE")
35
36// Undefine the TEXT macro for winnt.h to redefine it, unless it's already been included
37#ifndef _WINNT_
38#undef TEXT
39#endif
40
41// Disable all normal third party headers
43
44#endif //PLATFORM_*
#define THIRD_PARTY_INCLUDES_START
Definition GenericPlatformCompilerPreSetup.h:63
#define PRAGMA_PUSH_PLATFORM_DEFAULT_PACKING
Definition MSVCPlatformCompilerPreSetup.h:223