Win32 API 日本語リファレンス
ホームSecurity.Authentication.WebAuthn › WebAuthNIsUserVerifyingPlatformAuthenticatorAvailable

WebAuthNIsUserVerifyingPlatformAuthenticatorAvailable

関数
ユーザー検証可能なプラットフォーム認証器が利用可能かを判定する。
DLLwebauthn.dll呼出規約winapi

シグネチャ

// webauthn.dll
#include <windows.h>

HRESULT WebAuthNIsUserVerifyingPlatformAuthenticatorAvailable(
    BOOL* pbIsUserVerifyingPlatformAuthenticatorAvailable
);

パラメーター

名前方向
pbIsUserVerifyingPlatformAuthenticatorAvailableBOOL*out

戻り値の型: HRESULT

各言語での呼び出し定義

// webauthn.dll
#include <windows.h>

HRESULT WebAuthNIsUserVerifyingPlatformAuthenticatorAvailable(
    BOOL* pbIsUserVerifyingPlatformAuthenticatorAvailable
);
[DllImport("webauthn.dll", ExactSpelling = true)]
static extern int WebAuthNIsUserVerifyingPlatformAuthenticatorAvailable(
    out int pbIsUserVerifyingPlatformAuthenticatorAvailable   // BOOL* out
);
<DllImport("webauthn.dll", ExactSpelling:=True)>
Public Shared Function WebAuthNIsUserVerifyingPlatformAuthenticatorAvailable(
    <Out> ByRef pbIsUserVerifyingPlatformAuthenticatorAvailable As Integer   ' BOOL* out
) As Integer
End Function
' pbIsUserVerifyingPlatformAuthenticatorAvailable : BOOL* out
Declare PtrSafe Function WebAuthNIsUserVerifyingPlatformAuthenticatorAvailable Lib "webauthn" ( _
    ByRef pbIsUserVerifyingPlatformAuthenticatorAvailable As Long) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

WebAuthNIsUserVerifyingPlatformAuthenticatorAvailable = ctypes.windll.webauthn.WebAuthNIsUserVerifyingPlatformAuthenticatorAvailable
WebAuthNIsUserVerifyingPlatformAuthenticatorAvailable.restype = ctypes.c_int
WebAuthNIsUserVerifyingPlatformAuthenticatorAvailable.argtypes = [
    ctypes.c_void_p,  # pbIsUserVerifyingPlatformAuthenticatorAvailable : BOOL* out
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('webauthn.dll')
WebAuthNIsUserVerifyingPlatformAuthenticatorAvailable = Fiddle::Function.new(
  lib['WebAuthNIsUserVerifyingPlatformAuthenticatorAvailable'],
  [
    Fiddle::TYPE_VOIDP,  # pbIsUserVerifyingPlatformAuthenticatorAvailable : BOOL* out
  ],
  Fiddle::TYPE_INT)
#[link(name = "webauthn")]
extern "system" {
    fn WebAuthNIsUserVerifyingPlatformAuthenticatorAvailable(
        pbIsUserVerifyingPlatformAuthenticatorAvailable: *mut i32  // BOOL* out
    ) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("webauthn.dll")]
public static extern int WebAuthNIsUserVerifyingPlatformAuthenticatorAvailable(out int pbIsUserVerifyingPlatformAuthenticatorAvailable);
"@
$api = Add-Type -MemberDefinition $sig -Name 'webauthn_WebAuthNIsUserVerifyingPlatformAuthenticatorAvailable' -Namespace Win32 -PassThru
# $api::WebAuthNIsUserVerifyingPlatformAuthenticatorAvailable(pbIsUserVerifyingPlatformAuthenticatorAvailable)
#uselib "webauthn.dll"
#func global WebAuthNIsUserVerifyingPlatformAuthenticatorAvailable "WebAuthNIsUserVerifyingPlatformAuthenticatorAvailable" sptr
; WebAuthNIsUserVerifyingPlatformAuthenticatorAvailable pbIsUserVerifyingPlatformAuthenticatorAvailable   ; 戻り値は stat
; pbIsUserVerifyingPlatformAuthenticatorAvailable : BOOL* out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
#uselib "webauthn.dll"
#cfunc global WebAuthNIsUserVerifyingPlatformAuthenticatorAvailable "WebAuthNIsUserVerifyingPlatformAuthenticatorAvailable" int
; res = WebAuthNIsUserVerifyingPlatformAuthenticatorAvailable(pbIsUserVerifyingPlatformAuthenticatorAvailable)
; pbIsUserVerifyingPlatformAuthenticatorAvailable : BOOL* out -> "int"
; HRESULT WebAuthNIsUserVerifyingPlatformAuthenticatorAvailable(BOOL* pbIsUserVerifyingPlatformAuthenticatorAvailable)
#uselib "webauthn.dll"
#cfunc global WebAuthNIsUserVerifyingPlatformAuthenticatorAvailable "WebAuthNIsUserVerifyingPlatformAuthenticatorAvailable" int
; res = WebAuthNIsUserVerifyingPlatformAuthenticatorAvailable(pbIsUserVerifyingPlatformAuthenticatorAvailable)
; pbIsUserVerifyingPlatformAuthenticatorAvailable : BOOL* out -> "int"
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	webauthn = windows.NewLazySystemDLL("webauthn.dll")
	procWebAuthNIsUserVerifyingPlatformAuthenticatorAvailable = webauthn.NewProc("WebAuthNIsUserVerifyingPlatformAuthenticatorAvailable")
)

// pbIsUserVerifyingPlatformAuthenticatorAvailable (BOOL* out)
r1, _, err := procWebAuthNIsUserVerifyingPlatformAuthenticatorAvailable.Call(
	uintptr(pbIsUserVerifyingPlatformAuthenticatorAvailable),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // HRESULT
function WebAuthNIsUserVerifyingPlatformAuthenticatorAvailable(
  pbIsUserVerifyingPlatformAuthenticatorAvailable: Pointer   // BOOL* out
): Integer; stdcall;
  external 'webauthn.dll' name 'WebAuthNIsUserVerifyingPlatformAuthenticatorAvailable';
result := DllCall("webauthn\WebAuthNIsUserVerifyingPlatformAuthenticatorAvailable"
    , "Ptr", pbIsUserVerifyingPlatformAuthenticatorAvailable   ; BOOL* out
    , "Int")   ; return: HRESULT
●WebAuthNIsUserVerifyingPlatformAuthenticatorAvailable(pbIsUserVerifyingPlatformAuthenticatorAvailable) = DLL("webauthn.dll", "int WebAuthNIsUserVerifyingPlatformAuthenticatorAvailable(void*)")
# 呼び出し: WebAuthNIsUserVerifyingPlatformAuthenticatorAvailable(pbIsUserVerifyingPlatformAuthenticatorAvailable)
# pbIsUserVerifyingPlatformAuthenticatorAvailable : BOOL* out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。