mirror of
https://github.com/debauchee/barrier.git
synced 2025-07-25 12:28:48 +02:00
Some work toward Issue 27 and Issue 319
This commit is contained in:
parent
fea12827d4
commit
f974d8d680
74 changed files with 4057 additions and 3756 deletions
|
@ -20,7 +20,9 @@
|
|||
#include "common.h"
|
||||
#include "stdstring.h"
|
||||
#include "stdset.h"
|
||||
#include <windows.h>
|
||||
#include <windows.h>
|
||||
#include <Tlhelp32.h>
|
||||
#include "CString.h"
|
||||
|
||||
//! Miscellaneous win32 functions.
|
||||
class CArchMiscWindows {
|
||||
|
@ -164,6 +166,16 @@ public:
|
|||
//! Briefly interrupt power saving
|
||||
static void wakeupDisplay();
|
||||
|
||||
//! Returns true if this process was launched via NT service host.
|
||||
static bool wasLaunchedAsService();
|
||||
|
||||
//! Returns true if we got the parent process name.
|
||||
static bool getParentProcessName(CString &name);
|
||||
|
||||
static HINSTANCE instanceWin32();
|
||||
|
||||
static void setInstanceWin32(HINSTANCE instance);
|
||||
|
||||
private:
|
||||
//! Open and return a registry key, closing the parent key
|
||||
static HKEY openKey(HKEY parent, const TCHAR* child, bool create);
|
||||
|
@ -180,6 +192,10 @@ private:
|
|||
|
||||
static DWORD WINAPI dummySetThreadExecutionState(DWORD);
|
||||
|
||||
static BOOL WINAPI getProcessEntry(PROCESSENTRY32& entry, DWORD processID);
|
||||
static BOOL WINAPI getSelfProcessEntry(PROCESSENTRY32& entry);
|
||||
static BOOL WINAPI getParentProcessEntry(PROCESSENTRY32& entry);
|
||||
|
||||
private:
|
||||
typedef std::set<HWND> CDialogs;
|
||||
typedef DWORD (WINAPI *STES_t)(DWORD);
|
||||
|
@ -189,6 +205,7 @@ private:
|
|||
static STES_t s_stes;
|
||||
static HICON s_largeIcon;
|
||||
static HICON s_smallIcon;
|
||||
static HINSTANCE s_instanceWin32;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue