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

WINBIO_STORAGE_INTERFACE

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

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

フィールド

フィールドサイズx64x86説明
VersionWINBIO_ADAPTER_INTERFACE_VERSION4+0+0このストレージアダプタインターフェースのバージョン。
TypeDWORD4+4+4アダプタの種別(ストレージ)を示す値。
SizeUINT_PTR8/4+8+8この構造体のサイズ(バイト)。
AdapterIdGUID16+16+12アダプタを一意に識別するGUID。
AttachPIBIO_STORAGE_ATTACH_FN8/4+32+28ユニットへのアタッチ時に呼ばれる関数ポインタ。
DetachPIBIO_STORAGE_DETACH_FN8/4+40+32ユニットからのデタッチ時に呼ばれる関数ポインタ。
ClearContextPIBIO_STORAGE_CLEAR_CONTEXT_FN8/4+48+36コンテキストをクリアする関数ポインタ。
CreateDatabasePIBIO_STORAGE_CREATE_DATABASE_FN8/4+56+40データベースを新規作成する関数ポインタ。
EraseDatabasePIBIO_STORAGE_ERASE_DATABASE_FN8/4+64+44データベースを消去する関数ポインタ。
OpenDatabasePIBIO_STORAGE_OPEN_DATABASE_FN8/4+72+48データベースを開く関数ポインタ。
CloseDatabasePIBIO_STORAGE_CLOSE_DATABASE_FN8/4+80+52データベースを閉じる関数ポインタ。
GetDataFormatPIBIO_STORAGE_GET_DATA_FORMAT_FN8/4+88+56データベースのデータ形式を取得する関数ポインタ。
GetDatabaseSizePIBIO_STORAGE_GET_DATABASE_SIZE_FN8/4+96+60データベースのサイズ(レコード数等)を取得する関数ポインタ。
AddRecordPIBIO_STORAGE_ADD_RECORD_FN8/4+104+64レコードを追加する関数ポインタ。
DeleteRecordPIBIO_STORAGE_DELETE_RECORD_FN8/4+112+68レコードを削除する関数ポインタ。
QueryBySubjectPIBIO_STORAGE_QUERY_BY_SUBJECT_FN8/4+120+72主体(ID)でレコードを検索する関数ポインタ。
QueryByContentPIBIO_STORAGE_QUERY_BY_CONTENT_FN8/4+128+76インデックス内容でレコードを検索する関数ポインタ。
GetRecordCountPIBIO_STORAGE_GET_RECORD_COUNT_FN8/4+136+80検索結果のレコード数を取得する関数ポインタ。
FirstRecordPIBIO_STORAGE_FIRST_RECORD_FN8/4+144+84結果セットの先頭レコードへ移動する関数ポインタ。
NextRecordPIBIO_STORAGE_NEXT_RECORD_FN8/4+152+88結果セットの次レコードへ移動する関数ポインタ。
GetCurrentRecordPIBIO_STORAGE_GET_CURRENT_RECORD_FN8/4+160+92現在位置のレコードを取得する関数ポインタ。
ControlUnitPIBIO_STORAGE_CONTROL_UNIT_FN8/4+168+96ユニットへ制御コマンドを送る関数ポインタ。
ControlUnitPrivilegedPIBIO_STORAGE_CONTROL_UNIT_PRIVILEGED_FN8/4+176+100特権付きの制御コマンドを送る関数ポインタ。
NotifyPowerChangePIBIO_STORAGE_NOTIFY_POWER_CHANGE_FN8/4+184+104電源状態変化を通知する関数ポインタ。
PipelineInitPIBIO_STORAGE_PIPELINE_INIT_FN8/4+192+108パイプラインを初期化する関数ポインタ。
PipelineCleanupPIBIO_STORAGE_PIPELINE_CLEANUP_FN8/4+200+112パイプラインを後始末する関数ポインタ。
ActivatePIBIO_STORAGE_ACTIVATE_FN8/4+208+116ストレージを有効化する関数ポインタ。
DeactivatePIBIO_STORAGE_DEACTIVATE_FN8/4+216+120ストレージを無効化する関数ポインタ。
QueryExtendedInfoPIBIO_STORAGE_QUERY_EXTENDED_INFO_FN8/4+224+124拡張ストレージ情報を問い合わせる関数ポインタ。
NotifyDatabaseChangePIBIO_STORAGE_NOTIFY_DATABASE_CHANGE_FN8/4+232+128データベース変更を通知する関数ポインタ。
Reserved1PIBIO_STORAGE_RESERVED_1_FN8/4+240+132将来の拡張用に予約された関数ポインタ。
Reserved2PIBIO_STORAGE_RESERVED_2_FN8/4+248+136将来の拡張用に予約された関数ポインタ。
UpdateRecordBeginPIBIO_STORAGE_UPDATE_RECORD_BEGIN_FN8/4+256+140レコード更新トランザクションを開始する関数ポインタ。
UpdateRecordCommitPIBIO_STORAGE_UPDATE_RECORD_COMMIT_FN8/4+264+144レコード更新を確定する関数ポインタ。

