Win32 API 日本語リファレンス
ホームSystem.Power › IsSystemResumeAutomatic

IsSystemResumeAutomatic

関数
システムが自動的に復帰したかどうかを判定する。
DLLKERNEL32.dll呼出規約winapi対応OSWindows XP 以降

シグネチャ

// KERNEL32.dll
#include <windows.h>

BOOL IsSystemResumeAutomatic(void);

パラメーターなし。戻り値: BOOL

各言語での呼び出し定義

// KERNEL32.dll
#include <windows.h>

BOOL IsSystemResumeAutomatic(void);
[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("KERNEL32.dll", ExactSpelling = true)]
static extern bool IsSystemResumeAutomatic();
<DllImport("KERNEL32.dll", ExactSpelling:=True)>
Public Shared Function IsSystemResumeAutomatic() As Boolean
End Function
Declare PtrSafe Function IsSystemResumeAutomatic Lib "kernel32" () As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

IsSystemResumeAutomatic = ctypes.windll.kernel32.IsSystemResumeAutomatic
IsSystemResumeAutomatic.restype = wintypes.BOOL
IsSystemResumeAutomatic.argtypes = []
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('KERNEL32.dll')
IsSystemResumeAutomatic = Fiddle::Function.new(
  lib['IsSystemResumeAutomatic'],
  [],
  Fiddle::TYPE_INT)
#[link(name = "kernel32")]
extern "system" {
    fn IsSystemResumeAutomatic() -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("KERNEL32.dll")]
public static extern bool IsSystemResumeAutomatic();
"@
$api = Add-Type -MemberDefinition $sig -Name 'KERNEL32_IsSystemResumeAutomatic' -Namespace Win32 -PassThru
# $api::IsSystemResumeAutomatic()
#uselib "KERNEL32.dll"
#func global IsSystemResumeAutomatic "IsSystemResumeAutomatic"
; IsSystemResumeAutomatic   ; 戻り値は stat
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
#uselib "KERNEL32.dll"
#cfunc global IsSystemResumeAutomatic "IsSystemResumeAutomatic"
; res = IsSystemResumeAutomatic()
; BOOL IsSystemResumeAutomatic()
#uselib "KERNEL32.dll"
#cfunc global IsSystemResumeAutomatic "IsSystemResumeAutomatic"
; res = IsSystemResumeAutomatic()
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	kernel32 = windows.NewLazySystemDLL("KERNEL32.dll")
	procIsSystemResumeAutomatic = kernel32.NewProc("IsSystemResumeAutomatic")
)

r1, _, err := procIsSystemResumeAutomatic.Call()
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // BOOL
function IsSystemResumeAutomatic: BOOL; stdcall;
  external 'KERNEL32.dll' name 'IsSystemResumeAutomatic';
result := DllCall("KERNEL32\IsSystemResumeAutomatic", "Int")
●IsSystemResumeAutomatic() = DLL("KERNEL32.dll", "bool IsSystemResumeAutomatic()")
# 呼び出し: IsSystemResumeAutomatic()
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。