|
static void | init () |
| Initialize.
|
static int | runDaemon (RunFunc runFunc) |
| Run the daemon.
|
static void | daemonRunning (bool running) |
| Indicate daemon is in main loop.
|
static void | daemonFailed (int result) |
| Indicate failure of running daemon.
|
static UINT | getDaemonQuitMessage () |
| Get daemon quit message.
|
static HKEY | openKey (HKEY parent, const TCHAR *child) |
| Open and return a registry key, closing the parent key.
|
static HKEY | openKey (HKEY parent, const TCHAR *const *keyPath) |
| Open and return a registry key, closing the parent key.
|
static HKEY | addKey (HKEY parent, const TCHAR *child) |
| Open/create and return a registry key, closing the parent key.
|
static HKEY | addKey (HKEY parent, const TCHAR *const *keyPath) |
| Open/create and return a registry key, closing the parent key.
|
static void | closeKey (HKEY) |
| Close a key.
|
static void | deleteKey (HKEY parent, const TCHAR *name) |
| Delete a key (which should have no subkeys)
|
static EValueType | typeOfValue (HKEY key, const TCHAR *name) |
| Get type of value.
|
static void | setValue (HKEY key, const TCHAR *name, const std::string &value) |
| Set a string value in the registry.
|
static void | setValue (HKEY key, const TCHAR *name, DWORD value) |
| Set a DWORD value in the registry.
|
static std::string | readValueString (HKEY, const TCHAR *name) |
| Read a string value from the registry.
|
static DWORD | readValueInt (HKEY, const TCHAR *name) |
| Read a DWORD value from the registry.
|
static void | addBusyState (DWORD busyModes) |
| Disable power saving.
|
static void | removeBusyState (DWORD busyModes) |
| Enable power saving.
|
static void | wakeupDisplay () |
| Briefly interrupt power saving.
|
static bool | wasLaunchedAsService () |
| Returns true if this process was launched via NT service host.
|
static bool | getParentProcessName (std::string &name) |
| Returns true if we got the parent process name.
|
static void | guardRuntimeVersion () |
| Prevent hard to troubleshoot errors, e.g. access violations.
|
static HINSTANCE | instanceWin32 () |
| Gets the window instance saved at program start.
|
static void | setInstanceWin32 (HINSTANCE instance) |
| Saves the window instance for later use.
|
static std::string | getActiveDesktopName () |
| Get the name of the active input desktop.
|
static bool | isProcessElevated () |
| Returns true if the process is running with elevated privileges (i.e. as admin).
|
Miscellaneous win32 functions.