Win32 API 日本語リファレンス
ホームDevices.BiometricFramework › WINBIO_EXTENDED_ENROLLMENT_STATUS

WINBIO_EXTENDED_ENROLLMENT_STATUS

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

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

フィールド

フィールドサイズx64x86説明
TemplateStatusHRESULT4+0+0登録テンプレートの作成状態を示すHRESULT。
RejectDetailDWORD4+4+4サンプル拒否時の詳細理由コード。
PercentCompleteDWORD4+8+8登録の完了割合(パーセント)。
FactorDWORD4+12+12登録対象の生体要素の種別を示す値。
SubFactorBYTE1+16+16生体要素のサブタイプを示すバイト値。
Specific_Specific_e__Union8/4+24+20生体要素種別に固有の登録状態情報を保持する無名共用体。

共用体: _Specific_e__Union x64 8B / x86 4B

フィールドサイズx64x86
NullDWORD4+0+0
FacialFeatures_FacialFeatures_e__Struct8/4+0+0
Fingerprint_Fingerprint_e__Struct8/4+0+0
Iris_Iris_e__Struct8/4+0+0
Voice_Voice_e__Struct8/4+0+0

各言語での定義

#include <windows.h>

// WINBIO_EXTENDED_ENROLLMENT_STATUS  (x64 32 / x86 24 バイト)
typedef struct WINBIO_EXTENDED_ENROLLMENT_STATUS {
    HRESULT TemplateStatus;
    DWORD RejectDetail;
    DWORD PercentComplete;
    DWORD Factor;
    BYTE SubFactor;
    _Specific_e__Union Specific;
} WINBIO_EXTENDED_ENROLLMENT_STATUS;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct WINBIO_EXTENDED_ENROLLMENT_STATUS
{
    public int TemplateStatus;
    public uint RejectDetail;
    public uint PercentComplete;
    public uint Factor;
    public byte SubFactor;
    public _Specific_e__Union Specific;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure WINBIO_EXTENDED_ENROLLMENT_STATUS
    Public TemplateStatus As Integer
    Public RejectDetail As UInteger
    Public PercentComplete As UInteger
    Public Factor As UInteger
    Public SubFactor As Byte
    Public Specific As _Specific_e__Union
End Structure
import ctypes
from ctypes import wintypes

class WINBIO_EXTENDED_ENROLLMENT_STATUS(ctypes.Structure):
    _fields_ = [
        ("TemplateStatus", ctypes.c_int),
        ("RejectDetail", wintypes.DWORD),
        ("PercentComplete", wintypes.DWORD),
        ("Factor", wintypes.DWORD),
        ("SubFactor", ctypes.c_ubyte),
        ("Specific", _Specific_e__Union),
    ]
#[repr(C)]
pub struct WINBIO_EXTENDED_ENROLLMENT_STATUS {
    pub TemplateStatus: i32,
    pub RejectDetail: u32,
    pub PercentComplete: u32,
    pub Factor: u32,
    pub SubFactor: u8,
    pub Specific: _Specific_e__Union,
}
import "golang.org/x/sys/windows"

type WINBIO_EXTENDED_ENROLLMENT_STATUS struct {
	TemplateStatus int32
	RejectDetail uint32
	PercentComplete uint32
	Factor uint32
	SubFactor byte
	Specific _Specific_e__Union
}
type
  WINBIO_EXTENDED_ENROLLMENT_STATUS = record
    TemplateStatus: Integer;
    RejectDetail: DWORD;
    PercentComplete: DWORD;
    Factor: DWORD;
    SubFactor: Byte;
    Specific: _Specific_e__Union;
  end;
const WINBIO_EXTENDED_ENROLLMENT_STATUS = extern struct {
    TemplateStatus: i32,
    RejectDetail: u32,
    PercentComplete: u32,
    Factor: u32,
    SubFactor: u8,
    Specific: _Specific_e__Union,
};
type
  WINBIO_EXTENDED_ENROLLMENT_STATUS {.bycopy.} = object
    TemplateStatus: int32
    RejectDetail: uint32
    PercentComplete: uint32
    Factor: uint32
    SubFactor: uint8
    Specific: _Specific_e__Union
struct WINBIO_EXTENDED_ENROLLMENT_STATUS
{
    int TemplateStatus;
    uint RejectDetail;
    uint PercentComplete;
    uint Factor;
    ubyte SubFactor;
    _Specific_e__Union Specific;
}

HSP用 定義

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

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

stdim st, WINBIO_EXTENDED_ENROLLMENT_STATUS        ; NSTRUCT 変数を確保
st->TemplateStatus = 100
mes "TemplateStatus=" + st->TemplateStatus
; ※union フィールドは byte 列で確保(NSTRUCT は union 非対応)。必要に応じ手動でアクセス。