Navigation
API > API/Runtime > API/Runtime/Core
Generic implementation for most platforms, these tend to be unused and unimplemented
| Name | FGenericPlatformProcess |
| Type | struct |
| Header File | /Engine/Source/Runtime/Core/Public/GenericPlatform/GenericPlatformProcess.h |
| Include Path | #include "GenericPlatform/GenericPlatformProcess.h" |
Syntax
struct FGenericPlatformProcess
Derived Classes
Structs
| Name | Remarks |
|---|---|
| ApplicationSettingsContext | |
| FSemaphore | Generic representation of a interprocess semaphore |
Enums
Public
| Name | Remarks |
|---|---|
| EWaitAndForkResult |
Functions
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void AddDllDirectory
(
const TCHAR* Directory |
Adds a directory to search in when resolving implicitly loaded or filename-only DLLs. | GenericPlatform/GenericPlatformProcess.h | |
static const TCHAR * ApplicationSettingsDir() |
Get application settings directory. NOTE: Only one return value is valid at a time! | GenericPlatform/GenericPlatformProcess.h | |
static const TCHAR * BaseDir() |
Get startup directory. NOTE: Only one return value is valid at a time! | GenericPlatform/GenericPlatformProcess.h | |
static bool CanLaunchURL
(
const TCHAR* URL |
Checks if the platform can launch a uniform resource locator (i.e. http://www.epicgames.com/unreal). | GenericPlatform/GenericPlatformProcess.h | |
static void CeaseBeingFirstInstance() |
Stop reporting that we are the first instance | GenericPlatform/GenericPlatformProcess.h | |
static void CleanShaderWorkingDir() |
Clean the shader working directory.Clean the shader working directory | GenericPlatform/GenericPlatformProcess.h | |
static void ClosePipe
(
void* ReadPipe, |
Closes an anonymous pipe. | GenericPlatform/GenericPlatformProcess.h | |
static void CloseProc
(
FProcHandle& ProcessHandle |
Cleans up FProcHandle after we're done with it. | GenericPlatform/GenericPlatformProcess.h | |
static const TCHAR * ComputerName() |
Get computer name. NOTE: Only one return value is valid at a time! | GenericPlatform/GenericPlatformProcess.h | |
static void ConditionalSleep
(
TFunctionRef< bool()> Condition, |
Sleep thread until condition is satisfied. | GenericPlatform/GenericPlatformProcess.h | |
static bool CreatePipe
(
void*& ReadPipe, |
Creates a writable anonymous pipe. | GenericPlatform/GenericPlatformProcess.h | |
static FProcHandle CreateProc
(
const TCHAR* URL, |
Creates a new process and its primary thread, with separate std pipes. | GenericPlatform/GenericPlatformProcess.h | |
static FProcHandle CreateProc
(
const TCHAR* URL, |
Creates a new process and its primary thread. | GenericPlatform/GenericPlatformProcess.h | |
static TTuple< FProcHandle, UE::HAL::EProcessId > CreateProc
(
const UE::HAL::FProcessStartInfo& StartInfo |
Creates a new process using StartInfo. | GenericPlatform/GenericPlatformProcess.h | |
static TSharedPtr< IProcessSentinel > CreateProcessSentinel
(
const TCHAR* Name, |
Create a GenericProcessSentinel, or a subclass, object, and then uses it to create the actual sentinel file on disk | GenericPlatform/GenericPlatformProcess.h | |
static TSharedPtr< IProcessSentinel > CreateProcessSentinelObject() |
Create a GenericProcessSentinel, or a subclass, object | GenericPlatform/GenericPlatformProcess.h | |
static FRunnableThread * CreateRunnableThread () |
Creates the platform-specific runnable thread. | GenericPlatform/GenericPlatformProcess.h | |
static FEvent * CreateSynchEvent
(
bool bIsManualReset |
Creates a new event. | GenericPlatform/GenericPlatformProcess.h | |
static bool Daemonize() |
Makes process run as a system service (daemon), i.e. detaches it from whatever user session it was initially run from. | GenericPlatform/GenericPlatformProcess.h | |
static bool DeleteInterprocessSynchObject
(
FSemaphore* Object |
Deletes an interprocess synchronization object. | GenericPlatform/GenericPlatformProcess.h | |
static void DumpThreadInfo
(
const TCHAR* MarkerName |
Output information about the currently active thread | GenericPlatform/GenericPlatformProcess.h | |
static bool ExecElevatedProcess
(
const TCHAR* URL, |
Executes a process as administrator, requesting elevation as necessary. | GenericPlatform/GenericPlatformProcess.h | |
static bool ExecProcess
(
const TCHAR* URL, |
Executes a process, returning the return code, stdout, and stderr. | GenericPlatform/GenericPlatformProcess.h | |
static const TCHAR * ExecutableName
(
bool bRemoveExtension |
Return the name of the currently running executable | GenericPlatform/GenericPlatformProcess.h | |
static const TCHAR * ExecutablePath() |
Return the path to the currently running executable | GenericPlatform/GenericPlatformProcess.h | |
static void ExploreFolder
(
const TCHAR* FilePath |
Attempt to "explore" the folder specified by the provided file path | GenericPlatform/GenericPlatformProcess.h | |
static void FlushPoolSyncEvents() |
Deletes all the recycled sync events contained by the pools | GenericPlatform/GenericPlatformProcess.h | |
static void FreeDllHandle
(
void* DllHandle |
Free a DLL. | GenericPlatform/GenericPlatformProcess.h | |
static FString GenerateApplicationPath
(
const FString& AppName, |
Generates the path to the specified application or game. | GenericPlatform/GenericPlatformProcess.h | |
static bool GetApplicationMemoryUsage
(
uint32 ProcessId, |
Outputs the virtual memory usage, of the process with the specified PID | GenericPlatform/GenericPlatformProcess.h | |
static FString GetApplicationName
(
uint32 ProcessId |
Returns the Name of process given by the PID. Returns Empty string "" if PID not found. | GenericPlatform/GenericPlatformProcess.h | |
static FString GetApplicationSettingsDir
(
const ApplicationSettingsContext& Settings |
Get application settings directory for a given context. | GenericPlatform/GenericPlatformProcess.h | |
static const TCHAR * GetArchitectureSuffix () |
Get the architecture suffix, if any | GenericPlatform/GenericPlatformProcess.h | |
static const TCHAR * GetBinariesSubdirectory() |
Used only by platforms with DLLs, this gives the subdirectory from binaries to find the executables | GenericPlatform/GenericPlatformProcess.h | |
static uint32 GetCurrentCoreNumber() |
Retrieves the current hardware CPU core | GenericPlatform/GenericPlatformProcess.h | |
static uint32 GetCurrentProcessId() |
Retrieves the ProcessId of this process. | GenericPlatform/GenericPlatformProcess.h | |
static FString GetCurrentWorkingDirectory() |
Get the current working directory (only really makes sense on desktop platforms) | GenericPlatform/GenericPlatformProcess.h | |
static ENamedThreads::Type GetDesiredThreadForUObjectReferenceCollector() |
Specifies the thread to use for UObject reference collection | GenericPlatform/GenericPlatformProcess.h | |
| Get the list of registered directories to search in when resolving implicitly loaded or filename-only DLLs. | GenericPlatform/GenericPlatformProcess.h | ||
static void * GetDllExport
(
void* DllHandle, |
Lookup the address of a DLL function. | GenericPlatform/GenericPlatformProcess.h | |
static void * GetDllHandle
(
const TCHAR* Filename |
Load a DLL. | GenericPlatform/GenericPlatformProcess.h | |
static FString GetGameBundleId() |
Retrieves the platform-specific bundle identifier or package name of the game | GenericPlatform/GenericPlatformProcess.h | |
static const TCHAR * GetModuleExtension () |
Return the extension of dynamic library | GenericPlatform/GenericPlatformProcess.h | |
static const TCHAR * GetModulePrefix () |
Return the prefix of dynamic library (e.g. lib) | GenericPlatform/GenericPlatformProcess.h | |
static const FString GetModulesDirectory () |
Used only by platforms with DLLs, this gives the full path to the main directory containing modules | GenericPlatform/GenericPlatformProcess.h | |
static bool GetPerFrameProcessorUsage
(
uint32 ProcessId, |
Retrieves the current CPU Utilization for the current process in terms of percentage of all capacity | GenericPlatform/GenericPlatformProcess.h | |
static bool GetProcReturnCode
(
FProcHandle& ProcHandle, |
Retrieves the termination status of the specified process. | GenericPlatform/GenericPlatformProcess.h | |
static uint32 GetStackSize() |
Get the active stack size for the currently running thread | GenericPlatform/GenericPlatformProcess.h | |
static FEvent * GetSynchEventFromPool
(
bool bIsManualReset |
Gets an event from the pool or creates a new one if necessary. | GenericPlatform/GenericPlatformProcess.h | |
static bool IsApplicationRunning
(
const TCHAR* ProcName |
Returns true if the specified application is running | GenericPlatform/GenericPlatformProcess.h | |
static bool IsApplicationRunning
(
uint32 ProcessId |
Returns true if the specified application is running | GenericPlatform/GenericPlatformProcess.h | |
static bool IsFirstInstance () |
Checks if we're the first instance. | GenericPlatform/GenericPlatformProcess.h | |
static bool IsProcRunning
(
FProcHandle& ProcessHandle |
Returns true if the specified process is running | GenericPlatform/GenericPlatformProcess.h | |
static bool LaunchFileInDefaultExternalApplication
(
const TCHAR* FileName, |
Attempt to launch the provided file name in its default external application. | GenericPlatform/GenericPlatformProcess.h | |
| Launch a uniform resource locator (i.e. http://www.epicgames.com/unreal). | GenericPlatform/GenericPlatformProcess.h | ||
static bool LaunchURLFiltered
(
const TCHAR* URL, |
Launch a uniform resource locator (i.e. http://www.epicgames.com/unreal). | GenericPlatform/GenericPlatformProcess.h | |
static void ModifyThreadAssignmentForUObjectReferenceCollector
(
int32& NumThreads, |
Allows a platform to override the threading configuration for reference collection | GenericPlatform/GenericPlatformProcess.h | |
static bool ModuleExists
(
const FString& Filename |
Used only by platforms with DLLs, this confirms the existence of a given module. | GenericPlatform/GenericPlatformProcess.h | |
static FSemaphore * NewInterprocessSynchObject
(
const FString& Name, |
Creates or opens an interprocess synchronization object. | GenericPlatform/GenericPlatformProcess.h | |
static FSemaphore * NewInterprocessSynchObject
(
const TCHAR* Name, |
Creates or opens an interprocess synchronization object. | GenericPlatform/GenericPlatformProcess.h | |
static FProcHandle OpenProcess
(
uint32 ProcessID |
Opens an existing process. | GenericPlatform/GenericPlatformProcess.h | |
static void PopDllDirectory
(
const TCHAR* Directory |
Unsets a directory to look for DLL files. | GenericPlatform/GenericPlatformProcess.h | |
static void PushDllDirectory
(
const TCHAR* Directory |
Set a directory to look for DLL files. NEEDS to have a Pop call when complete | GenericPlatform/GenericPlatformProcess.h | |
| Reads all pending data from an anonymous pipe, such as STDOUT or STDERROR of a process. | GenericPlatform/GenericPlatformProcess.h | ||
static bool ReadPipeToArray
(
void* ReadPipe, |
Reads all pending data from an anonymous pipe, such as STDOUT or STDERROR of a process. | GenericPlatform/GenericPlatformProcess.h | |
static void ReturnSynchEventToPool
(
FEvent* Event |
Returns an event to the pool. | GenericPlatform/GenericPlatformProcess.h | |
static void SetCurrentWorkingDirectoryToBaseDir() |
GenericPlatform/GenericPlatformProcess.h | ||
static bool SetProcessLimits
(
EProcessResource::Type Resource, |
Sets the process limits. | GenericPlatform/GenericPlatformProcess.h | |
static void SetShaderDir
(
const TCHAR* Where |
GenericPlatform/GenericPlatformProcess.h | ||
static void SetThreadAffinityMask
(
uint64 AffinityMask |
Change the thread processor affinity | GenericPlatform/GenericPlatformProcess.h | |
static void SetThreadName
(
const TCHAR* ThreadName |
Helper function to set thread name of the current thread. | GenericPlatform/GenericPlatformProcess.h | |
static void SetThreadPriority
(
EThreadPriority NewPriority |
Change the thread processor priority | GenericPlatform/GenericPlatformProcess.h | |
static void SetupAudioThread() |
Allow the platform to do anything it needs for audio thread | GenericPlatform/GenericPlatformProcess.h | |
static void SetupGameThread() |
Allow the platform to do anything it needs for game thread | GenericPlatform/GenericPlatformProcess.h | |
static void SetupRenderThread() |
Allow the platform to do anything it needs for render thread | GenericPlatform/GenericPlatformProcess.h | |
static const TCHAR * ShaderDir() |
GenericPlatform/GenericPlatformProcess.h | ||
static const FString ShaderWorkingDir() |
Get the shader working directory.Get the shader working directory | GenericPlatform/GenericPlatformProcess.h | |
static bool ShouldSaveToUserDir() |
Content saved to the game or engine directories should be rerouted to user directories instead | GenericPlatform/GenericPlatformProcess.h | |
static bool SkipWaitForStats() |
Force skip calling FThreadStats::WaitForStats() | GenericPlatform/GenericPlatformProcess.h | |
static void Sleep
(
float Seconds |
Sleep this thread for Seconds. | GenericPlatform/GenericPlatformProcess.h | |
static void SleepInfinite() |
Sleep this thread infinitely. | GenericPlatform/GenericPlatformProcess.h | |
static void SleepNoStats
(
float Seconds |
Sleep this thread for Seconds. | GenericPlatform/GenericPlatformProcess.h | |
static bool SupportsMultithreading() |
Gets whether this platform can use multiple threads. | GenericPlatform/GenericPlatformProcess.h | |
static void TearDown() |
Tears down allocated process resources. | GenericPlatform/GenericPlatformProcess.h | |
static void TeardownAudioThread() |
Allow the platform to tear down the audio thread | GenericPlatform/GenericPlatformProcess.h | |
static void TerminateProc
(
FProcHandle& ProcessHandle, |
Terminates a process | GenericPlatform/GenericPlatformProcess.h | |
static void TerminateProcTreeWithPredicate
(
FProcHandle& ProcessHandle, |
Terminates a process tree | GenericPlatform/GenericPlatformProcess.h | |
static bool TryGetMemoryUsage
(
FProcHandle& ProcessHandle, |
Queries the memory usage of the process. Returns whether the operation is supported and succeeded. | GenericPlatform/GenericPlatformProcess.h | |
static const TCHAR * UserDir() |
Get user directory. NOTE: Only one return value is valid at a time! | GenericPlatform/GenericPlatformProcess.h | |
static const TCHAR * UserHomeDir() |
Get the user home directory. NOTE: Only one return value is valid at a time! | GenericPlatform/GenericPlatformProcess.h | |
static const TCHAR * UserName
(
bool bOnlyAlphaNumeric |
Get user name. NOTE: Only one return value is valid at a time! | GenericPlatform/GenericPlatformProcess.h | |
static const TCHAR * UserSettingsDir() |
Get the user settings directory. NOTE: Only one return value is valid at a time! | GenericPlatform/GenericPlatformProcess.h | |
static const TCHAR * UserTempDir() |
Get the user temporary directory. NOTE: Only one return value is valid at a time! | GenericPlatform/GenericPlatformProcess.h | |
static EWaitAndForkResult WaitAndFork () |
Waits for process signals and forks child processes. | GenericPlatform/GenericPlatformProcess.h | |
static void WaitForProc
(
FProcHandle& ProcessHandle |
Waits for a process to stop | GenericPlatform/GenericPlatformProcess.h | |
| Sends the message to process through pipe | GenericPlatform/GenericPlatformProcess.h | ||
static bool WritePipe
(
void* WritePipe, |
Sends data to process through pipe | GenericPlatform/GenericPlatformProcess.h | |
static void Yield () |
Tells the processor to pause for implementation-specific amount of time. | GenericPlatform/GenericPlatformProcess.h | |
static void YieldCycles
(
uint64 Cycles |
Tells the processor to pause for at least the amount of cycles given. | GenericPlatform/GenericPlatformProcess.h | |
static void YieldThread() |
Yield this thread so another may run for a while. | GenericPlatform/GenericPlatformProcess.h |