zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

powerbase.h (1454B) - Raw


      1 /**
      2  * This file has no copyright assigned and is placed in the Public Domain.
      3  * This file is part of the mingw-w64 runtime package.
      4  * No warranty is given; refer to the file DISCLAIMER.PD within this package.
      5  */
      6 
      7 #ifndef _POWERBASE_H_
      8 #define _POWERBASE_H_
      9 
     10 #include <apiset.h>
     11 #include <apisetcconv.h>
     12 
     13 #ifdef _CONTRACT_GEN
     14 #include <nt.h>
     15 #include <ntrtl.h>
     16 #include <nturtl.h>
     17 #include <minwindef.h>
     18 #endif
     19 
     20 #ifdef __cplusplus
     21 extern "C" {
     22 #endif
     23 
     24 #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
     25 
     26 #ifndef _HPOWERNOTIFY_DEF_
     27 #define _HPOWERNOTIFY_DEF_
     28 
     29 typedef PVOID HPOWERNOTIFY, *PHPOWERNOTIFY;
     30 
     31 #endif /* _HPOWERNOTIFY_DEF_ */
     32 
     33 #ifndef NT_SUCCESS
     34 #define NTSTATUS LONG
     35 #define _OVERRIDE_NTSTATUS_
     36 #endif
     37 
     38 NTSTATUS WINAPI CallNtPowerInformation(POWER_INFORMATION_LEVEL InformationLevel, PVOID InputBuffer, ULONG InputBufferLength, PVOID OutputBuffer, ULONG OutputBufferLength);
     39 
     40 #ifdef _OVERRIDE_NTSTATUS_
     41 #undef NTSTATUS
     42 #endif
     43 
     44 BOOLEAN WINAPI GetPwrCapabilities(PSYSTEM_POWER_CAPABILITIES lpspc);
     45 
     46 #if (NTDDI_VERSION >= NTDDI_WIN8)
     47 POWER_PLATFORM_ROLE WINAPI PowerDeterminePlatformRoleEx(ULONG Version);
     48 DWORD WINAPI PowerRegisterSuspendResumeNotification(DWORD Flags, HANDLE Recipient, PHPOWERNOTIFY RegistrationHandle);
     49 DWORD WINAPI PowerUnregisterSuspendResumeNotification(HPOWERNOTIFY RegistrationHandle);
     50 #endif
     51 
     52 #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
     53 
     54 #ifdef __cplusplus
     55 }
     56 #endif
     57 
     58 #endif /* _POWERBASE_H_ */