UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
PostWindowsApi.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/PostWindowsApi.h directly. Use Windows/WindowsHWrapper.h or Windows/HideWindowsPlatformTypes.h instead")
14#endif
15
16// Re-enable warnings
18
19// Hide Windows-only types (same as HideWindowsPlatformTypes.h)
20#undef INT
21#undef UINT
22#undef DWORD
23#undef FLOAT
24
25// Undo any Windows defines.
26#undef uint8
27#undef uint16
28#undef uint32
29#undef int32
30#undef float
31#undef CDECL
32#undef PF_MAX
33#undef CaptureStackBackTrace
34#undef CopyFile
35#undef CreateDesktop
36#undef CreateDirectory
37#undef CreateFont
38#undef DeleteFile
39#undef DrawText
40#undef FindWindow
41#undef GetClassInfo
42#undef GetClassName
43#undef GetCommandLine
44#undef GetCurrentTime
45#undef GetEnvironmentVariable
46#undef GetFileAttributes
47#undef GetFreeSpace
48#undef GetMessage
49#undef GetNextSibling
50#undef GetObject
51#undef GetProp
52#undef GetTempFileName
53#undef IMediaEventSink
54#undef IsMaximized
55#undef IsMinimized
56#undef LoadString
57#undef MemoryBarrier
58#undef MoveFile
59#undef PlaySound
60#undef PostMessage
61#undef ReportEvent
62#undef SendMessage
63#undef SetPort
64#undef SetProp
65#undef UpdateResource
66#undef Yield
67
68// Undefine all the atomics. AllowWindowsPlatformAtomics/HideWindowsPlatformAtomics temporarily defining these macros.
69#undef InterlockedIncrement
70#undef InterlockedDecrement
71#undef InterlockedAdd
72#undef InterlockedExchange
73#undef InterlockedExchangeAdd
74#undef InterlockedCompareExchange
75#undef InterlockedCompareExchangePointer
76#undef InterlockedExchange64
77#undef InterlockedExchangeAdd64
78#undef InterlockedCompareExchange64
79#undef InterlockedIncrement64
80#undef InterlockedDecrement64
81#undef InterlockedAnd
82#undef InterlockedOr
83#undef InterlockedXor
84
85// Restore any previously defined macros
86#pragma pop_macro("MAX_uint8")
87#pragma pop_macro("MAX_uint16")
88#pragma pop_macro("MAX_uint32")
89#pragma pop_macro("MAX_int32")
90#pragma pop_macro("TEXT")
91#pragma pop_macro("TRUE")
92#pragma pop_macro("FALSE")
93
94// Restore the struct packing setting
96
97// Redefine CDECL to our version of the #define. <AJS> Is this really necessary?
98#define CDECL __cdecl /* Standard C function */
99
100// Make sure version is high enough for API to be defined. For CRITICAL_SECTION
101#if !defined(_XTL_) && (_WIN32_WINNT < 0x0403)
102 #error SetCriticalSectionSpinCount requires _WIN32_WINNT >= 0x0403
103#endif
104
105#endif //PLATFORM_*
#define PRAGMA_POP_PLATFORM_DEFAULT_PACKING
Definition MSVCPlatformCompilerPreSetup.h:229
Definition Voronoi.cpp:10