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