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

WINBIO_ASYNC_RESULT

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

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

フィールド

フィールドサイズx64x86説明
SessionHandleDWORD4+0+0操作を発行した生体セッションのハンドル。
OperationDWORD4+4+4完了した非同期操作の種別を示す値。
SequenceNumberULONGLONG8+8+8操作を識別する連番(64ビット)。
TimeStampLONGLONG8+16+16結果が生成された時刻のタイムスタンプ(64ビット)。
ApiStatusHRESULT4+24+24非同期操作全体の結果を示すHRESULT。
UnitIdDWORD4+28+28操作を実行した生体ユニットの番号。
UserDatavoid*8/4+32+32呼び出し時に渡したユーザ定義データへのポインタ。NULL可。
Parameters_Parameters_e__Union8/4+40+36操作種別に応じた結果パラメータを保持する無名共用体。

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

フィールドサイズx64x86
Verify_Verify_e__Struct8/4+0+0
Identify_Identify_e__Struct8/4+0+0
EnrollBegin_EnrollBegin_e__Struct8/4+0+0
EnrollCapture_EnrollCapture_e__Struct8/4+0+0
EnrollCommit_EnrollCommit_e__Struct8/4+0+0
EnumEnrollments_EnumEnrollments_e__Struct8/4+0+0
CaptureSample_CaptureSample_e__Struct8/4+0+0
DeleteTemplate_DeleteTemplate_e__Struct8/4+0+0
GetProperty_GetProperty_e__Struct8/4+0+0
SetProperty_SetProperty_e__Struct8/4+0+0
GetEvent_GetEvent_e__Struct8/4+0+0
ControlUnit_ControlUnit_e__Struct8/4+0+0
EnumServiceProviders_EnumServiceProviders_e__Struct8/4+0+0
EnumBiometricUnits_EnumBiometricUnits_e__Struct8/4+0+0
EnumDatabases_EnumDatabases_e__Struct8/4+0+0
VerifyAndReleaseTicket_VerifyAndReleaseTicket_e__Struct8/4+0+0
IdentifyAndReleaseTicket_IdentifyAndReleaseTicket_e__Struct8/4+0+0
EnrollSelect_EnrollSelect_e__Struct8/4+0+0
MonitorPresence_MonitorPresence_e__Struct8/4+0+0
GetProtectionPolicy_GetProtectionPolicy_e__Struct8/4+0+0
NotifyUnitStatusChange_NotifyUnitStatusChange_e__Struct8/4+0+0

各言語での定義

#include <windows.h>