各言語での定義

#include <windows.h>

// WINBIO_ADAPTER_INTERFACE_VERSION  (x64 4 / x86 4 バイト)
typedef struct WINBIO_ADAPTER_INTERFACE_VERSION {
    WORD MajorVersion;
    WORD MinorVersion;
} WINBIO_ADAPTER_INTERFACE_VERSION;

// WINBIO_STORAGE_INTERFACE  (x64 272 / x86 148 バイト)
typedef struct WINBIO_STORAGE_INTERFACE {
    WINBIO_ADAPTER_INTERFACE_VERSION Version;
    DWORD Type;
    UINT_PTR Size;
    GUID AdapterId;
    PIBIO_STORAGE_ATTACH_FN Attach;
    PIBIO_STORAGE_DETACH_FN Detach;
    PIBIO_STORAGE_CLEAR_CONTEXT_FN ClearContext;
    PIBIO_STORAGE_CREATE_DATABASE_FN CreateDatabase;
    PIBIO_STORAGE_ERASE_DATABASE_FN EraseDatabase;
    PIBIO_STORAGE_OPEN_DATABASE_FN OpenDatabase;
    PIBIO_STORAGE_CLOSE_DATABASE_FN CloseDatabase;
    PIBIO_STORAGE_GET_DATA_FORMAT_FN GetDataFormat;
    PIBIO_STORAGE_GET_DATABASE_SIZE_FN GetDatabaseSize;
    PIBIO_STORAGE_ADD_RECORD_FN AddRecord;
    PIBIO_STORAGE_DELETE_RECORD_FN DeleteRecord;
    PIBIO_STORAGE_QUERY_BY_SUBJECT_FN QueryBySubject;
    PIBIO_STORAGE_QUERY_BY_CONTENT_FN QueryByContent;
    PIBIO_STORAGE_GET_RECORD_COUNT_FN GetRecordCount;
    PIBIO_STORAGE_FIRST_RECORD_FN FirstRecord;
    PIBIO_STORAGE_NEXT_RECORD_FN NextRecord;
    PIBIO_STORAGE_GET_CURRENT_RECORD_FN GetCurrentRecord;
    PIBIO_STORAGE_CONTROL_UNIT_FN ControlUnit;
    PIBIO_STORAGE_CONTROL_UNIT_PRIVILEGED_FN ControlUnitPrivileged;
    PIBIO_STORAGE_NOTIFY_POWER_CHANGE_FN NotifyPowerChange;
    PIBIO_STORAGE_PIPELINE_INIT_FN PipelineInit;
    PIBIO_STORAGE_PIPELINE_CLEANUP_FN PipelineCleanup;
    PIBIO_STORAGE_ACTIVATE_FN Activate;
    PIBIO_STORAGE_DEACTIVATE_FN Deactivate;
    PIBIO_STORAGE_QUERY_EXTENDED_INFO_FN QueryExtendedInfo;
    PIBIO_STORAGE_NOTIFY_DATABASE_CHANGE_FN NotifyDatabaseChange;
    PIBIO_STORAGE_RESERVED_1_FN Reserved1;
    PIBIO_STORAGE_RESERVED_2_FN Reserved2;
    PIBIO_STORAGE_UPDATE_RECORD_BEGIN_FN UpdateRecordBegin;
    PIBIO_STORAGE_UPDATE_RECORD_COMMIT_FN UpdateRecordCommit;
} WINBIO_STORAGE_INTERFACE;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct WINBIO_ADAPTER_INTERFACE_VERSION
{
    public ushort MajorVersion;
    public ushort MinorVersion;
}

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct WINBIO_STORAGE_INTERFACE
{
    public WINBIO_ADAPTER_INTERFACE_VERSION Version;
    public uint Type;
    public UIntPtr Size;
    public Guid AdapterId;
    public IntPtr Attach;
    public IntPtr Detach;
    public IntPtr ClearContext;
    public IntPtr CreateDatabase;
    public IntPtr EraseDatabase;
    public IntPtr OpenDatabase;
    public IntPtr CloseDatabase;
    public IntPtr GetDataFormat;
    public IntPtr GetDatabaseSize;
    public IntPtr AddRecord;
    public IntPtr DeleteRecord;
    public IntPtr QueryBySubject;
    public IntPtr QueryByContent;
    public IntPtr GetRecordCount;
    public IntPtr FirstRecord;
    public IntPtr NextRecord;
    public IntPtr GetCurrentRecord;
    public IntPtr ControlUnit;
    public IntPtr ControlUnitPrivileged;
    public IntPtr NotifyPowerChange;
    public IntPtr PipelineInit;
    public IntPtr PipelineCleanup;
    public IntPtr Activate;
    public IntPtr Deactivate;
    public IntPtr QueryExtendedInfo;
    public IntPtr NotifyDatabaseChange;
    public IntPtr Reserved1;
    public IntPtr Reserved2;
    public IntPtr UpdateRecordBegin;
    public IntPtr UpdateRecordCommit;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure WINBIO_ADAPTER_INTERFACE_VERSION
    Public MajorVersion As UShort
    Public MinorVersion As UShort
End Structure

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure WINBIO_STORAGE_INTERFACE
    Public Version As WINBIO_ADAPTER_INTERFACE_VERSION
    Public Type As UInteger
    Public Size As UIntPtr
    Public AdapterId As Guid
    Public Attach As IntPtr
    Public Detach As IntPtr
    Public ClearContext As IntPtr
    Public CreateDatabase As IntPtr
    Public EraseDatabase As IntPtr
    Public OpenDatabase As IntPtr
    Public CloseDatabase As IntPtr
    Public GetDataFormat As IntPtr
    Public GetDatabaseSize As IntPtr
    Public AddRecord As IntPtr
    Public DeleteRecord As IntPtr
    Public QueryBySubject As IntPtr
    Public QueryByContent As IntPtr
    Public GetRecordCount As IntPtr
    Public FirstRecord As IntPtr
    Public NextRecord As IntPtr
    Public GetCurrentRecord As IntPtr
    Public ControlUnit As IntPtr
    Public ControlUnitPrivileged As IntPtr
    Public NotifyPowerChange As IntPtr
    Public PipelineInit As IntPtr
    Public PipelineCleanup As IntPtr
    Public Activate As IntPtr
    Public Deactivate As IntPtr
    Public QueryExtendedInfo As IntPtr
    Public NotifyDatabaseChange As IntPtr
    Public Reserved1 As IntPtr
    Public Reserved2 As IntPtr
    Public UpdateRecordBegin As IntPtr
    Public UpdateRecordCommit As IntPtr
End Structure
import ctypes
from ctypes import wintypes

class WINBIO_ADAPTER_INTERFACE_VERSION(ctypes.Structure):
    _fields_ = [
        ("MajorVersion", ctypes.c_ushort),
        ("MinorVersion", ctypes.c_ushort),
    ]

class WINBIO_STORAGE_INTERFACE(ctypes.Structure):
    _fields_ = [
        ("Version", WINBIO_ADAPTER_INTERFACE_VERSION),
        ("Type", wintypes.DWORD),
        ("Size", ctypes.c_size_t),
        ("AdapterId", GUID),
        ("Attach", ctypes.c_void_p),
        ("Detach", ctypes.c_void_p),
        ("ClearContext", ctypes.c_void_p),
        ("CreateDatabase", ctypes.c_void_p),
        ("EraseDatabase", ctypes.c_void_p),
        ("OpenDatabase", ctypes.c_void_p),
        ("CloseDatabase", ctypes.c_void_p),
        ("GetDataFormat", ctypes.c_void_p),
        ("GetDatabaseSize", ctypes.c_void_p),
        ("AddRecord", ctypes.c_void_p),
        ("DeleteRecord", ctypes.c_void_p),
        ("QueryBySubject", ctypes.c_void_p),
        ("QueryByContent", ctypes.c_void_p),
        ("GetRecordCount", ctypes.c_void_p),
        ("FirstRecord", ctypes.c_void_p),
        ("NextRecord", ctypes.c_void_p),
        ("GetCurrentRecord", ctypes.c_void_p),
        ("ControlUnit", ctypes.c_void_p),
        ("ControlUnitPrivileged", ctypes.c_void_p),
        ("NotifyPowerChange", ctypes.c_void_p),
        ("PipelineInit", ctypes.c_void_p),
        ("PipelineCleanup", ctypes.c_void_p),
        ("Activate", ctypes.c_void_p),
        ("Deactivate", ctypes.c_void_p),
        ("QueryExtendedInfo", ctypes.c_void_p),
        ("NotifyDatabaseChange", ctypes.c_void_p),
        ("Reserved1", ctypes.c_void_p),
        ("Reserved2", ctypes.c_void_p),
        ("UpdateRecordBegin", ctypes.c_void_p),
        ("UpdateRecordCommit", ctypes.c_void_p),
    ]
#[repr(C)]
pub struct WINBIO_ADAPTER_INTERFACE_VERSION {
    pub MajorVersion: u16,
    pub MinorVersion: u16,
}

#[repr(C)]
pub struct WINBIO_STORAGE_INTERFACE {
    pub Version: WINBIO_ADAPTER_INTERFACE_VERSION,
    pub Type: u32,
    pub Size: usize,
    pub AdapterId: GUID,
    pub Attach: *mut core::ffi::c_void,
    pub Detach: *mut core::ffi::c_void,
    pub ClearContext: *mut core::ffi::c_void,
    pub CreateDatabase: *mut core::ffi::c_void,
    pub EraseDatabase: *mut core::ffi::c_void,
    pub OpenDatabase: *mut core::ffi::c_void,
    pub CloseDatabase: *mut core::ffi::c_void,
    pub GetDataFormat: *mut core::ffi::c_void,
    pub GetDatabaseSize: *mut core::ffi::c_void,
    pub AddRecord: *mut core::ffi::c_void,
    pub DeleteRecord: *mut core::ffi::c_void,
    pub QueryBySubject: *mut core::ffi::c_void,
    pub QueryByContent: *mut core::ffi::c_void,
    pub GetRecordCount: *mut core::ffi::c_void,
    pub FirstRecord: *mut core::ffi::c_void,
    pub NextRecord: *mut core::ffi::c_void,
    pub GetCurrentRecord: *mut core::ffi::c_void,
    pub ControlUnit: *mut core::ffi::c_void,
    pub ControlUnitPrivileged: *mut core::ffi::c_void,
    pub NotifyPowerChange: *mut core::ffi::c_void,
    pub PipelineInit: *mut core::ffi::c_void,
    pub PipelineCleanup: *mut core::ffi::c_void,
    pub Activate: *mut core::ffi::c_void,
    pub Deactivate: *mut core::ffi::c_void,
    pub QueryExtendedInfo: *mut core::ffi::c_void,
    pub NotifyDatabaseChange: *mut core::ffi::c_void,
    pub Reserved1: *mut core::ffi::c_void,
    pub Reserved2: *mut core::ffi::c_void,
    pub UpdateRecordBegin: *mut core::ffi::c_void,
    pub UpdateRecordCommit: *mut core::ffi::c_void,
}
import "golang.org/x/sys/windows"

type WINBIO_ADAPTER_INTERFACE_VERSION struct {
	MajorVersion uint16
	MinorVersion uint16
}

type WINBIO_STORAGE_INTERFACE struct {
	Version WINBIO_ADAPTER_INTERFACE_VERSION
	Type uint32
	Size uintptr
	AdapterId windows.GUID
	Attach uintptr
	Detach uintptr
	ClearContext uintptr
	CreateDatabase uintptr
	EraseDatabase uintptr
	OpenDatabase uintptr
	CloseDatabase uintptr
	GetDataFormat uintptr
	GetDatabaseSize uintptr
	AddRecord uintptr
	DeleteRecord uintptr
	QueryBySubject uintptr
	QueryByContent uintptr
	GetRecordCount uintptr
	FirstRecord uintptr
	NextRecord uintptr
	GetCurrentRecord uintptr
	ControlUnit uintptr
	ControlUnitPrivileged uintptr
	NotifyPowerChange uintptr
	PipelineInit uintptr
	PipelineCleanup uintptr
	Activate uintptr
	Deactivate uintptr
	QueryExtendedInfo uintptr
	NotifyDatabaseChange uintptr
	Reserved1 uintptr
	Reserved2 uintptr
	UpdateRecordBegin uintptr
	UpdateRecordCommit uintptr
}
type
  WINBIO_ADAPTER_INTERFACE_VERSION = record
    MajorVersion: Word;
    MinorVersion: Word;
  end;

  WINBIO_STORAGE_INTERFACE = record
    Version: WINBIO_ADAPTER_INTERFACE_VERSION;
    Type: DWORD;
    Size: NativeUInt;
    AdapterId: TGUID;
    Attach: Pointer;
    Detach: Pointer;
    ClearContext: Pointer;
    CreateDatabase: Pointer;
    EraseDatabase: Pointer;
    OpenDatabase: Pointer;
    CloseDatabase: Pointer;
    GetDataFormat: Pointer;
    GetDatabaseSize: Pointer;
    AddRecord: Pointer;
    DeleteRecord: Pointer;
    QueryBySubject: Pointer;
    QueryByContent: Pointer;
    GetRecordCount: Pointer;
    FirstRecord: Pointer;
    NextRecord: Pointer;
    GetCurrentRecord: Pointer;
    ControlUnit: Pointer;
    ControlUnitPrivileged: Pointer;
    NotifyPowerChange: Pointer;
    PipelineInit: Pointer;
    PipelineCleanup: Pointer;
    Activate: Pointer;
    Deactivate: Pointer;
    QueryExtendedInfo: Pointer;
    NotifyDatabaseChange: Pointer;
    Reserved1: Pointer;
    Reserved2: Pointer;
    UpdateRecordBegin: Pointer;
    UpdateRecordCommit: Pointer;
  end;
const WINBIO_ADAPTER_INTERFACE_VERSION = extern struct {
    MajorVersion: u16,
    MinorVersion: u16,
};

const WINBIO_STORAGE_INTERFACE = extern struct {
    Version: WINBIO_ADAPTER_INTERFACE_VERSION,
    Type: u32,
    Size: usize,
    AdapterId: GUID,
    Attach: ?*anyopaque,
    Detach: ?*anyopaque,
    ClearContext: ?*anyopaque,
    CreateDatabase: ?*anyopaque,
    EraseDatabase: ?*anyopaque,
    OpenDatabase: ?*anyopaque,
    CloseDatabase: ?*anyopaque,
    GetDataFormat: ?*anyopaque,
    GetDatabaseSize: ?*anyopaque,
    AddRecord: ?*anyopaque,
    DeleteRecord: ?*anyopaque,
    QueryBySubject: ?*anyopaque,
    QueryByContent: ?*anyopaque,
    GetRecordCount: ?*anyopaque,
    FirstRecord: ?*anyopaque,
    NextRecord: ?*anyopaque,
    GetCurrentRecord: ?*anyopaque,
    ControlUnit: ?*anyopaque,
    ControlUnitPrivileged: ?*anyopaque,
    NotifyPowerChange: ?*anyopaque,
    PipelineInit: ?*anyopaque,
    PipelineCleanup: ?*anyopaque,
    Activate: ?*anyopaque,
    Deactivate: ?*anyopaque,
    QueryExtendedInfo: ?*anyopaque,
    NotifyDatabaseChange: ?*anyopaque,
    Reserved1: ?*anyopaque,
    Reserved2: ?*anyopaque,
    UpdateRecordBegin: ?*anyopaque,
    UpdateRecordCommit: ?*anyopaque,
};
type
  WINBIO_ADAPTER_INTERFACE_VERSION {.bycopy.} = object
    MajorVersion: uint16
    MinorVersion: uint16

  WINBIO_STORAGE_INTERFACE {.bycopy.} = object
    Version: WINBIO_ADAPTER_INTERFACE_VERSION
    Type: uint32
    Size: uint
    AdapterId: GUID
    Attach: pointer
    Detach: pointer
    ClearContext: pointer
    CreateDatabase: pointer
    EraseDatabase: pointer
    OpenDatabase: pointer
    CloseDatabase: pointer
    GetDataFormat: pointer
    GetDatabaseSize: pointer
    AddRecord: pointer
    DeleteRecord: pointer
    QueryBySubject: pointer
    QueryByContent: pointer
    GetRecordCount: pointer
    FirstRecord: pointer
    NextRecord: pointer
    GetCurrentRecord: pointer
    ControlUnit: pointer
    ControlUnitPrivileged: pointer
    NotifyPowerChange: pointer
    PipelineInit: pointer
    PipelineCleanup: pointer
    Activate: pointer
    Deactivate: pointer
    QueryExtendedInfo: pointer
    NotifyDatabaseChange: pointer
    Reserved1: pointer
    Reserved2: pointer
    UpdateRecordBegin: pointer
    UpdateRecordCommit: pointer
struct WINBIO_ADAPTER_INTERFACE_VERSION
{
    ushort MajorVersion;
    ushort MinorVersion;
}

struct WINBIO_STORAGE_INTERFACE
{
    WINBIO_ADAPTER_INTERFACE_VERSION Version;
    uint Type;
    size_t Size;
    GUID AdapterId;
    void* Attach;
    void* Detach;
    void* ClearContext;
    void* CreateDatabase;
    void* EraseDatabase;
    void* OpenDatabase;
    void* CloseDatabase;
    void* GetDataFormat;
    void* GetDatabaseSize;
    void* AddRecord;
    void* DeleteRecord;
    void* QueryBySubject;
    void* QueryByContent;
    void* GetRecordCount;
    void* FirstRecord;
    void* NextRecord;
    void* GetCurrentRecord;
    void* ControlUnit;
    void* ControlUnitPrivileged;
    void* NotifyPowerChange;
    void* PipelineInit;
    void* PipelineCleanup;
    void* Activate;
    void* Deactivate;
    void* QueryExtendedInfo;
    void* NotifyDatabaseChange;
    void* Reserved1;
    void* Reserved2;
    void* UpdateRecordBegin;
    void* UpdateRecordCommit;
}

HSP用 定義

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

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; WINBIO_STORAGE_INTERFACE サイズ: 148 バイト(x86)
dim st, 37    ; 4byte整数×37(構造体サイズ 148 / 4 切り上げ)
; Version : WINBIO_ADAPTER_INTERFACE_VERSION (+0, 4byte)  varptr(st)+0 を基点に操作(4byte:入れ子/配列)
; Type : DWORD (+4, 4byte)  st.1 = 値  /  値 = st.1   (lpoke/lpeek も可)
; Size : UINT_PTR (+8, 4byte)  st.2 = 値  /  値 = st.2   (lpoke/lpeek も可)
; AdapterId : GUID (+12, 16byte)  varptr(st)+12 を基点に操作(16byte:入れ子/配列)
; Attach : PIBIO_STORAGE_ATTACH_FN (+28, 4byte)  st.7 = 値  /  値 = st.7   (lpoke/lpeek も可)
; Detach : PIBIO_STORAGE_DETACH_FN (+32, 4byte)  st.8 = 値  /  値 = st.8   (lpoke/lpeek も可)
; ClearContext : PIBIO_STORAGE_CLEAR_CONTEXT_FN (+36, 4byte)  st.9 = 値  /  値 = st.9   (lpoke/lpeek も可)
; CreateDatabase : PIBIO_STORAGE_CREATE_DATABASE_FN (+40, 4byte)  st.10 = 値  /  値 = st.10   (lpoke/lpeek も可)
; EraseDatabase : PIBIO_STORAGE_ERASE_DATABASE_FN (+44, 4byte)  st.11 = 値  /  値 = st.11   (lpoke/lpeek も可)
; OpenDatabase : PIBIO_STORAGE_OPEN_DATABASE_FN (+48, 4byte)  st.12 = 値  /  値 = st.12   (lpoke/lpeek も可)
; CloseDatabase : PIBIO_STORAGE_CLOSE_DATABASE_FN (+52, 4byte)  st.13 = 値  /  値 = st.13   (lpoke/lpeek も可)
; GetDataFormat : PIBIO_STORAGE_GET_DATA_FORMAT_FN (+56, 4byte)  st.14 = 値  /  値 = st.14   (lpoke/lpeek も可)
; GetDatabaseSize : PIBIO_STORAGE_GET_DATABASE_SIZE_FN (+60, 4byte)  st.15 = 値  /  値 = st.15   (lpoke/lpeek も可)
; AddRecord : PIBIO_STORAGE_ADD_RECORD_FN (+64, 4byte)  st.16 = 値  /  値 = st.16   (lpoke/lpeek も可)
; DeleteRecord : PIBIO_STORAGE_DELETE_RECORD_FN (+68, 4byte)  st.17 = 値  /  値 = st.17   (lpoke/lpeek も可)
; QueryBySubject : PIBIO_STORAGE_QUERY_BY_SUBJECT_FN (+72, 4byte)  st.18 = 値  /  値 = st.18   (lpoke/lpeek も可)
; QueryByContent : PIBIO_STORAGE_QUERY_BY_CONTENT_FN (+76, 4byte)  st.19 = 値  /  値 = st.19   (lpoke/lpeek も可)
; GetRecordCount : PIBIO_STORAGE_GET_RECORD_COUNT_FN (+80, 4byte)  st.20 = 値  /  値 = st.20   (lpoke/lpeek も可)
; FirstRecord : PIBIO_STORAGE_FIRST_RECORD_FN (+84, 4byte)  st.21 = 値  /  値 = st.21   (lpoke/lpeek も可)
; NextRecord : PIBIO_STORAGE_NEXT_RECORD_FN (+88, 4byte)  st.22 = 値  /  値 = st.22   (lpoke/lpeek も可)
; GetCurrentRecord : PIBIO_STORAGE_GET_CURRENT_RECORD_FN (+92, 4byte)  st.23 = 値  /  値 = st.23   (lpoke/lpeek も可)
; ControlUnit : PIBIO_STORAGE_CONTROL_UNIT_FN (+96, 4byte)  st.24 = 値  /  値 = st.24   (lpoke/lpeek も可)
; ControlUnitPrivileged : PIBIO_STORAGE_CONTROL_UNIT_PRIVILEGED_FN (+100, 4byte)  st.25 = 値  /  値 = st.25   (lpoke/lpeek も可)
; NotifyPowerChange : PIBIO_STORAGE_NOTIFY_POWER_CHANGE_FN (+104, 4byte)  st.26 = 値  /  値 = st.26   (lpoke/lpeek も可)
; PipelineInit : PIBIO_STORAGE_PIPELINE_INIT_FN (+108, 4byte)  st.27 = 値  /  値 = st.27   (lpoke/lpeek も可)
; PipelineCleanup : PIBIO_STORAGE_PIPELINE_CLEANUP_FN (+112, 4byte)  st.28 = 値  /  値 = st.28   (lpoke/lpeek も可)
; Activate : PIBIO_STORAGE_ACTIVATE_FN (+116, 4byte)  st.29 = 値  /  値 = st.29   (lpoke/lpeek も可)
; Deactivate : PIBIO_STORAGE_DEACTIVATE_FN (+120, 4byte)  st.30 = 値  /  値 = st.30   (lpoke/lpeek も可)
; QueryExtendedInfo : PIBIO_STORAGE_QUERY_EXTENDED_INFO_FN (+124, 4byte)  st.31 = 値  /  値 = st.31   (lpoke/lpeek も可)
; NotifyDatabaseChange : PIBIO_STORAGE_NOTIFY_DATABASE_CHANGE_FN (+128, 4byte)  st.32 = 値  /  値 = st.32   (lpoke/lpeek も可)
; Reserved1 : PIBIO_STORAGE_RESERVED_1_FN (+132, 4byte)  st.33 = 値  /  値 = st.33   (lpoke/lpeek も可)
; Reserved2 : PIBIO_STORAGE_RESERVED_2_FN (+136, 4byte)  st.34 = 値  /  値 = st.34   (lpoke/lpeek も可)
; UpdateRecordBegin : PIBIO_STORAGE_UPDATE_RECORD_BEGIN_FN (+140, 4byte)  st.35 = 値  /  値 = st.35   (lpoke/lpeek も可)
; UpdateRecordCommit : PIBIO_STORAGE_UPDATE_RECORD_COMMIT_FN (+144, 4byte)  st.36 = 値  /  値 = st.36   (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; WINBIO_STORAGE_INTERFACE サイズ: 272 バイト(x64)
dim st, 68    ; 4byte整数×68(構造体サイズ 272 / 4 切り上げ)
; Version : WINBIO_ADAPTER_INTERFACE_VERSION (+0, 4byte)  varptr(st)+0 を基点に操作(4byte:入れ子/配列)
; Type : DWORD (+4, 4byte)  st.1 = 値  /  値 = st.1   (lpoke/lpeek も可)
; Size : UINT_PTR (+8, 8byte)  qpoke st,8,値 / qpeek(st,8)  ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; AdapterId : GUID (+16, 16byte)  varptr(st)+16 を基点に操作(16byte:入れ子/配列)
; Attach : PIBIO_STORAGE_ATTACH_FN (+32, 8byte)  qpoke st,32,値 / qpeek(st,32)  ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; Detach : PIBIO_STORAGE_DETACH_FN (+40, 8byte)  qpoke st,40,値 / qpeek(st,40)  ※IronHSPのみ。3.7/3.8は lpoke st,40,下位 : lpoke st,44,上位
; ClearContext : PIBIO_STORAGE_CLEAR_CONTEXT_FN (+48, 8byte)  qpoke st,48,値 / qpeek(st,48)  ※IronHSPのみ。3.7/3.8は lpoke st,48,下位 : lpoke st,52,上位
; CreateDatabase : PIBIO_STORAGE_CREATE_DATABASE_FN (+56, 8byte)  qpoke st,56,値 / qpeek(st,56)  ※IronHSPのみ。3.7/3.8は lpoke st,56,下位 : lpoke st,60,上位
; EraseDatabase : PIBIO_STORAGE_ERASE_DATABASE_FN (+64, 8byte)  qpoke st,64,値 / qpeek(st,64)  ※IronHSPのみ。3.7/3.8は lpoke st,64,下位 : lpoke st,68,上位
; OpenDatabase : PIBIO_STORAGE_OPEN_DATABASE_FN (+72, 8byte)  qpoke st,72,値 / qpeek(st,72)  ※IronHSPのみ。3.7/3.8は lpoke st,72,下位 : lpoke st,76,上位
; CloseDatabase : PIBIO_STORAGE_CLOSE_DATABASE_FN (+80, 8byte)  qpoke st,80,値 / qpeek(st,80)  ※IronHSPのみ。3.7/3.8は lpoke st,80,下位 : lpoke st,84,上位
; GetDataFormat : PIBIO_STORAGE_GET_DATA_FORMAT_FN (+88, 8byte)  qpoke st,88,値 / qpeek(st,88)  ※IronHSPのみ。3.7/3.8は lpoke st,88,下位 : lpoke st,92,上位
; GetDatabaseSize : PIBIO_STORAGE_GET_DATABASE_SIZE_FN (+96, 8byte)  qpoke st,96,値 / qpeek(st,96)  ※IronHSPのみ。3.7/3.8は lpoke st,96,下位 : lpoke st,100,上位
; AddRecord : PIBIO_STORAGE_ADD_RECORD_FN (+104, 8byte)  qpoke st,104,値 / qpeek(st,104)  ※IronHSPのみ。3.7/3.8は lpoke st,104,下位 : lpoke st,108,上位
; DeleteRecord : PIBIO_STORAGE_DELETE_RECORD_FN (+112, 8byte)  qpoke st,112,値 / qpeek(st,112)  ※IronHSPのみ。3.7/3.8は lpoke st,112,下位 : lpoke st,116,上位
; QueryBySubject : PIBIO_STORAGE_QUERY_BY_SUBJECT_FN (+120, 8byte)  qpoke st,120,値 / qpeek(st,120)  ※IronHSPのみ。3.7/3.8は lpoke st,120,下位 : lpoke st,124,上位
; QueryByContent : PIBIO_STORAGE_QUERY_BY_CONTENT_FN (+128, 8byte)  qpoke st,128,値 / qpeek(st,128)  ※IronHSPのみ。3.7/3.8は lpoke st,128,下位 : lpoke st,132,上位
; GetRecordCount : PIBIO_STORAGE_GET_RECORD_COUNT_FN (+136, 8byte)  qpoke st,136,値 / qpeek(st,136)  ※IronHSPのみ。3.7/3.8は lpoke st,136,下位 : lpoke st,140,上位
; FirstRecord : PIBIO_STORAGE_FIRST_RECORD_FN (+144, 8byte)  qpoke st,144,値 / qpeek(st,144)  ※IronHSPのみ。3.7/3.8は lpoke st,144,下位 : lpoke st,148,上位
; NextRecord : PIBIO_STORAGE_NEXT_RECORD_FN (+152, 8byte)  qpoke st,152,値 / qpeek(st,152)  ※IronHSPのみ。3.7/3.8は lpoke st,152,下位 : lpoke st,156,上位
; GetCurrentRecord : PIBIO_STORAGE_GET_CURRENT_RECORD_FN (+160, 8byte)  qpoke st,160,値 / qpeek(st,160)  ※IronHSPのみ。3.7/3.8は lpoke st,160,下位 : lpoke st,164,上位
; ControlUnit : PIBIO_STORAGE_CONTROL_UNIT_FN (+168, 8byte)  qpoke st,168,値 / qpeek(st,168)  ※IronHSPのみ。3.7/3.8は lpoke st,168,下位 : lpoke st,172,上位
; ControlUnitPrivileged : PIBIO_STORAGE_CONTROL_UNIT_PRIVILEGED_FN (+176, 8byte)  qpoke st,176,値 / qpeek(st,176)  ※IronHSPのみ。3.7/3.8は lpoke st,176,下位 : lpoke st,180,上位
; NotifyPowerChange : PIBIO_STORAGE_NOTIFY_POWER_CHANGE_FN (+184, 8byte)  qpoke st,184,値 / qpeek(st,184)  ※IronHSPのみ。3.7/3.8は lpoke st,184,下位 : lpoke st,188,上位
; PipelineInit : PIBIO_STORAGE_PIPELINE_INIT_FN (+192, 8byte)  qpoke st,192,値 / qpeek(st,192)  ※IronHSPのみ。3.7/3.8は lpoke st,192,下位 : lpoke st,196,上位
; PipelineCleanup : PIBIO_STORAGE_PIPELINE_CLEANUP_FN (+200, 8byte)  qpoke st,200,値 / qpeek(st,200)  ※IronHSPのみ。3.7/3.8は lpoke st,200,下位 : lpoke st,204,上位
; Activate : PIBIO_STORAGE_ACTIVATE_FN (+208, 8byte)  qpoke st,208,値 / qpeek(st,208)  ※IronHSPのみ。3.7/3.8は lpoke st,208,下位 : lpoke st,212,上位
; Deactivate : PIBIO_STORAGE_DEACTIVATE_FN (+216, 8byte)  qpoke st,216,値 / qpeek(st,216)  ※IronHSPのみ。3.7/3.8は lpoke st,216,下位 : lpoke st,220,上位
; QueryExtendedInfo : PIBIO_STORAGE_QUERY_EXTENDED_INFO_FN (+224, 8byte)  qpoke st,224,値 / qpeek(st,224)  ※IronHSPのみ。3.7/3.8は lpoke st,224,下位 : lpoke st,228,上位
; NotifyDatabaseChange : PIBIO_STORAGE_NOTIFY_DATABASE_CHANGE_FN (+232, 8byte)  qpoke st,232,値 / qpeek(st,232)  ※IronHSPのみ。3.7/3.8は lpoke st,232,下位 : lpoke st,236,上位
; Reserved1 : PIBIO_STORAGE_RESERVED_1_FN (+240, 8byte)  qpoke st,240,値 / qpeek(st,240)  ※IronHSPのみ。3.7/3.8は lpoke st,240,下位 : lpoke st,244,上位
; Reserved2 : PIBIO_STORAGE_RESERVED_2_FN (+248, 8byte)  qpoke st,248,値 / qpeek(st,248)  ※IronHSPのみ。3.7/3.8は lpoke st,248,下位 : lpoke st,252,上位
; UpdateRecordBegin : PIBIO_STORAGE_UPDATE_RECORD_BEGIN_FN (+256, 8byte)  qpoke st,256,値 / qpeek(st,256)  ※IronHSPのみ。3.7/3.8は lpoke st,256,下位 : lpoke st,260,上位
; UpdateRecordCommit : PIBIO_STORAGE_UPDATE_RECORD_COMMIT_FN (+264, 8byte)  qpoke st,264,値 / qpeek(st,264)  ※IronHSPのみ。3.7/3.8は lpoke st,264,下位 : lpoke st,268,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global WINBIO_ADAPTER_INTERFACE_VERSION
    #field short MajorVersion
    #field short MinorVersion
#endstruct

#defstruct global GUID, pack=1
    #field int Data1
    #field short Data2
    #field short Data3
    #field byte Data4 8
#endstruct

#defstruct global WINBIO_STORAGE_INTERFACE
    #field WINBIO_ADAPTER_INTERFACE_VERSION Version
    #field int Type
    #field intptr Size
    #field GUID AdapterId
    #field intptr Attach
    #field intptr Detach
    #field intptr ClearContext
    #field intptr CreateDatabase
    #field intptr EraseDatabase
    #field intptr OpenDatabase
    #field intptr CloseDatabase
    #field intptr GetDataFormat
    #field intptr GetDatabaseSize
    #field intptr AddRecord
    #field intptr DeleteRecord
    #field intptr QueryBySubject
    #field intptr QueryByContent
    #field intptr GetRecordCount
    #field intptr FirstRecord
    #field intptr NextRecord
    #field intptr GetCurrentRecord
    #field intptr ControlUnit
    #field intptr ControlUnitPrivileged
    #field intptr NotifyPowerChange
    #field intptr PipelineInit
    #field intptr PipelineCleanup
    #field intptr Activate
    #field intptr Deactivate
    #field intptr QueryExtendedInfo
    #field intptr NotifyDatabaseChange
    #field intptr Reserved1
    #field intptr Reserved2
    #field intptr UpdateRecordBegin
    #field intptr UpdateRecordCommit
#endstruct

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