UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
WindowsSystemIncludes.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreTypes.h"
8
9// Macro for releasing COM objects
10#define SAFE_RELEASE(p) { if(p) { (p)->Release(); (p)=NULL; } }
11
12// Current instance
14
15// SIMD intrinsics
17#include <intrin.h>
18
19#include <stdint.h>
20#include "HAL/HideTCHAR.h"
21#include <tchar.h>
22#include "HAL/AllowTCHAR.h"
23
24// When compiling under Windows, these headers cause us particular problems. We need to make sure they're included before we pull in our
25// 'DoNotUseOldUE4Type' namespace. This is because these headers will redeclare various numeric typedefs, but under the Clang and Visual
26// Studio compilers it is not allowed to define a typedef with a global scope operator in it (such as ::INT). So we'll get these headers
27// included early on to avoid compiler errors with that.
28#if defined(__clang__) || (defined(_MSC_VER) && (_MSC_VER >= 1900))
29#include <intsafe.h>
30
31// strsafe declares some of the functions as "static inline" which breaks when compiling with header units/modules..
32// "static inline" means that function is private to module/header unit.. which causes compile error when used in other modules.
33// The beautiful solution is to redefine static to inline when including strsafe.h to fix this issue.
34// A bug has been filed to fix this but it is likely it will take a while to get a fix (problem exists in latest version which is 10.0.22621.0 today)
35#if defined(_MSC_VER) && (_MSC_VER >= 1940)
36#define static inline
37#endif
38
39#include <strsafe.h>
40
41#undef static
42#endif
43
44#if USING_CODE_ANALYSIS
45// Source annotation support
46#include <CodeAnalysis/SourceAnnotations.h>
47
48// Allows for disabling code analysis warnings by defining ALL_CODE_ANALYSIS_WARNINGS
49#include <CodeAnalysis/Warnings.h>
50
51// We import the vc_attributes namespace so we can use annotations more easily. It only defines
52// MSVC-specific attributes so there should never be collisions.
53using namespace vc_attributes;
54#endif
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define THIRD_PARTY_INCLUDES_START
Definition GenericPlatformCompilerPreSetup.h:63
CORE_API Windows::HINSTANCE hInstance
Definition WindowsSystemIncludes.h:13
Definition Voronoi.cpp:10
HINSTANCE__ * HINSTANCE
Definition MinimalWindowsApi.h:79