Some work toward Issue 27 and Issue 319

This commit is contained in:
Nick Bolton 2010-05-31 21:30:29 +00:00
parent fea12827d4
commit f974d8d680
74 changed files with 4057 additions and 3756 deletions

View file

@ -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