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

IsErrorPropagationEnabled

関数
WinRTのエラー伝播が有効かどうかを判定する。
DLLapi-ms-win-core-winrt-error-l1-1-1.dll呼出規約winapi対応OSwindows8.0

シグネチャ

// api-ms-win-core-winrt-error-l1-1-1.dll
#include <windows.h>

BOOL IsErrorPropagationEnabled(void);

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

各言語での呼び出し定義

// api-ms-win-core-winrt-error-l1-1-1.dll
#include <windows.h>

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

IsErrorPropagationEnabled = ctypes.windll.LoadLibrary("api-ms-win-core-winrt-error-l1-1-1.dll").IsErrorPropagationEnabled
IsErrorPropagationEnabled.restype = wintypes.BOOL
IsErrorPropagationEnabled.argtypes = []
require 'fiddle'
require 'fiddle/import'

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

var (
	api_ms_win_core_winrt_error_l1_1_1 = windows.NewLazySystemDLL("api-ms-win-core-winrt-error-l1-1-1.dll")
	procIsErrorPropagationEnabled = api_ms_win_core_winrt_error_l1_1_1.NewProc("IsErrorPropagationEnabled")
)

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