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

WEBAUTHN_PLUGIN_ADD_AUTHENTICATOR_OPTIONS

構造体
サイズx64: 72 バイト / x86: 36 バイト

サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。

フィールド

フィールドサイズx64x86説明
pwszAuthenticatorNameLPWSTR8/4+0+0追加する認証器の表示名へのポインタ。
rclsidGUID*8/4+8+4プラグインのCLSIDを示すGUIDへのポインタ。
pwszPluginRpIdLPWSTR8/4+16+8プラグインに関連付くRP IDへのポインタ。
pwszLightThemeLogoSvgLPWSTR8/4+24+12ライトテーマ用ロゴSVGへのポインタ。
pwszDarkThemeLogoSvgLPWSTR8/4+32+16ダークテーマ用ロゴSVGへのポインタ。
cbAuthenticatorInfoDWORD4+40+20認証器情報のバイト数を示す。
pbAuthenticatorInfoBYTE*8/4+48+24CTAP authenticatorInfo(CBOR)データへのポインタ。
cSupportedRpIdsDWORD4+56+28ppwszSupportedRpIds配列の要素数を示す。
ppwszSupportedRpIdsLPWSTR*8/4+64+32サポートするRP ID文字列の配列へのポインタ。

各言語での定義

#include <windows.h>

