UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
WindowsCommon.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5// HEADER_UNIT_SKIP - Can not be compiled in isolation since it cause circular includes
6
7#if !defined(PLATFORM_COMPILER_IWYU) || !PLATFORM_COMPILER_IWYU
8#include "uLang/Common/Common.h" // Circular include
9#endif
10
11extern "C" { __declspec(dllimport) int __stdcall IsDebuggerPresent(); }
12extern "C" { __declspec(dllimport) void __stdcall OutputDebugStringA(_In_opt_ const char*); }
13
14//------------------------------------------------------------------
15// Warnings
16
17#if defined(__clang__)
18#define ULANG_SILENCE_SECURITY_WARNING_START \
19 _Pragma("clang diagnostic push") \
20 _Pragma("clang diagnostic ignored \"-Wformat-security\"")
21#define ULANG_SILENCE_SECURITY_WARNING_END \
22 _Pragma("clang diagnostic pop")
23#endif
24
25//------------------------------------------------------------------
26// Debug break
27
28#define ULANG_BREAK() __debugbreak()
29
30namespace uLang
31{
32
33//------------------------------------------------------------------
34// Check if debugger is present
35
36inline bool IsDebuggerPresent()
37{
38 return !!::IsDebuggerPresent();
39}
40
41//------------------------------------------------------------------
42// Send string to debugger output window
43
44inline void LogDebugMessage(const char* Message)
45{
46 ::OutputDebugStringA(Message);
47}
48
49}
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
__declspec(dllimport) int __stdcall IsDebuggerPresent()
Definition VVMEngineEnvironment.h:23
void LogDebugMessage(const char *Message)
Definition LinuxCommon.h:41
bool IsDebuggerPresent()
Definition LinuxCommon.h:33