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

WebAuthNGetCancellationId

関数
WebAuthn操作のキャンセル用IDを取得する。
DLLwebauthn.dll呼出規約winapi

シグネチャ

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

HRESULT WebAuthNGetCancellationId(
    GUID* pCancellationId
);

パラメーター

名前方向
pCancellationIdGUID*out

戻り値の型: HRESULT

各言語での呼び出し定義

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

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

WebAuthNGetCancellationId = ctypes.windll.webauthn.WebAuthNGetCancellationId
WebAuthNGetCancellationId.restype = ctypes.c_int
WebAuthNGetCancellationId.argtypes = [
    ctypes.c_void_p,  # pCancellationId : GUID* out
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('webauthn.dll')
WebAuthNGetCancellationId = Fiddle::Function.new(
  lib['WebAuthNGetCancellationId'],
  [
    Fiddle::TYPE_VOIDP,  # pCancellationId : GUID* out
  ],
  Fiddle::TYPE_INT)
#[link(name = "webauthn")]
extern "system" {
    fn WebAuthNGetCancellationId(
        pCancellationId: *mut GUID  // GUID* out
    ) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("webauthn.dll")]
public static extern int WebAuthNGetCancellationId(out Guid pCancellationId);
"@
$api = Add-Type -MemberDefinition $sig -Name 'webauthn_WebAuthNGetCancellationId' -Namespace Win32 -PassThru
# $api::WebAuthNGetCancellationId(pCancellationId)
#uselib "webauthn.dll"
#func global WebAuthNGetCancellationId "WebAuthNGetCancellationId" sptr
; WebAuthNGetCancellationId varptr(pCancellationId)   ; 戻り値は stat
; pCancellationId : GUID* out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
出力引数:
#uselib "webauthn.dll"
#cfunc global WebAuthNGetCancellationId "WebAuthNGetCancellationId" var
; res = WebAuthNGetCancellationId(pCancellationId)
; pCancellationId : GUID* out -> "var"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
出力引数:
; HRESULT WebAuthNGetCancellationId(GUID* pCancellationId)
#uselib "webauthn.dll"
#cfunc global WebAuthNGetCancellationId "WebAuthNGetCancellationId" var
; res = WebAuthNGetCancellationId(pCancellationId)
; pCancellationId : GUID* out -> "var"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	webauthn = windows.NewLazySystemDLL("webauthn.dll")
	procWebAuthNGetCancellationId = webauthn.NewProc("WebAuthNGetCancellationId")
)

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