// WEBAUTHN_PLUGIN_ADD_AUTHENTICATOR_OPTIONS  (x64 72 / x86 36 バイト)
typedef struct WEBAUTHN_PLUGIN_ADD_AUTHENTICATOR_OPTIONS {
    LPWSTR pwszAuthenticatorName;
    GUID* rclsid;
    LPWSTR pwszPluginRpId;
    LPWSTR pwszLightThemeLogoSvg;
    LPWSTR pwszDarkThemeLogoSvg;
    DWORD cbAuthenticatorInfo;
    BYTE* pbAuthenticatorInfo;
    DWORD cSupportedRpIds;
    LPWSTR* ppwszSupportedRpIds;
} WEBAUTHN_PLUGIN_ADD_AUTHENTICATOR_OPTIONS;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct WEBAUTHN_PLUGIN_ADD_AUTHENTICATOR_OPTIONS
{
    public IntPtr pwszAuthenticatorName;
    public IntPtr rclsid;
    public IntPtr pwszPluginRpId;
    public IntPtr pwszLightThemeLogoSvg;
    public IntPtr pwszDarkThemeLogoSvg;
    public uint cbAuthenticatorInfo;
    public IntPtr pbAuthenticatorInfo;
    public uint cSupportedRpIds;
    public IntPtr ppwszSupportedRpIds;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure WEBAUTHN_PLUGIN_ADD_AUTHENTICATOR_OPTIONS
    Public pwszAuthenticatorName As IntPtr
    Public rclsid As IntPtr
    Public pwszPluginRpId As IntPtr
    Public pwszLightThemeLogoSvg As IntPtr
    Public pwszDarkThemeLogoSvg As IntPtr
    Public cbAuthenticatorInfo As UInteger
    Public pbAuthenticatorInfo As IntPtr
    Public cSupportedRpIds As UInteger
    Public ppwszSupportedRpIds As IntPtr
End Structure
import ctypes
from ctypes import wintypes

class WEBAUTHN_PLUGIN_ADD_AUTHENTICATOR_OPTIONS(ctypes.Structure):
    _fields_ = [
        ("pwszAuthenticatorName", ctypes.c_void_p),
        ("rclsid", ctypes.c_void_p),
        ("pwszPluginRpId", ctypes.c_void_p),
        ("pwszLightThemeLogoSvg", ctypes.c_void_p),
        ("pwszDarkThemeLogoSvg", ctypes.c_void_p),
        ("cbAuthenticatorInfo", wintypes.DWORD),
        ("pbAuthenticatorInfo", ctypes.c_void_p),
        ("cSupportedRpIds", wintypes.DWORD),
        ("ppwszSupportedRpIds", ctypes.c_void_p),
    ]
#[repr(C)]
pub struct WEBAUTHN_PLUGIN_ADD_AUTHENTICATOR_OPTIONS {
    pub pwszAuthenticatorName: *mut core::ffi::c_void,
    pub rclsid: *mut core::ffi::c_void,
    pub pwszPluginRpId: *mut core::ffi::c_void,
    pub pwszLightThemeLogoSvg: *mut core::ffi::c_void,
    pub pwszDarkThemeLogoSvg: *mut core::ffi::c_void,
    pub cbAuthenticatorInfo: u32,
    pub pbAuthenticatorInfo: *mut core::ffi::c_void,
    pub cSupportedRpIds: u32,
    pub ppwszSupportedRpIds: *mut core::ffi::c_void,
}
import "golang.org/x/sys/windows"

type WEBAUTHN_PLUGIN_ADD_AUTHENTICATOR_OPTIONS struct {
	pwszAuthenticatorName uintptr
	rclsid uintptr
	pwszPluginRpId uintptr
	pwszLightThemeLogoSvg uintptr
	pwszDarkThemeLogoSvg uintptr
	cbAuthenticatorInfo uint32
	pbAuthenticatorInfo uintptr
	cSupportedRpIds uint32
	ppwszSupportedRpIds uintptr
}
type
  WEBAUTHN_PLUGIN_ADD_AUTHENTICATOR_OPTIONS = record
    pwszAuthenticatorName: Pointer;
    rclsid: Pointer;
    pwszPluginRpId: Pointer;
    pwszLightThemeLogoSvg: Pointer;
    pwszDarkThemeLogoSvg: Pointer;
    cbAuthenticatorInfo: DWORD;
    pbAuthenticatorInfo: Pointer;
    cSupportedRpIds: DWORD;
    ppwszSupportedRpIds: Pointer;
  end;
const WEBAUTHN_PLUGIN_ADD_AUTHENTICATOR_OPTIONS = extern struct {
    pwszAuthenticatorName: ?*anyopaque,
    rclsid: ?*anyopaque,
    pwszPluginRpId: ?*anyopaque,
    pwszLightThemeLogoSvg: ?*anyopaque,
    pwszDarkThemeLogoSvg: ?*anyopaque,
    cbAuthenticatorInfo: u32,
    pbAuthenticatorInfo: ?*anyopaque,
    cSupportedRpIds: u32,
    ppwszSupportedRpIds: ?*anyopaque,
};
type
  WEBAUTHN_PLUGIN_ADD_AUTHENTICATOR_OPTIONS {.bycopy.} = object
    pwszAuthenticatorName: pointer
    rclsid: pointer
    pwszPluginRpId: pointer
    pwszLightThemeLogoSvg: pointer
    pwszDarkThemeLogoSvg: pointer
    cbAuthenticatorInfo: uint32
    pbAuthenticatorInfo: pointer
    cSupportedRpIds: uint32
    ppwszSupportedRpIds: pointer
struct WEBAUTHN_PLUGIN_ADD_AUTHENTICATOR_OPTIONS
{
    void* pwszAuthenticatorName;
    void* rclsid;
    void* pwszPluginRpId;
    void* pwszLightThemeLogoSvg;
    void* pwszDarkThemeLogoSvg;
    uint cbAuthenticatorInfo;
    void* pbAuthenticatorInfo;
    uint cSupportedRpIds;
    void* ppwszSupportedRpIds;
}

HSP用 定義

HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; WEBAUTHN_PLUGIN_ADD_AUTHENTICATOR_OPTIONS サイズ: 36 バイト(x86)
dim st, 9    ; 4byte整数×9(構造体サイズ 36 / 4 切り上げ)
; pwszAuthenticatorName : LPWSTR (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; rclsid : GUID* (+4, 4byte)  varptr(st)+4 を基点に操作(4byte:入れ子/配列)
; pwszPluginRpId : LPWSTR (+8, 4byte)  st.2 = 値  /  値 = st.2   (lpoke/lpeek も可)
; pwszLightThemeLogoSvg : LPWSTR (+12, 4byte)  st.3 = 値  /  値 = st.3   (lpoke/lpeek も可)
; pwszDarkThemeLogoSvg : LPWSTR (+16, 4byte)  st.4 = 値  /  値 = st.4   (lpoke/lpeek も可)
; cbAuthenticatorInfo : DWORD (+20, 4byte)  st.5 = 値  /  値 = st.5   (lpoke/lpeek も可)
; pbAuthenticatorInfo : BYTE* (+24, 4byte)  st.6 = 値  /  値 = st.6   (lpoke/lpeek も可)
; cSupportedRpIds : DWORD (+28, 4byte)  st.7 = 値  /  値 = st.7   (lpoke/lpeek も可)
; ppwszSupportedRpIds : LPWSTR* (+32, 4byte)  st.8 = 値  /  値 = st.8   (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; WEBAUTHN_PLUGIN_ADD_AUTHENTICATOR_OPTIONS サイズ: 72 バイト(x64)
dim st, 18    ; 4byte整数×18(構造体サイズ 72 / 4 切り上げ)
; pwszAuthenticatorName : LPWSTR (+0, 8byte)  qpoke st,0,値 / qpeek(st,0)  ※IronHSPのみ。3.7/3.8は lpoke st,0,下位 : lpoke st,4,上位
; rclsid : GUID* (+8, 8byte)  varptr(st)+8 を基点に操作(8byte:入れ子/配列)
; pwszPluginRpId : LPWSTR (+16, 8byte)  qpoke st,16,値 / qpeek(st,16)  ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; pwszLightThemeLogoSvg : LPWSTR (+24, 8byte)  qpoke st,24,値 / qpeek(st,24)  ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; pwszDarkThemeLogoSvg : LPWSTR (+32, 8byte)  qpoke st,32,値 / qpeek(st,32)  ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; cbAuthenticatorInfo : DWORD (+40, 4byte)  st.10 = 値  /  値 = st.10   (lpoke/lpeek も可)
; pbAuthenticatorInfo : BYTE* (+48, 8byte)  qpoke st,48,値 / qpeek(st,48)  ※IronHSPのみ。3.7/3.8は lpoke st,48,下位 : lpoke st,52,上位
; cSupportedRpIds : DWORD (+56, 4byte)  st.14 = 値  /  値 = st.14   (lpoke/lpeek も可)
; ppwszSupportedRpIds : LPWSTR* (+64, 8byte)  qpoke st,64,値 / qpeek(st,64)  ※IronHSPのみ。3.7/3.8は lpoke st,64,下位 : lpoke st,68,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global WEBAUTHN_PLUGIN_ADD_AUTHENTICATOR_OPTIONS
    #field intptr pwszAuthenticatorName
    #field intptr rclsid
    #field intptr pwszPluginRpId
    #field intptr pwszLightThemeLogoSvg
    #field intptr pwszDarkThemeLogoSvg
    #field int cbAuthenticatorInfo
    #field intptr pbAuthenticatorInfo
    #field int cSupportedRpIds
    #field intptr ppwszSupportedRpIds
#endstruct

stdim st, WEBAUTHN_PLUGIN_ADD_AUTHENTICATOR_OPTIONS        ; NSTRUCT 変数を確保
st->cbAuthenticatorInfo = 100
mes "cbAuthenticatorInfo=" + st->cbAuthenticatorInfo