13 HMODULE LocalizedReasonModule;
14 ULONG LocalizedReasonId;
15 ULONG ReasonStringCount;
16 LPWSTR *ReasonStrings;
20 LPWSTR SimpleReasonString;
34 ctx.
Reason.SimpleReasonString =
const_cast<wchar_t*
>(str);
35 return this->PowerCreateRequest(&ctx);
39 HMODULE kernel32 = GetModuleHandle(_T(
"kernel32.dll"));
42 ctx.
Reason.SimpleReasonString =
const_cast<wchar_t*
>(Reason);
86 SetThreadExecutionState(ES_CONTINUOUS | (
m_bSystem ? ES_SYSTEM_REQUIRED : 0 ) | (
m_bDisplay ? ES_DISPLAY_REQUIRED : 0) );
void ToggleExecution(HANDLE hRequest, bool bSystem)
void SetDisplay(bool bDisplay)
void SetSystem(bool bSystem)
union winapi_substitute::_REASON_CONTEXT::@14 Reason
struct winapi_substitute::_REASON_CONTEXT * PREASON_CONTEXT
REASON_CONTEXT * PPOWER_REQUEST_CONTEXT
HANDLE PowerCreateRequestNamed(const wchar_t *str)
typedef HANDLE(WINAPI *pPowerCreateRequest_t)(__in void *Context)
REASON_CONTEXT POWER_REQUEST_CONTEXT
REASON_CONTEXT * LPPOWER_REQUEST_CONTEXT
pPowerCreateRequest_t PowerCreateRequest
CPowerRequest(const wchar_t *Reason)
void ToggleSystem(HANDLE hRequest, bool bSystem)
void ToggleDisplay(HANDLE hRequest, bool bDisplay)
struct winapi_substitute::_REASON_CONTEXT REASON_CONTEXT
void SetExecution(bool bExecution)