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