// WINBIO_ASYNC_RESULT  (x64 48 / x86 40 バイト)
typedef struct WINBIO_ASYNC_RESULT {
    DWORD SessionHandle;
    DWORD Operation;
    ULONGLONG SequenceNumber;
    LONGLONG TimeStamp;
    HRESULT ApiStatus;
    DWORD UnitId;
    void* UserData;
    _Parameters_e__Union Parameters;
} WINBIO_ASYNC_RESULT;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct WINBIO_ASYNC_RESULT
{
    public uint SessionHandle;
    public uint Operation;
    public ulong SequenceNumber;
    public long TimeStamp;
    public int ApiStatus;
    public uint UnitId;
    public IntPtr UserData;
    public _Parameters_e__Union Parameters;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure WINBIO_ASYNC_RESULT
    Public SessionHandle As UInteger
    Public Operation As UInteger
    Public SequenceNumber As ULong
    Public TimeStamp As Long
    Public ApiStatus As Integer
    Public UnitId As UInteger
    Public UserData As IntPtr
    Public Parameters As _Parameters_e__Union
End Structure
import ctypes
from ctypes import wintypes

class WINBIO_ASYNC_RESULT(ctypes.Structure):
    _fields_ = [
        ("SessionHandle", wintypes.DWORD),
        ("Operation", wintypes.DWORD),
        ("SequenceNumber", ctypes.c_ulonglong),
        ("TimeStamp", ctypes.c_longlong),
        ("ApiStatus", ctypes.c_int),
        ("UnitId", wintypes.DWORD),
        ("UserData", ctypes.c_void_p),
        ("Parameters", _Parameters_e__Union),
    ]
#[repr(C)]
pub struct WINBIO_ASYNC_RESULT {
    pub SessionHandle: u32,
    pub Operation: u32,
    pub SequenceNumber: u64,
    pub TimeStamp: i64,
    pub ApiStatus: i32,
    pub UnitId: u32,
    pub UserData: *mut core::ffi::c_void,
    pub Parameters: _Parameters_e__Union,
}
import "golang.org/x/sys/windows"

type WINBIO_ASYNC_RESULT struct {
	SessionHandle uint32
	Operation uint32
	SequenceNumber uint64
	TimeStamp int64
	ApiStatus int32
	UnitId uint32
	UserData uintptr
	Parameters _Parameters_e__Union
}
type
  WINBIO_ASYNC_RESULT = record
    SessionHandle: DWORD;
    Operation: DWORD;
    SequenceNumber: UInt64;
    TimeStamp: Int64;
    ApiStatus: Integer;
    UnitId: DWORD;
    UserData: Pointer;
    Parameters: _Parameters_e__Union;
  end;
const WINBIO_ASYNC_RESULT = extern struct {
    SessionHandle: u32,
    Operation: u32,
    SequenceNumber: u64,
    TimeStamp: i64,
    ApiStatus: i32,
    UnitId: u32,
    UserData: ?*anyopaque,
    Parameters: _Parameters_e__Union,
};
type
  WINBIO_ASYNC_RESULT {.bycopy.} = object
    SessionHandle: uint32
    Operation: uint32
    SequenceNumber: uint64
    TimeStamp: int64
    ApiStatus: int32
    UnitId: uint32
    UserData: pointer
    Parameters: _Parameters_e__Union
struct WINBIO_ASYNC_RESULT
{
    uint SessionHandle;
    uint Operation;
    ulong SequenceNumber;
    long TimeStamp;
    int ApiStatus;
    uint UnitId;
    void* UserData;
    _Parameters_e__Union Parameters;
}

HSP用 定義

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

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; WINBIO_ASYNC_RESULT サイズ: 40 バイト(x86)
dim st, 10    ; 4byte整数×10(構造体サイズ 40 / 4 切り上げ)
; SessionHandle : DWORD (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; Operation : DWORD (+4, 4byte)  st.1 = 値  /  値 = st.1   (lpoke/lpeek も可)
; SequenceNumber : ULONGLONG (+8, 8byte)  qpoke st,8,値 / qpeek(st,8)  ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; TimeStamp : LONGLONG (+16, 8byte)  qpoke st,16,値 / qpeek(st,16)  ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; ApiStatus : HRESULT (+24, 4byte)  st.6 = 値  /  値 = st.6   (lpoke/lpeek も可)
; UnitId : DWORD (+28, 4byte)  st.7 = 値  /  値 = st.7   (lpoke/lpeek も可)
; UserData : void* (+32, 4byte)  st.8 = 値  /  値 = st.8   (lpoke/lpeek も可)
; Parameters : _Parameters_e__Union (+36, 4byte)  varptr(st)+36 を基点に操作(4byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; WINBIO_ASYNC_RESULT サイズ: 48 バイト(x64)
dim st, 12    ; 4byte整数×12(構造体サイズ 48 / 4 切り上げ)
; SessionHandle : DWORD (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; Operation : DWORD (+4, 4byte)  st.1 = 値  /  値 = st.1   (lpoke/lpeek も可)
; SequenceNumber : ULONGLONG (+8, 8byte)  qpoke st,8,値 / qpeek(st,8)  ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; TimeStamp : LONGLONG (+16, 8byte)  qpoke st,16,値 / qpeek(st,16)  ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; ApiStatus : HRESULT (+24, 4byte)  st.6 = 値  /  値 = st.6   (lpoke/lpeek も可)
; UnitId : DWORD (+28, 4byte)  st.7 = 値  /  値 = st.7   (lpoke/lpeek も可)
; UserData : void* (+32, 8byte)  qpoke st,32,値 / qpeek(st,32)  ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; Parameters : _Parameters_e__Union (+40, 8byte)  varptr(st)+40 を基点に操作(8byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global WINBIO_ASYNC_RESULT
    #field int SessionHandle
    #field int Operation
    #field int64 SequenceNumber
    #field int64 TimeStamp
    #field int ApiStatus
    #field int UnitId
    #field intptr UserData
    #field byte Parameters 8
#endstruct

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