UDocumentation
UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
HideTCHAR.h
Go to the documentation of this file.
1
// Copyright Epic Games, Inc. All Rights Reserved.
2
3
// When third parties includes define or reference the 'system' TCHAR, it will clash with our
4
// typedef in Platform.h when we're compiling in PLATFORM_TCHAR_IS_UTF8CHAR mode.
5
//
6
// By including this header before any third party include that refers to TCHAR, we will force
7
// those headers to refer to that symbol instead. After those includes, "HAL/AllowTCHAR.h" should
8
// be included, e.g.:
9
//
10
// #include "HAL/HideTCHAR.h"
11
// #include <tchar.h>
12
// #include <other_third_party_header_that_refers_to_tchar.h>
13
// #include "HAL/AllowTCHAR.h"
14
//
15
// Linking shouldn't be affected by this 'override' because the UE_SYSTEM_TCHAR type will mangle
16
// in the same way.
17
//
18
// Preprocessor pasting of the token will be affected but that is rare and will need a bespoke
19
// solution.
20
//
21
// If we ever need to deliberately refer to the system TCHAR rather than our Platform.h TCHAR, we
22
// can use the UE_SYSTEM_TCHAR type instead.
23
24
// HEADER_UNIT_SKIP - Not included directly
25
26
#ifndef UE_HIDETCHAR_INCLUDED
27
#define UE_HIDETCHAR_INCLUDED
28
#else
29
#error "HAL/HideTCHAR.h is being multiply included - an include of HAL/AllowTCHAR.h is likely missing."
30
#endif
31
32
#if PLATFORM_TCHAR_IS_UTF8CHAR
33
// Override the TCHAR name.
34
#define TCHAR UE_SYSTEM_TCHAR
35
#endif
Engine
Source
Runtime
Core
Public
HAL
HideTCHAR.h
Generated by
1.9.8