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

WebAuthNCancelCurrentOperation

関数
実行中のWebAuthn操作をキャンセルする。
DLLwebauthn.dll呼出規約winapi

シグネチャ

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

HRESULT WebAuthNCancelCurrentOperation(
    const GUID* pCancellationId
);

パラメーター

名前方向
pCancellationIdGUID*in

戻り値の型: HRESULT

各言語での呼び出し定義

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

HRESULT WebAuthNCancelCurrentOperation(
    const GUID* pCancellationId
);
[DllImport("webauthn.dll", ExactSpelling = true)]
static extern int WebAuthNCancelCurrentOperation(
    ref Guid pCancellationId   // GUID*
);
<DllImport("webauthn.dll", ExactSpelling:=True)>
Public Shared Function WebAuthNCancelCurrentOperation(
    ByRef pCancellationId As Guid   ' GUID*
) As Integer
End Function
' pCancellationId : GUID*
Declare PtrSafe Function WebAuthNCancelCurrentOperation 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

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

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

var (
	webauthn = windows.NewLazySystemDLL("webauthn.dll")
	procWebAuthNCancelCurrentOperation = webauthn.NewProc("WebAuthNCancelCurrentOperation")
)

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