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

WEBAUTHN_CREDENTIAL_DETAILS

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

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

フィールド

フィールドサイズx64x86説明
dwVersionDWORD4+0+0この構造体のバージョン番号を示す。
cbCredentialIDDWORD4+4+4資格情報IDのバイト数を示す。
pbCredentialIDBYTE*8/4+8+8資格情報を識別するバイナリIDへのポインタ。
pRpInformationWEBAUTHN_RP_ENTITY_INFORMATION*8/4+16+12関連する信頼当事者(RP)情報へのポインタ。
pUserInformationWEBAUTHN_USER_ENTITY_INFORMATION*8/4+24+16関連するユーザー情報へのポインタ。
bRemovableBOOL4+32+20この資格情報が削除可能かを示すブール値。
bBackedUpBOOL4+36+24この資格情報がバックアップ済みかを示すブール値。
pwszAuthenticatorNameLPWSTR8/4+40+28資格情報を保持する認証器の表示名へのポインタ。
cbAuthenticatorLogoDWORD4+48+32認証器ロゴ画像のバイト数を示す。
pbAuthenticatorLogoBYTE*8/4+56+36認証器のロゴ画像データへのポインタ。NULL可。
bThirdPartyPaymentBOOL4+64+40サードパーティ決済に使用可能かを示すブール値。
dwTransportsDWORD4+68+44資格情報が利用可能なトランスポートを示すビットマスク。

各言語での定義

#include <windows.h>

// WEBAUTHN_CREDENTIAL_DETAILS  (x64 72 / x86 48 バイト)
typedef struct WEBAUTHN_CREDENTIAL_DETAILS {
    DWORD dwVersion;
    DWORD cbCredentialID;
    BYTE* pbCredentialID;
    WEBAUTHN_RP_ENTITY_INFORMATION* pRpInformation;
    WEBAUTHN_USER_ENTITY_INFORMATION* pUserInformation;
    BOOL bRemovable;
    BOOL bBackedUp;
    LPWSTR pwszAuthenticatorName;
    DWORD cbAuthenticatorLogo;
    BYTE* pbAuthenticatorLogo;
    BOOL bThirdPartyPayment;
    DWORD dwTransports;
} WEBAUTHN_CREDENTIAL_DETAILS;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct WEBAUTHN_CREDENTIAL_DETAILS
{
    public uint dwVersion;
    public uint cbCredentialID;
    public IntPtr pbCredentialID;
    public IntPtr pRpInformation;
    public IntPtr pUserInformation;
    [MarshalAs(UnmanagedType.Bool)] public bool bRemovable;
    [MarshalAs(UnmanagedType.Bool)] public bool bBackedUp;
    public IntPtr pwszAuthenticatorName;
    public uint cbAuthenticatorLogo;
    public IntPtr pbAuthenticatorLogo;
    [MarshalAs(UnmanagedType.Bool)] public bool bThirdPartyPayment;
    public uint dwTransports;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure WEBAUTHN_CREDENTIAL_DETAILS
    Public dwVersion As UInteger
    Public cbCredentialID As UInteger
    Public pbCredentialID As IntPtr
    Public pRpInformation As IntPtr
    Public pUserInformation As IntPtr
    <MarshalAs(UnmanagedType.Bool)> Public bRemovable As Boolean
    <MarshalAs(UnmanagedType.Bool)> Public bBackedUp As Boolean
    Public pwszAuthenticatorName As IntPtr
    Public cbAuthenticatorLogo As UInteger
    Public pbAuthenticatorLogo As IntPtr
    <MarshalAs(UnmanagedType.Bool)> Public bThirdPartyPayment As Boolean
    Public dwTransports As UInteger
End Structure
import ctypes
from ctypes import wintypes

class WEBAUTHN_CREDENTIAL_DETAILS(ctypes.Structure):
    _fields_ = [
        ("dwVersion", wintypes.DWORD),
        ("cbCredentialID", wintypes.DWORD),
        ("pbCredentialID", ctypes.c_void_p),
        ("pRpInformation", ctypes.c_void_p),
        ("pUserInformation", ctypes.c_void_p),
        ("bRemovable", wintypes.BOOL),
        ("bBackedUp", wintypes.BOOL),
        ("pwszAuthenticatorName", ctypes.c_void_p),
        ("cbAuthenticatorLogo", wintypes.DWORD),
        ("pbAuthenticatorLogo", ctypes.c_void_p),
        ("bThirdPartyPayment", wintypes.BOOL),
        ("dwTransports", wintypes.DWORD),
    ]
#[repr(C)]
pub struct WEBAUTHN_CREDENTIAL_DETAILS {
    pub dwVersion: u32,
    pub cbCredentialID: u32,
    pub pbCredentialID: *mut core::ffi::c_void,
    pub pRpInformation: *mut core::ffi::c_void,
    pub pUserInformation: *mut core::ffi::c_void,
    pub bRemovable: i32,
    pub bBackedUp: i32,
    pub pwszAuthenticatorName: *mut core::ffi::c_void,
    pub cbAuthenticatorLogo: u32,
    pub pbAuthenticatorLogo: *mut core::ffi::c_void,
    pub bThirdPartyPayment: i32,
    pub dwTransports: u32,
}
import "golang.org/x/sys/windows"

type WEBAUTHN_CREDENTIAL_DETAILS struct {
	dwVersion uint32
	cbCredentialID uint32
	pbCredentialID uintptr
	pRpInformation uintptr
	pUserInformation uintptr
	bRemovable int32
	bBackedUp int32
	pwszAuthenticatorName uintptr
	cbAuthenticatorLogo uint32
	pbAuthenticatorLogo uintptr
	bThirdPartyPayment int32
	dwTransports uint32
}
type
  WEBAUTHN_CREDENTIAL_DETAILS = record
    dwVersion: DWORD;
    cbCredentialID: DWORD;
    pbCredentialID: Pointer;
    pRpInformation: Pointer;
    pUserInformation: Pointer;
    bRemovable: BOOL;
    bBackedUp: BOOL;
    pwszAuthenticatorName: Pointer;
    cbAuthenticatorLogo: DWORD;
    pbAuthenticatorLogo: Pointer;
    bThirdPartyPayment: BOOL;
    dwTransports: DWORD;
  end;
const WEBAUTHN_CREDENTIAL_DETAILS = extern struct {
    dwVersion: u32,
    cbCredentialID: u32,
    pbCredentialID: ?*anyopaque,
    pRpInformation: ?*anyopaque,
    pUserInformation: ?*anyopaque,
    bRemovable: i32,
    bBackedUp: i32,
    pwszAuthenticatorName: ?*anyopaque,
    cbAuthenticatorLogo: u32,
    pbAuthenticatorLogo: ?*anyopaque,
    bThirdPartyPayment: i32,
    dwTransports: u32,
};
type
  WEBAUTHN_CREDENTIAL_DETAILS {.bycopy.} = object
    dwVersion: uint32
    cbCredentialID: uint32
    pbCredentialID: pointer
    pRpInformation: pointer
    pUserInformation: pointer
    bRemovable: int32
    bBackedUp: int32
    pwszAuthenticatorName: pointer
    cbAuthenticatorLogo: uint32
    pbAuthenticatorLogo: pointer
    bThirdPartyPayment: int32
    dwTransports: uint32
struct WEBAUTHN_CREDENTIAL_DETAILS
{
    uint dwVersion;
    uint cbCredentialID;
    void* pbCredentialID;
    void* pRpInformation;
    void* pUserInformation;
    int bRemovable;
    int bBackedUp;
    void* pwszAuthenticatorName;
    uint cbAuthenticatorLogo;
    void* pbAuthenticatorLogo;
    int bThirdPartyPayment;
    uint dwTransports;
}

HSP用 定義

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

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

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