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

NeedRebootInit

関数
再起動要否判定のための初期状態を記録する。
DLLADVPACK.dll呼出規約winapi

シグネチャ

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

DWORD NeedRebootInit(void);

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

各言語での呼び出し定義

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

DWORD NeedRebootInit(void);
[DllImport("ADVPACK.dll", ExactSpelling = true)]
static extern uint NeedRebootInit();
<DllImport("ADVPACK.dll", ExactSpelling:=True)>
Public Shared Function NeedRebootInit() As UInteger
End Function
Declare PtrSafe Function NeedRebootInit Lib "advpack" () As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

NeedRebootInit = ctypes.windll.advpack.NeedRebootInit
NeedRebootInit.restype = wintypes.DWORD
NeedRebootInit.argtypes = []
require 'fiddle'
require 'fiddle/import'

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

var (
	advpack = windows.NewLazySystemDLL("ADVPACK.dll")
	procNeedRebootInit = advpack.NewProc("NeedRebootInit")
)

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