mirror of
https://git.code.sf.net/p/mingw-w64/mingw-w64
synced 2024-11-23 09:54:39 +08:00
1303c06a94
Required for Java. https://github.com/openjdk/jdk/blob/master/src/hotspot/os/windows/os_windows.cpp Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com> Signed-off-by: LIU Hao <lh_mouse@126.com>
59 lines
1.4 KiB
C
59 lines
1.4 KiB
C
/**
|
|
* This file has no copyright assigned and is placed in the Public Domain.
|
|
* This file is part of the mingw-w64 runtime package.
|
|
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
|
*/
|
|
|
|
#ifndef _POWERBASE_H_
|
|
#define _POWERBASE_H_
|
|
|
|
#include <apiset.h>
|
|
#include <apisetcconv.h>
|
|
|
|
#ifdef _CONTRACT_GEN
|
|
#include <nt.h>
|
|
#include <ntrtl.h>
|
|
#include <nturtl.h>
|
|
#include <minwindef.h>
|
|
#endif
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
|
|
|
|
#ifndef _HPOWERNOTIFY_DEF_
|
|
#define _HPOWERNOTIFY_DEF_
|
|
|
|
typedef PVOID HPOWERNOTIFY, *PHPOWERNOTIFY;
|
|
|
|
#endif /* _HPOWERNOTIFY_DEF_ */
|
|
|
|
#ifndef NT_SUCCESS
|
|
#define NTSTATUS LONG
|
|
#define _OVERRIDE_NTSTATUS_
|
|
#endif
|
|
|
|
NTSTATUS WINAPI CallNtPowerInformation(POWER_INFORMATION_LEVEL InformationLevel, PVOID InputBuffer, ULONG InputBufferLength, PVOID OutputBuffer, ULONG OutputBufferLength);
|
|
|
|
#ifdef _OVERRIDE_NTSTATUS_
|
|
#undef NTSTATUS
|
|
#endif
|
|
|
|
BOOLEAN WINAPI GetPwrCapabilities(PSYSTEM_POWER_CAPABILITIES lpspc);
|
|
|
|
#if (NTDDI_VERSION >= NTDDI_WIN8)
|
|
POWER_PLATFORM_ROLE WINAPI PowerDeterminePlatformRoleEx(ULONG Version);
|
|
DWORD WINAPI PowerRegisterSuspendResumeNotification(DWORD Flags, HANDLE Recipient, PHPOWERNOTIFY RegistrationHandle);
|
|
DWORD WINAPI PowerUnregisterSuspendResumeNotification(HPOWERNOTIFY RegistrationHandle);
|
|
#endif
|
|
|
|
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* _POWERBASE_H_ */
|