ホーム › System.Console › SetLastConsoleEventActive
SetLastConsoleEventActive
関数最後のコンソールイベントをアクティブに設定する内部関数。
シグネチャ
// KERNEL32.dll
#include <windows.h>
void SetLastConsoleEventActive(void);パラメーターなし。戻り値: void
各言語での呼び出し定義
// KERNEL32.dll
#include <windows.h>
void SetLastConsoleEventActive(void);[DllImport("KERNEL32.dll", ExactSpelling = true)]
static extern void SetLastConsoleEventActive();<DllImport("KERNEL32.dll", ExactSpelling:=True)>
Public Shared Sub SetLastConsoleEventActive()
End SubDeclare PtrSafe Sub SetLastConsoleEventActive Lib "kernel32" ()
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
SetLastConsoleEventActive = ctypes.windll.kernel32.SetLastConsoleEventActive
SetLastConsoleEventActive.restype = None
SetLastConsoleEventActive.argtypes = []require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('KERNEL32.dll')
SetLastConsoleEventActive = Fiddle::Function.new(
lib['SetLastConsoleEventActive'],
[],
Fiddle::TYPE_VOID)#[link(name = "kernel32")]
extern "system" {
fn SetLastConsoleEventActive();
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("KERNEL32.dll")]
public static extern void SetLastConsoleEventActive();
"@
$api = Add-Type -MemberDefinition $sig -Name 'KERNEL32_SetLastConsoleEventActive' -Namespace Win32 -PassThru
# $api::SetLastConsoleEventActive()#uselib "KERNEL32.dll"
#func global SetLastConsoleEventActive "SetLastConsoleEventActive"
; SetLastConsoleEventActive#uselib "KERNEL32.dll"
#func global SetLastConsoleEventActive "SetLastConsoleEventActive"
; SetLastConsoleEventActive; void SetLastConsoleEventActive()
#uselib "KERNEL32.dll"
#func global SetLastConsoleEventActive "SetLastConsoleEventActive"
; SetLastConsoleEventActiveimport (
"golang.org/x/sys/windows"
"unsafe"
)
var (
kernel32 = windows.NewLazySystemDLL("KERNEL32.dll")
procSetLastConsoleEventActive = kernel32.NewProc("SetLastConsoleEventActive")
)
r1, _, err := procSetLastConsoleEventActive.Call()
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // voidprocedure SetLastConsoleEventActive; stdcall;
external 'KERNEL32.dll' name 'SetLastConsoleEventActive';result := DllCall("KERNEL32\SetLastConsoleEventActive", "Int")●SetLastConsoleEventActive() = DLL("KERNEL32.dll", "int SetLastConsoleEventActive()")
# 呼び出し: SetLastConsoleEventActive()
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。