ホーム › Devices.BiometricFramework › WINBIO_SECURE_CONNECTION_DATA
WINBIO_SECURE_CONNECTION_DATA
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| Size | DWORD | 4 | +0 | +0 | この構造体に続くデータ全体のバイト数。 |
| Version | WORD | 2 | +4 | +4 | セキュア接続データのバージョン番号。 |
| Flags | WORD | 2 | +6 | +6 | セキュア接続の状態を示すビットフラグ。 |
| ModelCertificateSize | DWORD | 4 | +8 | +8 | モデル証明書のバイト数。 |
| IntermediateCA1Size | DWORD | 4 | +12 | +12 | 中間CA証明書1のバイト数。 |
| IntermediateCA2Size | DWORD | 4 | +16 | +16 | 中間CA証明書2のバイト数。 |
各言語での定義
#include <windows.h>
// WINBIO_SECURE_CONNECTION_DATA (x64 20 / x86 20 バイト)
typedef struct WINBIO_SECURE_CONNECTION_DATA {
DWORD Size;
WORD Version;
WORD Flags;
DWORD ModelCertificateSize;
DWORD IntermediateCA1Size;
DWORD IntermediateCA2Size;
} WINBIO_SECURE_CONNECTION_DATA;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct WINBIO_SECURE_CONNECTION_DATA
{
public uint Size;
public ushort Version;
public ushort Flags;
public uint ModelCertificateSize;
public uint IntermediateCA1Size;
public uint IntermediateCA2Size;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure WINBIO_SECURE_CONNECTION_DATA
Public Size As UInteger
Public Version As UShort
Public Flags As UShort
Public ModelCertificateSize As UInteger
Public IntermediateCA1Size As UInteger
Public IntermediateCA2Size As UInteger
End Structureimport ctypes
from ctypes import wintypes
class WINBIO_SECURE_CONNECTION_DATA(ctypes.Structure):
_fields_ = [
("Size", wintypes.DWORD),
("Version", ctypes.c_ushort),
("Flags", ctypes.c_ushort),
("ModelCertificateSize", wintypes.DWORD),
("IntermediateCA1Size", wintypes.DWORD),
("IntermediateCA2Size", wintypes.DWORD),
]#[repr(C)]
pub struct WINBIO_SECURE_CONNECTION_DATA {
pub Size: u32,
pub Version: u16,
pub Flags: u16,
pub ModelCertificateSize: u32,
pub IntermediateCA1Size: u32,
pub IntermediateCA2Size: u32,
}import "golang.org/x/sys/windows"
type WINBIO_SECURE_CONNECTION_DATA struct {
Size uint32
Version uint16
Flags uint16
ModelCertificateSize uint32
IntermediateCA1Size uint32
IntermediateCA2Size uint32
}type
WINBIO_SECURE_CONNECTION_DATA = record
Size: DWORD;
Version: Word;
Flags: Word;
ModelCertificateSize: DWORD;
IntermediateCA1Size: DWORD;
IntermediateCA2Size: DWORD;
end;const WINBIO_SECURE_CONNECTION_DATA = extern struct {
Size: u32,
Version: u16,
Flags: u16,
ModelCertificateSize: u32,
IntermediateCA1Size: u32,
IntermediateCA2Size: u32,
};type
WINBIO_SECURE_CONNECTION_DATA {.bycopy.} = object
Size: uint32
Version: uint16
Flags: uint16
ModelCertificateSize: uint32
IntermediateCA1Size: uint32
IntermediateCA2Size: uint32struct WINBIO_SECURE_CONNECTION_DATA
{
uint Size;
ushort Version;
ushort Flags;
uint ModelCertificateSize;
uint IntermediateCA1Size;
uint IntermediateCA2Size;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; WINBIO_SECURE_CONNECTION_DATA サイズ: 20 バイト(x64)
dim st, 5 ; 4byte整数×5(構造体サイズ 20 / 4 切り上げ)
; Size : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; Version : WORD (+4, 2byte) wpoke st,4,値 / 値 = wpeek(st,4)
; Flags : WORD (+6, 2byte) wpoke st,6,値 / 値 = wpeek(st,6)
; ModelCertificateSize : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; IntermediateCA1Size : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; IntermediateCA2Size : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global WINBIO_SECURE_CONNECTION_DATA
#field int Size
#field short Version
#field short Flags
#field int ModelCertificateSize
#field int IntermediateCA1Size
#field int IntermediateCA2Size
#endstruct
stdim st, WINBIO_SECURE_CONNECTION_DATA ; NSTRUCT 変数を確保
st->Size = 100
mes "Size=" + st->Size