ホーム › Devices.BiometricFramework › WINBIO_IDENTITY
WINBIO_IDENTITY
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| Type | DWORD | 4 | +0 | +0 | 格納されているID値の種別(NULL・ワイルドカード・SID・GUID等)を示す値。 |
| Value | _Value_e__Union | 32 | +8 | +4 | Typeに応じたID実体(SIDやGUID等)を保持する無名共用体。 |
共用体: _Value_e__Union x64 32B / x86 32B
| フィールド | 型 | サイズ | x64 | x86 |
|---|---|---|---|---|
| Null | DWORD | 4 | +0 | +0 |
| Wildcard | DWORD | 4 | +0 | +0 |
| TemplateGuid | GUID | 16 | +0 | +0 |
| AccountSid | _AccountSid_e__Struct | 8/4 | +0 | +0 |
| SecureId | BYTE | 32 | +0 | +0 |
各言語での定義
#include <windows.h>
// WINBIO_IDENTITY (x64 40 / x86 36 バイト)
typedef struct WINBIO_IDENTITY {
DWORD Type;
_Value_e__Union Value;
} WINBIO_IDENTITY;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct WINBIO_IDENTITY
{
public uint Type;
public _Value_e__Union Value;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure WINBIO_IDENTITY
Public Type As UInteger
Public Value As _Value_e__Union
End Structureimport ctypes
from ctypes import wintypes
class WINBIO_IDENTITY(ctypes.Structure):
_fields_ = [
("Type", wintypes.DWORD),
("Value", _Value_e__Union),
]#[repr(C)]
pub struct WINBIO_IDENTITY {
pub Type: u32,
pub Value: _Value_e__Union,
}import "golang.org/x/sys/windows"
type WINBIO_IDENTITY struct {
Type uint32
Value _Value_e__Union
}type
WINBIO_IDENTITY = record
Type: DWORD;
Value: _Value_e__Union;
end;const WINBIO_IDENTITY = extern struct {
Type: u32,
Value: _Value_e__Union,
};type
WINBIO_IDENTITY {.bycopy.} = object
Type: uint32
Value: _Value_e__Unionstruct WINBIO_IDENTITY
{
uint Type;
_Value_e__Union Value;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; WINBIO_IDENTITY サイズ: 36 バイト(x86)
dim st, 9 ; 4byte整数×9(構造体サイズ 36 / 4 切り上げ)
; Type : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; Value : _Value_e__Union (+4, 32byte) varptr(st)+4 を基点に操作(32byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; WINBIO_IDENTITY サイズ: 40 バイト(x64)
dim st, 10 ; 4byte整数×10(構造体サイズ 40 / 4 切り上げ)
; Type : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; Value : _Value_e__Union (+8, 32byte) varptr(st)+8 を基点に操作(32byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global WINBIO_IDENTITY
#field int Type
#field byte Value 32
#endstruct
stdim st, WINBIO_IDENTITY ; NSTRUCT 変数を確保
st->Type = 100
mes "Type=" + st->Type
; ※union フィールドは byte 列で確保(NSTRUCT は union 非対応)。必要に応じ手動でアクセス。