ホーム › Security.Authentication.WebAuthn › WEBAUTHN_PLUGIN_UPDATE_AUTHENTICATOR_DETAILS
WEBAUTHN_PLUGIN_UPDATE_AUTHENTICATOR_DETAILS
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| pwszAuthenticatorName | LPWSTR | 8/4 | +0 | +0 | 更新する認証器の表示名へのポインタ。 |
| rclsid | GUID* | 8/4 | +8 | +4 | 現在のプラグインCLSIDを示すGUIDへのポインタ。 |
| rclsidNew | GUID* | 8/4 | +16 | +8 | 新しいプラグインCLSIDを示すGUIDへのポインタ。 |
| pwszLightThemeLogoSvg | LPWSTR | 8/4 | +24 | +12 | ライトテーマ用ロゴSVGへのポインタ。 |
| pwszDarkThemeLogoSvg | LPWSTR | 8/4 | +32 | +16 | ダークテーマ用ロゴSVGへのポインタ。 |
| cbAuthenticatorInfo | DWORD | 4 | +40 | +20 | 認証器情報のバイト数を示す。 |
| pbAuthenticatorInfo | BYTE* | 8/4 | +48 | +24 | CTAP authenticatorInfo(CBOR)データへのポインタ。 |
| cSupportedRpIds | DWORD | 4 | +56 | +28 | ppwszSupportedRpIds配列の要素数を示す。 |
| ppwszSupportedRpIds | LPWSTR* | 8/4 | +64 | +32 | サポートするRP ID文字列の配列へのポインタ。 |
各言語での定義
#include <windows.h>
// WEBAUTHN_PLUGIN_UPDATE_AUTHENTICATOR_DETAILS (x64 72 / x86 36 バイト)
typedef struct WEBAUTHN_PLUGIN_UPDATE_AUTHENTICATOR_DETAILS {
LPWSTR pwszAuthenticatorName;
GUID* rclsid;
GUID* rclsidNew;
LPWSTR pwszLightThemeLogoSvg;
LPWSTR pwszDarkThemeLogoSvg;
DWORD cbAuthenticatorInfo;
BYTE* pbAuthenticatorInfo;
DWORD cSupportedRpIds;
LPWSTR* ppwszSupportedRpIds;
} WEBAUTHN_PLUGIN_UPDATE_AUTHENTICATOR_DETAILS;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct WEBAUTHN_PLUGIN_UPDATE_AUTHENTICATOR_DETAILS
{
public IntPtr pwszAuthenticatorName;
public IntPtr rclsid;
public IntPtr rclsidNew;
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_UPDATE_AUTHENTICATOR_DETAILS
Public pwszAuthenticatorName As IntPtr
Public rclsid As IntPtr
Public rclsidNew 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 Structureimport ctypes
from ctypes import wintypes
class WEBAUTHN_PLUGIN_UPDATE_AUTHENTICATOR_DETAILS(ctypes.Structure):
_fields_ = [
("pwszAuthenticatorName", ctypes.c_void_p),
("rclsid", ctypes.c_void_p),
("rclsidNew", 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_UPDATE_AUTHENTICATOR_DETAILS {
pub pwszAuthenticatorName: *mut core::ffi::c_void,
pub rclsid: *mut core::ffi::c_void,
pub rclsidNew: *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_UPDATE_AUTHENTICATOR_DETAILS struct {
pwszAuthenticatorName uintptr
rclsid uintptr
rclsidNew uintptr
pwszLightThemeLogoSvg uintptr
pwszDarkThemeLogoSvg uintptr
cbAuthenticatorInfo uint32
pbAuthenticatorInfo uintptr
cSupportedRpIds uint32
ppwszSupportedRpIds uintptr
}type
WEBAUTHN_PLUGIN_UPDATE_AUTHENTICATOR_DETAILS = record
pwszAuthenticatorName: Pointer;
rclsid: Pointer;
rclsidNew: Pointer;
pwszLightThemeLogoSvg: Pointer;
pwszDarkThemeLogoSvg: Pointer;
cbAuthenticatorInfo: DWORD;
pbAuthenticatorInfo: Pointer;
cSupportedRpIds: DWORD;
ppwszSupportedRpIds: Pointer;
end;const WEBAUTHN_PLUGIN_UPDATE_AUTHENTICATOR_DETAILS = extern struct {
pwszAuthenticatorName: ?*anyopaque,
rclsid: ?*anyopaque,
rclsidNew: ?*anyopaque,
pwszLightThemeLogoSvg: ?*anyopaque,
pwszDarkThemeLogoSvg: ?*anyopaque,
cbAuthenticatorInfo: u32,
pbAuthenticatorInfo: ?*anyopaque,
cSupportedRpIds: u32,
ppwszSupportedRpIds: ?*anyopaque,
};type
WEBAUTHN_PLUGIN_UPDATE_AUTHENTICATOR_DETAILS {.bycopy.} = object
pwszAuthenticatorName: pointer
rclsid: pointer
rclsidNew: pointer
pwszLightThemeLogoSvg: pointer
pwszDarkThemeLogoSvg: pointer
cbAuthenticatorInfo: uint32
pbAuthenticatorInfo: pointer
cSupportedRpIds: uint32
ppwszSupportedRpIds: pointerstruct WEBAUTHN_PLUGIN_UPDATE_AUTHENTICATOR_DETAILS
{
void* pwszAuthenticatorName;
void* rclsid;
void* rclsidNew;
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_UPDATE_AUTHENTICATOR_DETAILS サイズ: 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:入れ子/配列)
; rclsidNew : GUID* (+8, 4byte) varptr(st)+8 を基点に操作(4byte:入れ子/配列)
; 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_UPDATE_AUTHENTICATOR_DETAILS サイズ: 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:入れ子/配列)
; rclsidNew : GUID* (+16, 8byte) varptr(st)+16 を基点に操作(8byte:入れ子/配列)
; 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_UPDATE_AUTHENTICATOR_DETAILS
#field intptr pwszAuthenticatorName
#field intptr rclsid
#field intptr rclsidNew
#field intptr pwszLightThemeLogoSvg
#field intptr pwszDarkThemeLogoSvg
#field int cbAuthenticatorInfo
#field intptr pbAuthenticatorInfo
#field int cSupportedRpIds
#field intptr ppwszSupportedRpIds
#endstruct
stdim st, WEBAUTHN_PLUGIN_UPDATE_AUTHENTICATOR_DETAILS ; NSTRUCT 変数を確保
st->cbAuthenticatorInfo = 100
mes "cbAuthenticatorInfo=" + st->cbAuthenticatorInfo