ホーム › Security.Authentication.WebAuthn › EXPERIMENTAL_WEBAUTHN_PLUGIN_ADD_AUTHENTICATOR_OPTIONS
EXPERIMENTAL_WEBAUTHN_PLUGIN_ADD_AUTHENTICATOR_OPTIONS
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| pwszAuthenticatorName | LPWSTR | 8/4 | +0 | +0 | 追加する認証器の表示名へのポインタ。 |
| pwszPluginClsId | LPWSTR | 8/4 | +8 | +4 | プラグインのCLSID文字列へのポインタ。 |
| pwszPluginRpId | LPWSTR | 8/4 | +16 | +8 | プラグインに関連付くRP IDへのポインタ。 |
| pwszLightThemeLogo | LPWSTR | 8/4 | +24 | +12 | ライトテーマ用ロゴ画像のパス/URLへのポインタ。 |
| pwszDarkThemeLogo | LPWSTR | 8/4 | +32 | +16 | ダークテーマ用ロゴ画像のパス/URLへのポインタ。 |
| cbAuthenticatorInfo | DWORD | 4 | +40 | +20 | 認証器情報のバイト数を示す。 |
| pbAuthenticatorInfo | BYTE* | 8/4 | +48 | +24 | CTAP authenticatorInfo(CBOR)データへのポインタ。 |
各言語での定義
#include <windows.h>
// EXPERIMENTAL_WEBAUTHN_PLUGIN_ADD_AUTHENTICATOR_OPTIONS (x64 56 / x86 28 バイト)
typedef struct EXPERIMENTAL_WEBAUTHN_PLUGIN_ADD_AUTHENTICATOR_OPTIONS {
LPWSTR pwszAuthenticatorName;
LPWSTR pwszPluginClsId;
LPWSTR pwszPluginRpId;
LPWSTR pwszLightThemeLogo;
LPWSTR pwszDarkThemeLogo;
DWORD cbAuthenticatorInfo;
BYTE* pbAuthenticatorInfo;
} EXPERIMENTAL_WEBAUTHN_PLUGIN_ADD_AUTHENTICATOR_OPTIONS;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct EXPERIMENTAL_WEBAUTHN_PLUGIN_ADD_AUTHENTICATOR_OPTIONS
{
public IntPtr pwszAuthenticatorName;
public IntPtr pwszPluginClsId;
public IntPtr pwszPluginRpId;
public IntPtr pwszLightThemeLogo;
public IntPtr pwszDarkThemeLogo;
public uint cbAuthenticatorInfo;
public IntPtr pbAuthenticatorInfo;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure EXPERIMENTAL_WEBAUTHN_PLUGIN_ADD_AUTHENTICATOR_OPTIONS
Public pwszAuthenticatorName As IntPtr
Public pwszPluginClsId As IntPtr
Public pwszPluginRpId As IntPtr
Public pwszLightThemeLogo As IntPtr
Public pwszDarkThemeLogo As IntPtr
Public cbAuthenticatorInfo As UInteger
Public pbAuthenticatorInfo As IntPtr
End Structureimport ctypes
from ctypes import wintypes
class EXPERIMENTAL_WEBAUTHN_PLUGIN_ADD_AUTHENTICATOR_OPTIONS(ctypes.Structure):
_fields_ = [
("pwszAuthenticatorName", ctypes.c_void_p),
("pwszPluginClsId", ctypes.c_void_p),
("pwszPluginRpId", ctypes.c_void_p),
("pwszLightThemeLogo", ctypes.c_void_p),
("pwszDarkThemeLogo", ctypes.c_void_p),
("cbAuthenticatorInfo", wintypes.DWORD),
("pbAuthenticatorInfo", ctypes.c_void_p),
]#[repr(C)]
pub struct EXPERIMENTAL_WEBAUTHN_PLUGIN_ADD_AUTHENTICATOR_OPTIONS {
pub pwszAuthenticatorName: *mut core::ffi::c_void,
pub pwszPluginClsId: *mut core::ffi::c_void,
pub pwszPluginRpId: *mut core::ffi::c_void,
pub pwszLightThemeLogo: *mut core::ffi::c_void,
pub pwszDarkThemeLogo: *mut core::ffi::c_void,
pub cbAuthenticatorInfo: u32,
pub pbAuthenticatorInfo: *mut core::ffi::c_void,
}import "golang.org/x/sys/windows"
type EXPERIMENTAL_WEBAUTHN_PLUGIN_ADD_AUTHENTICATOR_OPTIONS struct {
pwszAuthenticatorName uintptr
pwszPluginClsId uintptr
pwszPluginRpId uintptr
pwszLightThemeLogo uintptr
pwszDarkThemeLogo uintptr
cbAuthenticatorInfo uint32
pbAuthenticatorInfo uintptr
}type
EXPERIMENTAL_WEBAUTHN_PLUGIN_ADD_AUTHENTICATOR_OPTIONS = record
pwszAuthenticatorName: Pointer;
pwszPluginClsId: Pointer;
pwszPluginRpId: Pointer;
pwszLightThemeLogo: Pointer;
pwszDarkThemeLogo: Pointer;
cbAuthenticatorInfo: DWORD;
pbAuthenticatorInfo: Pointer;
end;const EXPERIMENTAL_WEBAUTHN_PLUGIN_ADD_AUTHENTICATOR_OPTIONS = extern struct {
pwszAuthenticatorName: ?*anyopaque,
pwszPluginClsId: ?*anyopaque,
pwszPluginRpId: ?*anyopaque,
pwszLightThemeLogo: ?*anyopaque,
pwszDarkThemeLogo: ?*anyopaque,
cbAuthenticatorInfo: u32,
pbAuthenticatorInfo: ?*anyopaque,
};type
EXPERIMENTAL_WEBAUTHN_PLUGIN_ADD_AUTHENTICATOR_OPTIONS {.bycopy.} = object
pwszAuthenticatorName: pointer
pwszPluginClsId: pointer
pwszPluginRpId: pointer
pwszLightThemeLogo: pointer
pwszDarkThemeLogo: pointer
cbAuthenticatorInfo: uint32
pbAuthenticatorInfo: pointerstruct EXPERIMENTAL_WEBAUTHN_PLUGIN_ADD_AUTHENTICATOR_OPTIONS
{
void* pwszAuthenticatorName;
void* pwszPluginClsId;
void* pwszPluginRpId;
void* pwszLightThemeLogo;
void* pwszDarkThemeLogo;
uint cbAuthenticatorInfo;
void* pbAuthenticatorInfo;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; EXPERIMENTAL_WEBAUTHN_PLUGIN_ADD_AUTHENTICATOR_OPTIONS サイズ: 28 バイト(x86)
dim st, 7 ; 4byte整数×7(構造体サイズ 28 / 4 切り上げ)
; pwszAuthenticatorName : LPWSTR (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; pwszPluginClsId : LPWSTR (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; pwszPluginRpId : LPWSTR (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; pwszLightThemeLogo : LPWSTR (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; pwszDarkThemeLogo : 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 も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; EXPERIMENTAL_WEBAUTHN_PLUGIN_ADD_AUTHENTICATOR_OPTIONS サイズ: 56 バイト(x64)
dim st, 14 ; 4byte整数×14(構造体サイズ 56 / 4 切り上げ)
; pwszAuthenticatorName : LPWSTR (+0, 8byte) qpoke st,0,値 / qpeek(st,0) ※IronHSPのみ。3.7/3.8は lpoke st,0,下位 : lpoke st,4,上位
; pwszPluginClsId : LPWSTR (+8, 8byte) qpoke st,8,値 / qpeek(st,8) ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; pwszPluginRpId : LPWSTR (+16, 8byte) qpoke st,16,値 / qpeek(st,16) ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; pwszLightThemeLogo : LPWSTR (+24, 8byte) qpoke st,24,値 / qpeek(st,24) ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; pwszDarkThemeLogo : 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,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global EXPERIMENTAL_WEBAUTHN_PLUGIN_ADD_AUTHENTICATOR_OPTIONS
#field intptr pwszAuthenticatorName
#field intptr pwszPluginClsId
#field intptr pwszPluginRpId
#field intptr pwszLightThemeLogo
#field intptr pwszDarkThemeLogo
#field int cbAuthenticatorInfo
#field intptr pbAuthenticatorInfo
#endstruct
stdim st, EXPERIMENTAL_WEBAUTHN_PLUGIN_ADD_AUTHENTICATOR_OPTIONS ; NSTRUCT 変数を確保
st->cbAuthenticatorInfo = 100
mes "cbAuthenticatorInfo=" + st->cbAuthenticatorInfo