#include <CPowerRequest.h>
|
template<typename func_t > |
static bool | Bind (func_t &f, HMODULE dll, const char *name) |
|
Definition at line 17 of file CPowerRequest.h.
CPowerRequestAPI::CPowerRequestAPI |
( |
| ) |
|
|
inline |
Definition at line 19 of file CPowerRequest.h.
pPowerClearRequest_t PowerClearRequest
pPowerCreateRequest_t PowerCreateRequest
pPowerSetRequest_t PowerSetRequest
bool CPowerRequestAPI::Bind |
( |
| ) |
|
|
inline |
Definition at line 22 of file CPowerRequest.h.
23 HMODULE kernel32 = GetModuleHandle(_T(
"kernel32.dll"));
pPowerClearRequest_t PowerClearRequest
pPowerCreateRequest_t PowerCreateRequest
pPowerSetRequest_t PowerSetRequest
template<typename func_t >
static bool CPowerRequestAPI::Bind |
( |
func_t & |
f, |
|
|
HMODULE |
dll, |
|
|
const char * |
name |
|
) |
| |
|
inlinestaticprivate |
Definition at line 67 of file CPowerRequest.h.
68 f =
reinterpret_cast<func_t
>(GetProcAddress(dll, name));
bool CPowerRequestAPI::IsValid |
( |
| ) |
|
|
inline |
Definition at line 28 of file CPowerRequest.h.
pPowerCreateRequest_t PowerCreateRequest
static bool CPowerRequestAPI::IsWin8 |
( |
| ) |
|
|
inlinestatic |
static WORD CPowerRequestAPI::myGetOSVersion |
( |
| ) |
|
|
inlinestatic |
Definition at line 58 of file CPowerRequest.h.
59 const DWORD ver = GetVersion();
60 return (WORD)HIBYTE(LOWORD(ver)) | ((WORD)LOBYTE(LOWORD(ver)) << 8);
HANDLE CPowerRequestAPI::PowerCreateRequestNamed |
( |
const wchar_t * |
str | ) |
|
Definition at line 32 of file CPowerRequest.cpp.
34 ctx.
Reason.SimpleReasonString =
const_cast<wchar_t*
>(str);
union winapi_substitute::_REASON_CONTEXT::@14 Reason
pPowerCreateRequest_t PowerCreateRequest
void CPowerRequestAPI::Toggle |
( |
HANDLE |
hRequest, |
|
|
bool |
bToggle, |
|
|
POWER_REQUEST_TYPE |
what |
|
) |
| |
|
inline |
Definition at line 44 of file CPowerRequest.h.
pPowerClearRequest_t PowerClearRequest
pPowerSetRequest_t PowerSetRequest
void CPowerRequestAPI::ToggleDisplay |
( |
HANDLE |
hRequest, |
|
|
bool |
bDisplay |
|
) |
| |
|
inline |
Definition at line 40 of file CPowerRequest.h.
41 Toggle(hRequest, bDisplay, PowerRequestDisplayRequired);
void Toggle(HANDLE hRequest, bool bToggle, POWER_REQUEST_TYPE what)
void CPowerRequestAPI::ToggleExecution |
( |
HANDLE |
hRequest, |
|
|
bool |
bSystem |
|
) |
| |
|
inline |
Definition at line 34 of file CPowerRequest.h.
35 const POWER_REQUEST_TYPE _PowerRequestExecutionRequired = (POWER_REQUEST_TYPE)3;
36 const POWER_REQUEST_TYPE
RequestType =
IsWin8() ? _PowerRequestExecutionRequired : PowerRequestSystemRequired;
37 Toggle(hRequest, bSystem, RequestType);
void Toggle(HANDLE hRequest, bool bToggle, POWER_REQUEST_TYPE what)
__in POWER_REQUEST_TYPE RequestType
void CPowerRequestAPI::ToggleSystem |
( |
HANDLE |
hRequest, |
|
|
bool |
bSystem |
|
) |
| |
|
inline |
Definition at line 30 of file CPowerRequest.h.
31 Toggle(hRequest, bSystem, PowerRequestSystemRequired);
void Toggle(HANDLE hRequest, bool bToggle, POWER_REQUEST_TYPE what)
pPowerClearRequest_t CPowerRequestAPI::PowerClearRequest |
pPowerCreateRequest_t CPowerRequestAPI::PowerCreateRequest |
pPowerSetRequest_t CPowerRequestAPI::PowerSetRequest |
The documentation for this class was generated from the following files: