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

WebAuthNGetApiVersionNumber

関数
WebAuthn APIのバージョン番号を取得する。
DLLwebauthn.dll呼出規約winapi

シグネチャ

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

DWORD WebAuthNGetApiVersionNumber(void);

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

各言語での呼び出し定義

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

DWORD WebAuthNGetApiVersionNumber(void);
[DllImport("webauthn.dll", ExactSpelling = true)]
static extern uint WebAuthNGetApiVersionNumber();
<DllImport("webauthn.dll", ExactSpelling:=True)>
Public Shared Function WebAuthNGetApiVersionNumber() As UInteger
End Function
Declare PtrSafe Function WebAuthNGetApiVersionNumber Lib "webauthn" () As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

WebAuthNGetApiVersionNumber = ctypes.windll.webauthn.WebAuthNGetApiVersionNumber
WebAuthNGetApiVersionNumber.restype = wintypes.DWORD
WebAuthNGetApiVersionNumber.argtypes = []
require 'fiddle'
require 'fiddle/import'

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

var (
	webauthn = windows.NewLazySystemDLL("webauthn.dll")
	procWebAuthNGetApiVersionNumber = webauthn.NewProc("WebAuthNGetApiVersionNumber")
)

r1, _, err := procWebAuthNGetApiVersionNumber.Call()
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // DWORD
function WebAuthNGetApiVersionNumber: DWORD; stdcall;
  external 'webauthn.dll' name 'WebAuthNGetApiVersionNumber';
result := DllCall("webauthn\WebAuthNGetApiVersionNumber", "UInt")
●WebAuthNGetApiVersionNumber() = DLL("webauthn.dll", "dword WebAuthNGetApiVersionNumber()")
# 呼び出し: WebAuthNGetApiVersionNumber()
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。