ホーム › System.WinRT › GetRestrictedErrorInfo
GetRestrictedErrorInfo
関数現在のスレッドの制限付きエラー情報を取得する。
シグネチャ
// api-ms-win-core-winrt-error-l1-1-0.dll
#include <windows.h>
HRESULT GetRestrictedErrorInfo(
IRestrictedErrorInfo** ppRestrictedErrorInfo
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| ppRestrictedErrorInfo | IRestrictedErrorInfo** | out |
戻り値の型: HRESULT
各言語での呼び出し定義
// api-ms-win-core-winrt-error-l1-1-0.dll
#include <windows.h>
HRESULT GetRestrictedErrorInfo(
IRestrictedErrorInfo** ppRestrictedErrorInfo
);[DllImport("api-ms-win-core-winrt-error-l1-1-0.dll", ExactSpelling = true)]
static extern int GetRestrictedErrorInfo(
IntPtr ppRestrictedErrorInfo // IRestrictedErrorInfo** out
);<DllImport("api-ms-win-core-winrt-error-l1-1-0.dll", ExactSpelling:=True)>
Public Shared Function GetRestrictedErrorInfo(
ppRestrictedErrorInfo As IntPtr ' IRestrictedErrorInfo** out
) As Integer
End Function' ppRestrictedErrorInfo : IRestrictedErrorInfo** out
Declare PtrSafe Function GetRestrictedErrorInfo Lib "api-ms-win-core-winrt-error-l1-1-0" ( _
ByVal ppRestrictedErrorInfo As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
GetRestrictedErrorInfo = ctypes.windll.LoadLibrary("api-ms-win-core-winrt-error-l1-1-0.dll").GetRestrictedErrorInfo
GetRestrictedErrorInfo.restype = ctypes.c_int
GetRestrictedErrorInfo.argtypes = [
ctypes.c_void_p, # ppRestrictedErrorInfo : IRestrictedErrorInfo** out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('api-ms-win-core-winrt-error-l1-1-0.dll')
GetRestrictedErrorInfo = Fiddle::Function.new(
lib['GetRestrictedErrorInfo'],
[
Fiddle::TYPE_VOIDP, # ppRestrictedErrorInfo : IRestrictedErrorInfo** out
],
Fiddle::TYPE_INT)#[link(name = "api-ms-win-core-winrt-error-l1-1-0")]
extern "system" {
fn GetRestrictedErrorInfo(
ppRestrictedErrorInfo: *mut *mut core::ffi::c_void // IRestrictedErrorInfo** out
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("api-ms-win-core-winrt-error-l1-1-0.dll")]
public static extern int GetRestrictedErrorInfo(IntPtr ppRestrictedErrorInfo);
"@
$api = Add-Type -MemberDefinition $sig -Name 'api-ms-win-core-winrt-error-l1-1-0_GetRestrictedErrorInfo' -Namespace Win32 -PassThru
# $api::GetRestrictedErrorInfo(ppRestrictedErrorInfo)#uselib "api-ms-win-core-winrt-error-l1-1-0.dll"
#func global GetRestrictedErrorInfo "GetRestrictedErrorInfo" sptr
; GetRestrictedErrorInfo ppRestrictedErrorInfo ; 戻り値は stat
; ppRestrictedErrorInfo : IRestrictedErrorInfo** out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "api-ms-win-core-winrt-error-l1-1-0.dll"
#cfunc global GetRestrictedErrorInfo "GetRestrictedErrorInfo" sptr
; res = GetRestrictedErrorInfo(ppRestrictedErrorInfo)
; ppRestrictedErrorInfo : IRestrictedErrorInfo** out -> "sptr"; HRESULT GetRestrictedErrorInfo(IRestrictedErrorInfo** ppRestrictedErrorInfo)
#uselib "api-ms-win-core-winrt-error-l1-1-0.dll"
#cfunc global GetRestrictedErrorInfo "GetRestrictedErrorInfo" intptr
; res = GetRestrictedErrorInfo(ppRestrictedErrorInfo)
; ppRestrictedErrorInfo : IRestrictedErrorInfo** out -> "intptr"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
api_ms_win_core_winrt_error_l1_1_0 = windows.NewLazySystemDLL("api-ms-win-core-winrt-error-l1-1-0.dll")
procGetRestrictedErrorInfo = api_ms_win_core_winrt_error_l1_1_0.NewProc("GetRestrictedErrorInfo")
)
// ppRestrictedErrorInfo (IRestrictedErrorInfo** out)
r1, _, err := procGetRestrictedErrorInfo.Call(
uintptr(ppRestrictedErrorInfo),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // HRESULTfunction GetRestrictedErrorInfo(
ppRestrictedErrorInfo: Pointer // IRestrictedErrorInfo** out
): Integer; stdcall;
external 'api-ms-win-core-winrt-error-l1-1-0.dll' name 'GetRestrictedErrorInfo';result := DllCall("api-ms-win-core-winrt-error-l1-1-0\GetRestrictedErrorInfo"
, "Ptr", ppRestrictedErrorInfo ; IRestrictedErrorInfo** out
, "Int") ; return: HRESULT●GetRestrictedErrorInfo(ppRestrictedErrorInfo) = DLL("api-ms-win-core-winrt-error-l1-1-0.dll", "int GetRestrictedErrorInfo(void*)")
# 呼び出し: GetRestrictedErrorInfo(ppRestrictedErrorInfo)
# ppRestrictedErrorInfo : IRestrictedErrorInfo** out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。