Ocean
Ocean::Platform::Win::System Class Reference

This class provides basic system functionalities on windows platforms. More...

Static Public Member Functions

static IO::Directory currentDirectory ()
 Returns the current directory used for this process. More...
 
static IO::Directory processDirectory ()
 Returns the process directory used for this process. More...
 
static HMODULE currentLibraryModule ()
 Returns the handle to the calling module (a runtime library). More...
 
static std::wstring moduleName (const HMODULE handle)
 Returns the corresponding name (the filename) of a given module handle. More...
 
static std::string environmentVariable (const std::string &variable, const bool removeQuotes=true)
 Returns a defined environment variable. More...
 

Detailed Description

This class provides basic system functionalities on windows platforms.

Member Function Documentation

◆ currentDirectory()

static IO::Directory Ocean::Platform::Win::System::currentDirectory ( )
static

Returns the current directory used for this process.

Returns
Current directory

◆ currentLibraryModule()

static HMODULE Ocean::Platform::Win::System::currentLibraryModule ( )
static

Returns the handle to the calling module (a runtime library).

This function returns nullptr if the calling module is an application.
Every valid module handle must be released by an explicit FreeLibrary() call.

Returns
The handle of the calling module library, nullptr otherwise

◆ environmentVariable()

static std::string Ocean::Platform::Win::System::environmentVariable ( const std::string &  variable,
const bool  removeQuotes = true 
)
static

Returns a defined environment variable.

Parameters
variableEnvironment variable to return
removeQuotesDetermines whether all beginning and ending quotes are removed from the environment variable, if existent
Returns
Specified environment variable

◆ moduleName()

static std::wstring Ocean::Platform::Win::System::moduleName ( const HMODULE  handle)
static

Returns the corresponding name (the filename) of a given module handle.

Parameters
handleThe handle for that the corresponding name is returned
Returns
Resulting handle handle, if any

◆ processDirectory()

static IO::Directory Ocean::Platform::Win::System::processDirectory ( )
static

Returns the process directory used for this process.

Returns
Process directory

The documentation for this class was generated from the following file: