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

EXPERIMENTAL_WEBAUTHN_CTAPCBOR_AUTHENTICATOR_OPTIONS

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

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

フィールド

フィールドサイズx64x86説明
dwVersionDWORD4+0+0この構造体のバージョン番号を示す。
lUpINT4+4+4ユーザー存在確認(up)オプションの値を示す。
lUvINT4+8+8ユーザー検証(uv)オプションの値を示す。
lRequireResidentKeyINT4+12+12常駐鍵(rk)要求オプションの値を示す。

各言語での定義

#include <windows.h>

// EXPERIMENTAL_WEBAUTHN_CTAPCBOR_AUTHENTICATOR_OPTIONS  (x64 16 / x86 16 バイト)
typedef struct EXPERIMENTAL_WEBAUTHN_CTAPCBOR_AUTHENTICATOR_OPTIONS {
    DWORD dwVersion;
    INT lUp;
    INT lUv;
    INT lRequireResidentKey;
} EXPERIMENTAL_WEBAUTHN_CTAPCBOR_AUTHENTICATOR_OPTIONS;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct EXPERIMENTAL_WEBAUTHN_CTAPCBOR_AUTHENTICATOR_OPTIONS
{
    public uint dwVersion;
    public int lUp;
    public int lUv;
    public int lRequireResidentKey;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure EXPERIMENTAL_WEBAUTHN_CTAPCBOR_AUTHENTICATOR_OPTIONS
    Public dwVersion As UInteger
    Public lUp As Integer
    Public lUv As Integer
    Public lRequireResidentKey As Integer
End Structure
import ctypes
from ctypes import wintypes

class EXPERIMENTAL_WEBAUTHN_CTAPCBOR_AUTHENTICATOR_OPTIONS(ctypes.Structure):
    _fields_ = [
        ("dwVersion", wintypes.DWORD),
        ("lUp", ctypes.c_int),
        ("lUv", ctypes.c_int),
        ("lRequireResidentKey", ctypes.c_int),
    ]
#[repr(C)]
pub struct EXPERIMENTAL_WEBAUTHN_CTAPCBOR_AUTHENTICATOR_OPTIONS {
    pub dwVersion: u32,
    pub lUp: i32,
    pub lUv: i32,
    pub lRequireResidentKey: i32,
}
import "golang.org/x/sys/windows"

type EXPERIMENTAL_WEBAUTHN_CTAPCBOR_AUTHENTICATOR_OPTIONS struct {
	dwVersion uint32
	lUp int32
	lUv int32
	lRequireResidentKey int32
}
type
  EXPERIMENTAL_WEBAUTHN_CTAPCBOR_AUTHENTICATOR_OPTIONS = record
    dwVersion: DWORD;
    lUp: Integer;
    lUv: Integer;
    lRequireResidentKey: Integer;
  end;
const EXPERIMENTAL_WEBAUTHN_CTAPCBOR_AUTHENTICATOR_OPTIONS = extern struct {
    dwVersion: u32,
    lUp: i32,
    lUv: i32,
    lRequireResidentKey: i32,
};
type
  EXPERIMENTAL_WEBAUTHN_CTAPCBOR_AUTHENTICATOR_OPTIONS {.bycopy.} = object
    dwVersion: uint32
    lUp: int32
    lUv: int32
    lRequireResidentKey: int32
struct EXPERIMENTAL_WEBAUTHN_CTAPCBOR_AUTHENTICATOR_OPTIONS
{
    uint dwVersion;
    int lUp;
    int lUv;
    int lRequireResidentKey;
}

HSP用 定義

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

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; EXPERIMENTAL_WEBAUTHN_CTAPCBOR_AUTHENTICATOR_OPTIONS サイズ: 16 バイト(x64)
dim st, 4    ; 4byte整数×4(構造体サイズ 16 / 4 切り上げ)
; dwVersion : DWORD (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; lUp : INT (+4, 4byte)  st.1 = 値  /  値 = st.1   (lpoke/lpeek も可)
; lUv : INT (+8, 4byte)  st.2 = 値  /  値 = st.2   (lpoke/lpeek も可)
; lRequireResidentKey : INT (+12, 4byte)  st.3 = 値  /  値 = st.3   (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global EXPERIMENTAL_WEBAUTHN_CTAPCBOR_AUTHENTICATOR_OPTIONS
    #field int dwVersion
    #field int lUp
    #field int lUv
    #field int lRequireResidentKey
#endstruct

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