UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FWindowsPlatformMisc Struct Reference

#include <WindowsPlatformMisc.h>

+ Inheritance diagram for FWindowsPlatformMisc:

Public Member Functions

 UE_DEPRECATED (4.21, "void FPlatformMisc::GetEnvironmentVariable(Name, Result, Length) is deprecated. Use FString FPlatformMisc::GetEnvironmentVariable(Name) instead.") static CORE_API void GetEnvironmentVariable(const TCHAR *VariableName
 
- Public Member Functions inherited from FGenericPlatformMisc
 UE_DEPRECATED (4.18, "FPaths::SetOverrideGameDir() has been superseded by FPaths::SetOverrideProjectDir().") static FORCEINLINE void SetOverrideGameDir(const FString &InOverrideDir)
 

Static Public Member Functions

static CORE_API void PlatformPreInit ()
 
static CORE_API void PlatformInit ()
 
static CORE_API void PlatformTearDown ()
 
static CORE_API void SetGracefulTerminationHandler ()
 
static CORE_API void CallGracefulTerminationHandler ()
 
static CORE_API ECrashHandlingType GetCrashHandlingType ()
 
static CORE_API ECrashHandlingType SetCrashHandlingType (ECrashHandlingType)
 
static CORE_API int32 GetMaxPathLength ()
 
static CORE_API int32 GetExternalAppMaxPathLength ()
 
static CORE_API FString GetEnvironmentVariable (const TCHAR *VariableName)
 
static CORE_API void SetEnvironmentVar (const TCHAR *VariableName, const TCHAR *Value)
 
static CORE_API TArray< uint8GetMacAddress ()
 
static CORE_API void SubmitErrorReport (const TCHAR *InErrorHist, EErrorReportMode::Type InMode)
 
static CORE_API bool IsDebuggerPresent ()
 
static CORE_API EProcessDiagnosticFlags GetProcessDiagnostics ()
 
static void MemoryBarrier ()
 
static CORE_API void AsymmetricThreadFenceHeavy ()
 UE_BUILD_SHIPPING.
 
static UE_FORCEINLINE_HINT void AsymmetricThreadFenceLight ()
 
static CORE_API bool IsRemoteSession ()
 
static CORE_API void SetUTF8Output ()
 
static CORE_API void LocalPrint (const TCHAR *Message)
 
static bool IsLocalPrintThreadSafe ()
 
static CORE_API void RequestExitWithStatus (bool Force, uint8 ReturnCode, const TCHAR *CallSite=nullptr)
 
static CORE_API void RequestExit (bool Force, const TCHAR *CallSite=nullptr)
 
static CORE_API const TCHARGetSystemErrorMessage (TCHAR *OutBuffer, int32 BufferCount, int32 Error)
 
static CORE_API void CreateGuid (struct FGuid &Result)
 
static CORE_API EAppReturnType::Type MessageBoxExt (EAppMsgType::Type MsgType, const TCHAR *Text, const TCHAR *Caption)
 
static CORE_API bool CommandLineCommands ()
 
static CORE_API bool Is64bitOperatingSystem ()
 
static CORE_API bool IsValidAbsolutePathFormat (const FString &Path)
 
static CORE_API int32 NumberOfCores ()
 
static CORE_API const FProcessorGroupDescGetProcessorGroupDesc ()
 
static CORE_API int32 NumberOfCoresIncludingHyperthreads ()
 
static CORE_API int32 NumberOfWorkerThreadsToSpawn ()
 
static CORE_API const TCHARGetPlatformFeaturesModuleName ()
 
static CORE_API FString GetDefaultLanguage ()
 
static CORE_API FString GetDefaultLocale ()
 
static CORE_API uint32 GetLastError ()
 
static CORE_API void SetLastError (uint32 ErrorCode)
 
static CORE_API void RaiseException (uint32 ExceptionCode)
 
static CORE_API bool SetStoredValue (const FString &InStoreId, const FString &InSectionName, const FString &InKeyName, const FString &InValue)
 
static CORE_API bool GetStoredValue (const FString &InStoreId, const FString &InSectionName, const FString &InKeyName, FString &OutValue)
 
static CORE_API bool DeleteStoredValue (const FString &InStoreId, const FString &InSectionName, const FString &InKeyName)
 
static CORE_API bool DeleteStoredSection (const FString &InStoreId, const FString &InSectionName)
 
static CORE_API bool CoInitialize (ECOMModel Model=ECOMModel::Singlethreaded)
 
static CORE_API void CoUninitialize ()
 
static CORE_API bool OsExecute (const TCHAR *CommandType, const TCHAR *Command, const TCHAR *CommandLine=NULL)
 
static CORE_API Windows::HWND GetTopLevelWindowHandle (uint32 ProcessId)
 
static CORE_API bool VerifyWindowsVersion (uint32 MajorVersion, uint32 MinorVersion, uint32 BuildNumber=0)
 
static CORE_API bool IsWine ()
 
static CORE_API void PromptForRemoteDebugging (bool bIsEnsure)
 
static CORE_API bool HasCPUIDInstruction ()
 
static CORE_API bool HasAVX2InstructionSupport ()
 
static CORE_API bool HasTPM2Support ()
 
static CORE_API bool HasSecureBootSupport ()
 
static CORE_API bool SupportsWindows11 ()
 
static CORE_API FString GetCPUVendor ()
 
static CORE_API FString GetCPUBrand ()
 
static CORE_API uint32 GetCPUModelID ()
 
static CORE_API uint32 GetCPUMicrocodeRevision ()
 
static CORE_API FString GetPrimaryGPUBrand ()
 
static CORE_API struct FGPUDriverInfo GetGPUDriverInfo (const FString &DeviceDescription, bool bVerbose=true)
 
static CORE_API void GetOSVersions (FString &out_OSVersionLabel, FString &out_OSSubVersionLabel)
 
static CORE_API FString GetOSVersion ()
 
static CORE_API bool GetDiskTotalAndFreeSpace (const FString &InPath, uint64 &TotalNumberOfBytes, uint64 &NumberOfFreeBytes)
 
static CORE_API bool GetPageFaultStats (FPageFaultStats &OutStats, EPageFaultFlags Flags=EPageFaultFlags::All)
 
static CORE_API bool GetBlockingIOStats (FProcessIOStats &OutStats, EInputOutputFlags Flags=EInputOutputFlags::All)
 
static CORE_API uint32 GetCPUInfo ()
 
static CORE_API bool HasNonoptionalCPUFeatures ()
 
static CORE_API bool NeedsNonoptionalCPUFeaturesCheck ()
 
static CORE_API bool HasTimedPauseCPUFeature ()
 
static CORE_API FString GetHostArchitecture ()
 
static CORE_API bool QueryRegKey (const Windows::HKEY InKey, const TCHAR *InSubKey, const TCHAR *InValueName, FString &OutData)
 
static CORE_API bool GetVSComnTools (int32 Version, FString &OutData)
 
static CORE_API int32 GetCacheLineSize ()
 
static CORE_API const TCHARGetDefaultPathSeparator ()
 
static CORE_API FText GetFileManagerName ()
 
static bool HasActiveWiFiConnection ()
 
static CORE_API bool IsDeviceHandheld ()
 
static CORE_API bool IsRunningOnBattery ()
 
static CORE_API int GetBatteryLevel ()
 
static CORE_API bool IsUsingBatterySaver ()
 
static void ChooseHDRDeviceAndColorGamut (uint32 DeviceId, uint32 DisplayNitLevel, EDisplayOutputFormat &OutputDevice, EDisplayColorGamut &ColorGamut)
 
static CORE_API FString GetOperatingSystemId ()
 
static CORE_API EConvertibleLaptopMode GetConvertibleLaptopMode ()
 
static CORE_API IPlatformChunkInstallGetPlatformChunkInstall ()
 
static CORE_API void PumpMessagesOutsideMainLoop ()
 
static CORE_API uint64 GetFileVersion (const FString &FileName)
 
static CORE_API int32 GetMaxRefreshRate ()
 
static CORE_API void UpdateDriveFreeSpace ()
 
static CORE_API const FPlatformDriveStatsGetDriveStats (WIDECHAR DriveLetter)
 
- Static Public Member Functions inherited from FGenericPlatformMisc
static CORE_API void PlatformPreInit ()
 
static void PlatformInit ()
 
static CORE_API FDelegateHandle AddNetworkListener (FOnNetworkConnectionChangedDelegate &&InNewDelegate)
 
static CORE_API bool RemoveNetworkListener (FDelegateHandle Handle)
 
static void PlatformHandleSplashScreen (bool ShowSplashScreen=false)
 
static void PlatformTearDown ()
 
static void SetGracefulTerminationHandler ()
 
static void SetCrashHandler (void(*CrashHandler)(const FGenericCrashContext &Context))
 
static ECrashHandlingType GetCrashHandlingType ()
 
static ECrashHandlingType SetCrashHandlingType (ECrashHandlingType Type)
 
static CORE_API FString GetEnvironmentVariable (const TCHAR *VariableName)
 
static CORE_API void SetEnvironmentVar (const TCHAR *VariableName, const TCHAR *Value)
 
static FORCEINLINE int32 GetMaxPathLength ()
 
static CORE_API int32 GetExternalAppMaxPathLength ()
 
static CORE_API const TCHARGetPathVarDelimiter ()
 
static CORE_API TArray< uint8GetMacAddress ()
 
static CORE_API FString GetMacAddressString ()
 
static CORE_API FString GetHashedMacAddressString ()
 
static CORE_API FString GetDeviceId ()
 
static CORE_API FString GetUniqueAdvertisingId ()
 
static CORE_API void SubmitErrorReport (const TCHAR *InErrorHist, EErrorReportMode::Type InMode)
 
static bool IsRemoteSession ()
 
static FORCEINLINE bool IsDebuggerPresent ()
 
static CORE_API EProcessDiagnosticFlags GetProcessDiagnostics ()
 
static FORCEINLINE void DebugBreak ()
 
static CORE_API FString GetCPUVendor ()
 
static CORE_API uint32 GetCPUInfo ()
 
static CORE_API bool HasNonoptionalCPUFeatures ()
 
static CORE_API bool NeedsNonoptionalCPUFeaturesCheck ()
 
static CORE_API FString GetHostArchitecture ()
 
static CORE_API FString GetCPUBrand ()
 
static CORE_API uint32 GetCPUModelID ()
 
static CORE_API uint32 GetCPUMicrocodeRevision ()
 
static CORE_API FString GetCPUChipset ()
 
static CORE_API FString GetPrimaryGPUBrand ()
 
static CORE_API FString GetDeviceMakeAndModel ()
 
static CORE_API struct FGPUDriverInfo GetGPUDriverInfo (const FString &DeviceDescription)
 
static CORE_API void GetOSVersions (FString &out_OSVersionLabel, FString &out_OSSubVersionLabel)
 
static CORE_API FString GetOSVersion ()
 
static CORE_API bool GetDiskTotalAndFreeSpace (const FString &InPath, uint64 &TotalNumberOfBytes, uint64 &NumberOfFreeBytes)
 
static bool GetPageFaultStats (FPageFaultStats &OutStats, EPageFaultFlags Flags=EPageFaultFlags::All)
 
static bool GetBlockingIOStats (FProcessIOStats &OutStats, EInputOutputFlags Flags=EInputOutputFlags::All)
 
static bool GetContextSwitchStats (FContextSwitchStats &OutStats, EContextSwitchFlags Flags=EContextSwitchFlags::All)
 
static bool SupportsMessaging ()
 
static bool IsCacheStorageAvailable ()
 
static bool SupportsLocalCaching ()
 
static bool AllowLocalCaching ()
 
static bool SupportsFullCrashDumps ()
 
CORE_API static FORCENOINLINE void MemoryBarrier ()
 
static void SetMemoryWarningHandler (void(*Handler)(const FGenericMemoryWarningContext &Context))
 
static bool HasMemoryWarningHandler ()
 
static FORCEINLINE uint32 GetLastError ()
 
static void SetLastError (uint32 ErrorCode)
 
static CORE_API void RaiseException (uint32 ExceptionCode)
 
static FORCEINLINE void BeginNamedEventFrame ()
 
static FORCEINLINE void BeginNamedEvent (const struct FColor &Color, const TCHAR *Text)
 
static FORCEINLINE void BeginNamedEvent (const struct FColor &Color, const ANSICHAR *Text)
 
static FORCEINLINE void EndNamedEvent ()
 
static FORCEINLINE void CustomNamedStat (const TCHAR *Text, float Value, const TCHAR *Graph, const TCHAR *Unit)
 
static FORCEINLINE void CustomNamedStat (const ANSICHAR *Text, float Value, const ANSICHAR *Graph, const ANSICHAR *Unit)
 
template<typename CharType >
static void StatNamedEvent (const CharType *Text)
 
static CORE_API void TickStatNamedEvents ()
 
static CORE_API void LogNameEventStatsInit ()
 
static void BeginEnterBackgroundEvent (const TCHAR *Text)
 
static void EndEnterBackgroundEvent ()
 
static FORCEINLINE void InitTaggedStorage (uint32 NumTags)
 
static FORCEINLINE void ShutdownTaggedStorage ()
 
static FORCEINLINE void TagBuffer (const char *Label, uint32 Category, const void *Buffer, size_t BufferSize)
 
static CORE_API bool SetStoredValues (const FString &InStoreId, const FString &InSectionName, const TMap< FString, FString > &InKeyValues)
 
static CORE_API bool SetStoredValue (const FString &InStoreId, const FString &InSectionName, const FString &InKeyName, const FString &InValue)
 
static CORE_API bool GetStoredValue (const FString &InStoreId, const FString &InSectionName, const FString &InKeyName, FString &OutValue)
 
static CORE_API bool DeleteStoredValue (const FString &InStoreId, const FString &InSectionName, const FString &InKeyName)
 
static CORE_API bool DeleteStoredSection (const FString &InStoreId, const FString &InSectionName)
 
static CORE_API void LowLevelOutputDebugString (const TCHAR *Message)
 
static CORE_API void VARARGS LowLevelOutputDebugStringf (const TCHAR *Format,...)
 
static CORE_API bool IsLowLevelOutputDebugStringStructured ()
 
static CORE_API void SetUTF8Output ()
 
static CORE_API void LocalPrint (const TCHAR *Str)
 
static bool IsLocalPrintThreadSafe ()
 
static CORE_API bool HasSeparateChannelForDebugOutput ()
 
static CORE_API void RequestExit (bool Force, const TCHAR *CallSite=nullptr)
 
static CORE_API void RequestExitWithStatus (bool Force, uint8 ReturnCode, const TCHAR *CallSite=nullptr)
 
static CORE_API bool RestartApplication ()
 
static CORE_API bool RestartApplicationWithCmdLine (const char *CmdLine)
 
static CORE_API const TCHARGetSystemErrorMessage (TCHAR *OutBuffer, int32 BufferCount, int32 Error)
 
static CORE_API void CreateGuid (struct FGuid &Result)
 
static CORE_API EAppReturnType::Type MessageBoxExt (EAppMsgType::Type MsgType, const TCHAR *Text, const TCHAR *Caption)
 
static bool CommandLineCommands ()
 
static FORCEINLINE bool Is64bitOperatingSystem ()
 
static bool IsValidAbsolutePathFormat (const FString &Path)
 
static void NormalizePath (FString &InPath)
 
static void NormalizePath (FStringBuilderBase &InPath)
 
static CORE_API const TCHARGetDefaultPathSeparator ()
 
static CORE_API bool UseRenderThread ()
 
static bool AllowAudioThread ()
 
static CORE_API bool AllowThreadHeartBeat ()
 
static CORE_API int32 NumberOfCores ()
 
static CORE_API const FProcessorGroupDescGetProcessorGroupDesc ()
 
static CORE_API int32 NumberOfCoresIncludingHyperthreads ()
 
static CORE_API int32 NumberOfWorkerThreadsToSpawn ()
 
static CORE_API int32 NumberOfIOWorkerThreadsToSpawn ()
 
static struct FAsyncIOSystemBaseGetPlatformSpecificAsyncIOSystem ()
 
static const TCHARGetPlatformFeaturesModuleName ()
 
static CORE_API const TCHARRootDir ()
 
static CORE_API TArray< FString > GetAdditionalRootDirectories ()
 
static CORE_API void AddAdditionalRootDirectory (const FString &RootDir)
 
static CORE_API const TCHAREngineDir ()
 
static CORE_API const TCHARLaunchDir ()
 
static CORE_API void CacheLaunchDir ()
 
static CORE_API const TCHARProjectDir ()
 
static CORE_API bool GetEngineAndProjectAbsoluteDirsFromExecutable (FString &OutProjectDir, FString &OutEngineDir)
 
static CORE_API FString CloudDir ()
 
static bool HasProjectPersistentDownloadDir ()
 
static CORE_API bool CheckPersistentDownloadStorageSpaceAvailable (uint64 BytesRequired, bool bAttemptToUseUI)
 
static CORE_API const TCHARGamePersistentDownloadDir ()
 
static CORE_API const TCHARGameTemporaryDownloadDir ()
 
static CORE_API const TCHARGeneratedConfigDir ()
 
static CORE_API const TCHARGetUBTPlatform ()
 
static CORE_API const TCHARGetUBTTarget ()
 
static CORE_API const TCHARGetUBTArchitecture ()
 
static CORE_API void SetUBTTargetName (const TCHAR *InTargetName)
 
static CORE_API const TCHARGetUBTTargetName ()
 
static CORE_API const TCHARGetNullRHIShaderFormat ()
 
static CORE_API IPlatformChunkInstallGetPlatformChunkInstall ()
 
static CORE_API IPlatformCompressionGetPlatformCompression ()
 
static CORE_API IPlatformHostCommunicationGetPlatformHostCommunication ()
 
static bool OsExecute (const TCHAR *CommandType, const TCHAR *Command, const TCHAR *CommandLine=NULL)
 
static bool IsPackagedForDistribution ()
 
static CORE_API bool GetSHA256Signature (const void *Data, uint32 ByteSize, FSHA256Signature &OutSignature)
 
static CORE_API FString GetDefaultLanguage ()
 
static CORE_API FString GetDefaultLocale ()
 
static CORE_API FString GetTimeZoneId ()
 
static bool Exec (class UWorld *InWorld, const TCHAR *Cmd, FOutputDevice &Out)
 
static CORE_API FText GetFileManagerName ()
 
static bool SupportsMultithreadedFileHandles ()
 
static void SetShouldPromptForRemoteDebugging (bool bInShouldPrompt)
 
static void SetShouldPromptForRemoteDebugOnEnsure (bool bInShouldPrompt)
 
static bool IsEnsureAllowed ()
 
static void UpdateHotfixableEnsureSettings ()
 
static CORE_API void TickHotfixables ()
 
static void PromptForRemoteDebugging (bool bIsEnsure)
 
static FORCEINLINE void Prefetch (const void *Ptr)
 
static FORCEINLINE void Prefetch (const void *Ptr, int32 Offset)
 
static FORCEINLINE void PrefetchBlock (const void *Ptr)
 
static FORCEINLINE void PrefetchBlock (const void *Ptr, int32 NumBytes)
 
static CORE_API const TCHARGetDefaultDeviceProfileName ()
 
static FORCEINLINE int GetBatteryLevel ()
 
static FORCEINLINE void SetBrightness (float bBright)
 
static FORCEINLINE float GetBrightness ()
 
static FORCEINLINE bool SupportsBrightness ()
 
static FORCEINLINE bool IsInLowPowerMode ()
 
static CORE_API float GetDeviceTemperatureLevel ()
 
static CORE_API void SetOverrideProjectDir (const FString &InOverrideDir)
 
static CORE_API void GetValidTargetPlatforms (TArray< FString > &TargetPlatformNames)
 
static CORE_API FPlatformUserId GetPlatformUserForUserIndex (int32 LocalUserIndex)
 
static CORE_API int32 GetUserIndexForPlatformUser (FPlatformUserId PlatformUser)
 
static bool GetUseVirtualJoysticks ()
 
static bool SupportsTouchInput ()
 
static bool SupportsForceTouchInput ()
 
static bool ShouldDisplayTouchInterfaceOnFakingTouchEvents ()
 
static bool DesktopTouchScreen ()
 
static bool FullscreenSameAsWindowedFullscreen ()
 
static bool GetVolumeButtonsHandledBySystem ()
 
static void SetVolumeButtonsHandledBySystem (bool enabled)
 
static CORE_API TArray< uint8GetSystemFontBytes ()
 
static bool HasActiveWiFiConnection ()
 
static CORE_API ENetworkConnectionStatus GetNetworkConnectionStatus ()
 
static CORE_API void SetNetworkConnectionStatus (ENetworkConnectionStatus NewNetworkConnectionStatus)
 
static ENetworkConnectionType GetNetworkConnectionType ()
 
static void EnsureNetworkIfNecessary ()
 
static bool HasVariableHardware ()
 
static bool HasPlatformFeature (const TCHAR *FeatureName)
 
static CORE_API bool IsRunningOnBattery ()
 
static CORE_API EDeviceScreenOrientation GetDeviceOrientation ()
 
static CORE_API void SetDeviceOrientation (EDeviceScreenOrientation NewDeviceOrientation)
 
static CORE_API EDeviceScreenOrientation GetAllowedDeviceOrientation ()
 
static CORE_API void SetAllowedDeviceOrientation (EDeviceScreenOrientation NewAllowedDeviceOrientation)
 
static CORE_API int32 GetDeviceVolume ()
 
static CORE_API FGuid GetMachineId ()
 
static CORE_API FString GetLoginId ()
 
static CORE_API FString GetEpicAccountId ()
 
static CORE_API FString GetDeviceTag ()
 
static CORE_API FString GetOperatingSystemId ()
 
static CORE_API EConvertibleLaptopMode GetConvertibleLaptopMode ()
 
static CORE_API const TCHARGetEngineMode ()
 
static CORE_API TArray< FString > GetPreferredLanguages ()
 
static CORE_API FString GetLocalCurrencyCode ()
 
static CORE_API FString GetLocalCurrencySymbol ()
 
static CORE_API void RegisterForRemoteNotifications ()
 
static CORE_API bool IsRegisteredForRemoteNotifications ()
 
static CORE_API void UnregisterForRemoteNotifications ()
 
static CORE_API FString GetPendingActivationProtocol ()
 
static bool ShouldDisablePluginAtRuntime (const FString &PluginName)
 
static void PrepareMobileHaptics (EMobileHapticsType Type)
 
static void TriggerMobileHaptics ()
 
static void ReleaseMobileHaptics ()
 
static void ShareURL (const FString &URL, const FText &Description, int32 LocationHintX, int32 LocationHintY)
 
static bool SupportsDeviceCheckToken ()
 
static CORE_API bool RequestDeviceCheckToken (TFunction< void(const TArray< uint8 > &)> QuerySucceededFunc, TFunction< void(const FString &, const FString &)> QueryFailedFunc)
 
static CORE_API FString LoadTextFileFromPlatformPackage (const FString &RelativePath)
 
static CORE_API bool FileExistsInPlatformPackage (const FString &RelativePath)
 
static CORE_API void TearDown ()
 
static CORE_API void ParseChunkIdPakchunkIndexMapping (TArray< FString > ChunkIndexRedirects, TMap< int32, int32 > &OutMapping)
 
static void PumpMessagesOutsideMainLoop ()
 
static void PumpMessagesForSlowTask ()
 
static void PumpEssentialAppMessages ()
 
static void HidePlatformStartupScreen ()
 
static FORCEINLINE bool UseHDRByDefault ()
 
static FORCEINLINE void ChooseHDRDeviceAndColorGamut (uint32 DeviceId, uint32 DisplayNitLevel, EDisplayOutputFormat &OutputDevice, EDisplayColorGamut &ColorGamut)
 
static FORCEINLINE int32 GetChunkIDFromPakchunkIndex (int32 PakchunkIndex)
 
static CORE_API FStringView GetPakFilenamePrefix ()
 
static CORE_API int32 GetPakchunkIndexFromPakFile (FStringView InFilename)
 
static FORCEINLINE bool Expand16BitIndicesTo32BitOnLoad ()
 
static FORCEINLINE void GetNetworkFileCustomData (TMap< FString, FString > &OutCustomPlatformData)
 
static FORCEINLINE bool SupportsBackbufferSampling ()
 
static int32 GetMaxRefreshRate ()
 
static int32 GetMaxSupportedRefreshRate ()
 
static int32 GetMaxSyncInterval ()
 
static CORE_API const FString * GetConfigRulesVariable (const FString &Key)
 
static CORE_API const class TMap< FString, FString > & GetConfigRuleVars ()
 
static CORE_API bool IsPGOEnabled ()
 
static CORE_API bool IsPGICapableBinary ()
 
static bool StartNewPGOCollection (const FString &AbsoluteFileName)
 
static CORE_API bool IsPGIActive ()
 
static CORE_API const FString VersionCheckPlatformName ()
 
static bool StopPGOCollectionAndCloseFile ()
 
static CORE_API void ShowConsoleWindow ()
 
static CORE_API int GetMobilePropagateAlphaSetting ()
 
static bool IsRunningInCloud ()
 
static bool WasLaunchedStreaming ()
 
static void DisableScreenTimeout ()
 
static void EnableScreenTimeout ()
 
static bool SetupSyscallFilters ()
 
static const float GetVirtualKeyboardInputHeight ()
 
static bool GetPlatformScreenWarnings (TArray< FText > &PlatformScreenWarnings)
 

Public Attributes

TCHARResult
 
TCHAR int32 ResultLength
 

Additional Inherited Members

- Static Protected Member Functions inherited from FGenericPlatformMisc
static CORE_API void GetConfiguredCoreLimits (int32 PlatformNumPhysicalCores, int32 PlatformNumLogicalCores, bool &bOutFullyInitialized, int32 &OutPhysicalCoreLimit, int32 &OutLogicalCoreLimit, bool &bOutSetPhysicalCountToLogicalCount)
 
- Static Protected Attributes inherited from FGenericPlatformMisc
static CORE_API bool bShouldPromptForRemoteDebugging = false
 
static CORE_API bool bPromptForRemoteDebugOnEnsure = false
 
static CORE_API EDeviceScreenOrientation AllowedDeviceOrientation = EDeviceScreenOrientation::Unknown
 
static CORE_API ENetworkConnectionStatus CurrentNetworkConnectionStatus = ENetworkConnectionStatus::Connected
 

Detailed Description

Windows implementation of the misc OS functions

Member Function Documentation

◆ AsymmetricThreadFenceHeavy()

void FWindowsPlatformMisc::AsymmetricThreadFenceHeavy ( )
static

UE_BUILD_SHIPPING.

◆ AsymmetricThreadFenceLight()

static UE_FORCEINLINE_HINT void FWindowsPlatformMisc::AsymmetricThreadFenceLight ( )
inlinestatic

◆ CallGracefulTerminationHandler()

void FWindowsPlatformMisc::CallGracefulTerminationHandler ( )
static

◆ ChooseHDRDeviceAndColorGamut()

static void FWindowsPlatformMisc::ChooseHDRDeviceAndColorGamut ( uint32  DeviceId,
uint32  DisplayNitLevel,
EDisplayOutputFormat OutputDevice,
EDisplayColorGamut ColorGamut 
)
inlinestatic

◆ CoInitialize()

bool FWindowsPlatformMisc::CoInitialize ( ECOMModel  Model = ECOMModel::Singlethreaded)
static

◆ CommandLineCommands()

bool FWindowsPlatformMisc::CommandLineCommands ( )
static

◆ CoUninitialize()

void FWindowsPlatformMisc::CoUninitialize ( )
static

◆ CreateGuid()

void FWindowsPlatformMisc::CreateGuid ( struct FGuid Result)
static

◆ DeleteStoredSection()

bool FWindowsPlatformMisc::DeleteStoredSection ( const FString &  InStoreId,
const FString &  InSectionName 
)
static

◆ DeleteStoredValue()

bool FWindowsPlatformMisc::DeleteStoredValue ( const FString &  InStoreId,
const FString &  InSectionName,
const FString &  InKeyName 
)
static

◆ GetBatteryLevel()

int FWindowsPlatformMisc::GetBatteryLevel ( )
static

Returns the current battery level between 0 and 100, or -1 if a battery is not present or if the current battery level cannot be retrieved.

◆ GetBlockingIOStats()

bool FWindowsPlatformMisc::GetBlockingIOStats ( FProcessIOStats OutStats,
EInputOutputFlags  Flags = EInputOutputFlags::All 
)
static

◆ GetCacheLineSize()

int32 FWindowsPlatformMisc::GetCacheLineSize ( )
static

◆ GetConvertibleLaptopMode()

EConvertibleLaptopMode FWindowsPlatformMisc::GetConvertibleLaptopMode ( )
static

◆ GetCPUBrand()

FString FWindowsPlatformMisc::GetCPUBrand ( )
static

◆ GetCPUInfo()

uint32 FWindowsPlatformMisc::GetCPUInfo ( )
static

Uses cpuid instruction to get the vendor string

Returns
CPU info bitfield
    Bits 0-3    Stepping ID
    Bits 4-7    Model
    Bits 8-11   Family
    Bits 12-13  Processor type (Intel) / Reserved (AMD)
    Bits 14-15  Reserved
    Bits 16-19  Extended model
    Bits 20-27  Extended family
    Bits 28-31  Reserved

◆ GetCPUMicrocodeRevision()

uint32 FWindowsPlatformMisc::GetCPUMicrocodeRevision ( )
static

◆ GetCPUModelID()

uint32 FWindowsPlatformMisc::GetCPUModelID ( )
static

◆ GetCPUVendor()

FString FWindowsPlatformMisc::GetCPUVendor ( )
static

◆ GetCrashHandlingType()

ECrashHandlingType FWindowsPlatformMisc::GetCrashHandlingType ( )
static

◆ GetDefaultLanguage()

FString FWindowsPlatformMisc::GetDefaultLanguage ( )
static

◆ GetDefaultLocale()

FString FWindowsPlatformMisc::GetDefaultLocale ( )
static

◆ GetDefaultPathSeparator()

const TCHAR * FWindowsPlatformMisc::GetDefaultPathSeparator ( )
static
Returns
Windows path separator.

◆ GetDiskTotalAndFreeSpace()

bool FWindowsPlatformMisc::GetDiskTotalAndFreeSpace ( const FString &  InPath,
uint64 TotalNumberOfBytes,
uint64 NumberOfFreeBytes 
)
static

◆ GetDriveStats()

const FPlatformDriveStats * FWindowsPlatformMisc::GetDriveStats ( WIDECHAR  DriveLetter)
static

Retrieve information about a drive, or nullptr if no information is available.

◆ GetEnvironmentVariable()

FString FWindowsPlatformMisc::GetEnvironmentVariable ( const TCHAR VariableName)
static

◆ GetExternalAppMaxPathLength()

int32 FWindowsPlatformMisc::GetExternalAppMaxPathLength ( )
static

◆ GetFileManagerName()

FText FWindowsPlatformMisc::GetFileManagerName ( )
static
Returns
Get the name of the platform specific file manager (Explorer)

◆ GetFileVersion()

uint64 FWindowsPlatformMisc::GetFileVersion ( const FString &  FileName)
static

◆ GetGPUDriverInfo()

FGPUDriverInfo FWindowsPlatformMisc::GetGPUDriverInfo ( const FString &  DeviceDescription,
bool  bVerbose = true 
)
static

◆ GetHostArchitecture()

FString FWindowsPlatformMisc::GetHostArchitecture ( )
static
Returns
architecture of the host machine (x64, arm64)

◆ GetLastError()

uint32 FWindowsPlatformMisc::GetLastError ( )
static

◆ GetMacAddress()

TArray< uint8 > FWindowsPlatformMisc::GetMacAddress ( )
static

◆ GetMaxPathLength()

int32 FWindowsPlatformMisc::GetMaxPathLength ( )
static

◆ GetMaxRefreshRate()

int32 FWindowsPlatformMisc::GetMaxRefreshRate ( )
static

◆ GetOperatingSystemId()

FString FWindowsPlatformMisc::GetOperatingSystemId ( )
static

Gets a globally unique ID the represents a particular operating system install.

◆ GetOSVersion()

FString FWindowsPlatformMisc::GetOSVersion ( )
static

◆ GetOSVersions()

void FWindowsPlatformMisc::GetOSVersions ( FString &  out_OSVersionLabel,
FString &  out_OSSubVersionLabel 
)
static

◆ GetPageFaultStats()

bool FWindowsPlatformMisc::GetPageFaultStats ( FPageFaultStats OutStats,
EPageFaultFlags  Flags = EPageFaultFlags::All 
)
static

◆ GetPlatformChunkInstall()

IPlatformChunkInstall * FWindowsPlatformMisc::GetPlatformChunkInstall ( )
static

◆ GetPlatformFeaturesModuleName()

const TCHAR * FWindowsPlatformMisc::GetPlatformFeaturesModuleName ( )
static

◆ GetPrimaryGPUBrand()

FString FWindowsPlatformMisc::GetPrimaryGPUBrand ( )
static

◆ GetProcessDiagnostics()

EProcessDiagnosticFlags FWindowsPlatformMisc::GetProcessDiagnostics ( )
static

◆ GetProcessorGroupDesc()

const FProcessorGroupDesc & FWindowsPlatformMisc::GetProcessorGroupDesc ( )
static

◆ GetStoredValue()

bool FWindowsPlatformMisc::GetStoredValue ( const FString &  InStoreId,
const FString &  InSectionName,
const FString &  InKeyName,
FString &  OutValue 
)
static

◆ GetSystemErrorMessage()

const TCHAR * FWindowsPlatformMisc::GetSystemErrorMessage ( TCHAR OutBuffer,
int32  BufferCount,
int32  Error 
)
static

◆ GetTopLevelWindowHandle()

HWND FWindowsPlatformMisc::GetTopLevelWindowHandle ( uint32  ProcessId)
static

Attempts to get the handle to a top-level window of the specified process.

If the process has a single main window (root), its handle will be returned. If the process has multiple top-level windows, the first one found is returned.

Parameters
ProcessIdThe identifier of the process to get the window for.
Returns
Window handle, or 0 if not found.

◆ GetVSComnTools()

bool FWindowsPlatformMisc::GetVSComnTools ( int32  Version,
FString &  OutData 
)
static

Gets Visual Studio common tools path.

Parameters
VersionVersion of VS to get (11 - 2012, 12 - 2013).
OutDataOutput parameter with common tools path.
Returns
Returns if succeeded.

◆ HasActiveWiFiConnection()

static bool FWindowsPlatformMisc::HasActiveWiFiConnection ( )
inlinestatic

Returns whether WiFi connection is currently active

◆ HasAVX2InstructionSupport()

bool FWindowsPlatformMisc::HasAVX2InstructionSupport ( )
static

Determines if AVX2 instruction set is supported on this platform

Returns
Returns true if instruction-set is supported

◆ HasCPUIDInstruction()

bool FWindowsPlatformMisc::HasCPUIDInstruction ( )
static

Determines if the cpuid instruction is supported on this processor

Returns
Returns true if cpuid is supported

◆ HasNonoptionalCPUFeatures()

bool FWindowsPlatformMisc::HasNonoptionalCPUFeatures ( )
static
Returns
whether this cpu supports certain required instructions or not

◆ HasSecureBootSupport()

bool FWindowsPlatformMisc::HasSecureBootSupport ( )
static

◆ HasTimedPauseCPUFeature()

bool FWindowsPlatformMisc::HasTimedPauseCPUFeature ( )
static
Returns
whether this cpu has timed pause instruction support or not

◆ HasTPM2Support()

bool FWindowsPlatformMisc::HasTPM2Support ( )
static

◆ Is64bitOperatingSystem()

bool FWindowsPlatformMisc::Is64bitOperatingSystem ( )
static

Detects whether we're running in a 64-bit operating system.

Returns
true if we're running in a 64-bit operating system

◆ IsDebuggerPresent()

bool FWindowsPlatformMisc::IsDebuggerPresent ( )
static

◆ IsDeviceHandheld()

bool FWindowsPlatformMisc::IsDeviceHandheld ( )
static

Returns whether the device is considered an Handheld device. It's not a dynamic property, the status is cached at startup.

◆ IsLocalPrintThreadSafe()

static bool FWindowsPlatformMisc::IsLocalPrintThreadSafe ( )
inlinestatic

◆ IsRemoteSession()

bool FWindowsPlatformMisc::IsRemoteSession ( )
static

◆ IsRunningOnBattery()

bool FWindowsPlatformMisc::IsRunningOnBattery ( )
static

Returns whether the platform is running on battery power or not. For Windows laptops this is true regardless of charging state.

◆ IsUsingBatterySaver()

bool FWindowsPlatformMisc::IsUsingBatterySaver ( )
static

Returns whether the platform is currently running with battery saver enabled.

◆ IsValidAbsolutePathFormat()

bool FWindowsPlatformMisc::IsValidAbsolutePathFormat ( const FString &  Path)
static

◆ IsWine()

bool FWindowsPlatformMisc::IsWine ( )
static

Determines if we are running under Wine rather than a real version of Windows

Returns
Returns true if the current runtime environment is Wine

◆ LocalPrint()

void FWindowsPlatformMisc::LocalPrint ( const TCHAR Message)
static

◆ MemoryBarrier()

static void FWindowsPlatformMisc::MemoryBarrier ( )
inlinestatic

◆ MessageBoxExt()

EAppReturnType::Type FWindowsPlatformMisc::MessageBoxExt ( EAppMsgType::Type  MsgType,
const TCHAR Text,
const TCHAR Caption 
)
static

◆ NeedsNonoptionalCPUFeaturesCheck()

bool FWindowsPlatformMisc::NeedsNonoptionalCPUFeaturesCheck ( )
static
Returns
whether to check for specific CPU compatibility or not

◆ NumberOfCores()

int32 FWindowsPlatformMisc::NumberOfCores ( )
static

◆ NumberOfCoresIncludingHyperthreads()

int32 FWindowsPlatformMisc::NumberOfCoresIncludingHyperthreads ( )
static

◆ NumberOfWorkerThreadsToSpawn()

int32 FWindowsPlatformMisc::NumberOfWorkerThreadsToSpawn ( )
static

◆ OsExecute()

bool FWindowsPlatformMisc::OsExecute ( const TCHAR CommandType,
const TCHAR Command,
const TCHAR CommandLine = NULL 
)
static

Has the OS execute a command and path pair (such as launch a browser)

Parameters
ComandTypeOS hint as to the type of command
Commandthe command to execute
CommandLinethe commands to pass to the executable
Returns
whether the command was successful or not

◆ PlatformInit()

void FWindowsPlatformMisc::PlatformInit ( )
static

◆ PlatformPreInit()

void FWindowsPlatformMisc::PlatformPreInit ( )
static

◆ PlatformTearDown()

void FWindowsPlatformMisc::PlatformTearDown ( )
static

◆ PromptForRemoteDebugging()

void FWindowsPlatformMisc::PromptForRemoteDebugging ( bool  bIsEnsure)
static

◆ PumpMessagesOutsideMainLoop()

void FWindowsPlatformMisc::PumpMessagesOutsideMainLoop ( )
static

◆ QueryRegKey()

bool FWindowsPlatformMisc::QueryRegKey ( const Windows::HKEY  InKey,
const TCHAR InSubKey,
const TCHAR InValueName,
FString &  OutData 
)
static

Provides a simpler interface for fetching and cleanup of registry value queries

Parameters
InKeyThe Key (folder) in the registry to search under
InSubKeyThe Sub Key (folder) within the main Key to look for
InValueNameThe Name of the Value (file) withing the Sub Key to look for
OutDataThe Data entered into the Value
Returns
true, if it successfully found the Value

◆ RaiseException()

FORCENOINLINE void FWindowsPlatformMisc::RaiseException ( uint32  ExceptionCode)
static

This is the last place to gather memory stats before exception.

◆ RequestExit()

void FWindowsPlatformMisc::RequestExit ( bool  Force,
const TCHAR CallSite = nullptr 
)
static

◆ RequestExitWithStatus()

void FWindowsPlatformMisc::RequestExitWithStatus ( bool  Force,
uint8  ReturnCode,
const TCHAR CallSite = nullptr 
)
static

◆ SetCrashHandlingType()

ECrashHandlingType FWindowsPlatformMisc::SetCrashHandlingType ( ECrashHandlingType  Type)
static

◆ SetEnvironmentVar()

void FWindowsPlatformMisc::SetEnvironmentVar ( const TCHAR VariableName,
const TCHAR Value 
)
static

◆ SetGracefulTerminationHandler()

void FWindowsPlatformMisc::SetGracefulTerminationHandler ( )
static

◆ SetLastError()

void FWindowsPlatformMisc::SetLastError ( uint32  ErrorCode)
static

◆ SetStoredValue()

bool FWindowsPlatformMisc::SetStoredValue ( const FString &  InStoreId,
const FString &  InSectionName,
const FString &  InKeyName,
const FString &  InValue 
)
static

◆ SetUTF8Output()

void FWindowsPlatformMisc::SetUTF8Output ( )
static

◆ SubmitErrorReport()

void FWindowsPlatformMisc::SubmitErrorReport ( const TCHAR InErrorHist,
EErrorReportMode::Type  InMode 
)
static

◆ SupportsWindows11()

bool FWindowsPlatformMisc::SupportsWindows11 ( )
static

Checks whether this device has the required hardware and software capabilities required to run Windows 11.

Returns
True if the Windows 11 min spec is met.

◆ UE_DEPRECATED()

FWindowsPlatformMisc::UE_DEPRECATED ( 4.  21,
"void FPlatformMisc::GetEnvironmentVariable(Name, Result, Length) is deprecated. Use FString FPlatformMisc::GetEnvironmentVariable(Name) instead."   
) const

◆ UpdateDriveFreeSpace()

void FWindowsPlatformMisc::UpdateDriveFreeSpace ( )
static

Update statistics of free/used bytes on all drives.

◆ VerifyWindowsVersion()

bool FWindowsPlatformMisc::VerifyWindowsVersion ( uint32  MajorVersion,
uint32  MinorVersion,
uint32  BuildNumber = 0 
)
static

Determines if we are running on the Windows version or newer

See the 'Remarks' section of https://msdn.microsoft.com/en-us/library/windows/desktop/ms724833(v=vs.85).aspx for a list of MajorVersion/MinorVersion version combinations for Microsoft Windows.

Returns
Returns true if the current Windows version if equal or newer than MajorVersion

Member Data Documentation

◆ Result

TCHAR* FWindowsPlatformMisc::Result

◆ ResultLength

TCHAR int32 FWindowsPlatformMisc::ResultLength

The documentation for this struct was generated from the following files: