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

WEBAUTHN_AUTHENTICATOR_DETAILS

構造体
サイズx64: 48 バイト / x86: 28 バイト

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

フィールド

フィールドサイズx64x86説明
dwVersionDWORD4+0+0この構造体のバージョン番号を示す。
cbAuthenticatorIdDWORD4+4+4認証器IDのバイト数を示す。
pbAuthenticatorIdBYTE*8/4+8+8認証器を識別するバイナリIDへのポインタ。
pwszAuthenticatorNameLPWSTR8/4+16+12認証器の表示名へのポインタ。
cbAuthenticatorLogoDWORD4+24+16認証器ロゴ画像のバイト数を示す。
pbAuthenticatorLogoBYTE*8/4+32+20認証器のロゴ画像データへのポインタ。NULL可。
bLockedBOOL4+40+24認証器がロックされているかを示すブール値。

各言語での定義

#include <windows.h>

// WEBAUTHN_AUTHENTICATOR_DETAILS  (x64 48 / x86 28 バイト)
typedef struct WEBAUTHN_AUTHENTICATOR_DETAILS {
    DWORD dwVersion;
    DWORD cbAuthenticatorId;
    BYTE* pbAuthenticatorId;
    LPWSTR pwszAuthenticatorName;
    DWORD cbAuthenticatorLogo;
    BYTE* pbAuthenticatorLogo;
    BOOL bLocked;
} WEBAUTHN_AUTHENTICATOR_DETAILS;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct WEBAUTHN_AUTHENTICATOR_DETAILS
{
    public uint dwVersion;
    public uint cbAuthenticatorId;
    public IntPtr pbAuthenticatorId;
    public IntPtr pwszAuthenticatorName;
    public uint cbAuthenticatorLogo;
    public IntPtr pbAuthenticatorLogo;
    [MarshalAs(UnmanagedType.Bool)] public bool bLocked;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure WEBAUTHN_AUTHENTICATOR_DETAILS
    Public dwVersion As UInteger
    Public cbAuthenticatorId As UInteger
    Public pbAuthenticatorId As IntPtr
    Public pwszAuthenticatorName As IntPtr
    Public cbAuthenticatorLogo As UInteger
    Public pbAuthenticatorLogo As IntPtr
    <MarshalAs(UnmanagedType.Bool)> Public bLocked As Boolean
End Structure
import ctypes
from ctypes import wintypes

class WEBAUTHN_AUTHENTICATOR_DETAILS(ctypes.Structure):
    _fields_ = [
        ("dwVersion", wintypes.DWORD),
        ("cbAuthenticatorId", wintypes.DWORD),
        ("pbAuthenticatorId", ctypes.c_void_p),
        ("pwszAuthenticatorName", ctypes.c_void_p),
        ("cbAuthenticatorLogo", wintypes.DWORD),
        ("pbAuthenticatorLogo", ctypes.c_void_p),
        ("bLocked", wintypes.BOOL),
    ]
#[repr(C)]
pub struct WEBAUTHN_AUTHENTICATOR_DETAILS {
    pub dwVersion: u32,
    pub cbAuthenticatorId: u32,
    pub pbAuthenticatorId: *mut core::ffi::c_void,
    pub pwszAuthenticatorName: *mut core::ffi::c_void,
    pub cbAuthenticatorLogo: u32,
    pub pbAuthenticatorLogo: *mut core::ffi::c_void,
    pub bLocked: i32,
}
import "golang.org/x/sys/windows"

type WEBAUTHN_AUTHENTICATOR_DETAILS struct {
	dwVersion uint32
	cbAuthenticatorId uint32
	pbAuthenticatorId uintptr
	pwszAuthenticatorName uintptr
	cbAuthenticatorLogo uint32
	pbAuthenticatorLogo uintptr
	bLocked int32
}
type
  WEBAUTHN_AUTHENTICATOR_DETAILS = record
    dwVersion: DWORD;
    cbAuthenticatorId: DWORD;
    pbAuthenticatorId: Pointer;
    pwszAuthenticatorName: Pointer;
    cbAuthenticatorLogo: DWORD;
    pbAuthenticatorLogo: Pointer;
    bLocked: BOOL;
  end;
const WEBAUTHN_AUTHENTICATOR_DETAILS = extern struct {
    dwVersion: u32,
    cbAuthenticatorId: u32,
    pbAuthenticatorId: ?*anyopaque,
    pwszAuthenticatorName: ?*anyopaque,
    cbAuthenticatorLogo: u32,
    pbAuthenticatorLogo: ?*anyopaque,
    bLocked: i32,
};
type
  WEBAUTHN_AUTHENTICATOR_DETAILS {.bycopy.} = object
    dwVersion: uint32
    cbAuthenticatorId: uint32
    pbAuthenticatorId: pointer
    pwszAuthenticatorName: pointer
    cbAuthenticatorLogo: uint32
    pbAuthenticatorLogo: pointer
    bLocked: int32
struct WEBAUTHN_AUTHENTICATOR_DETAILS
{
    uint dwVersion;
    uint cbAuthenticatorId;
    void* pbAuthenticatorId;
    void* pwszAuthenticatorName;
    uint cbAuthenticatorLogo;
    void* pbAuthenticatorLogo;
    int bLocked;
}

HSP用 定義

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

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

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