WinBioAsyncOpenSession
関数シグネチャ
// winbio.dll
#include <windows.h>
HRESULT WinBioAsyncOpenSession(
DWORD Factor,
WINBIO_POOL PoolType,
DWORD Flags,
DWORD* UnitArray, // optional
UINT_PTR UnitCount, // optional
GUID* DatabaseId, // optional
WINBIO_ASYNC_NOTIFICATION_METHOD NotificationMethod,
HWND TargetWindow, // optional
DWORD MessageCode, // optional
PWINBIO_ASYNC_COMPLETION_CALLBACK CallbackRoutine, // optional
void* UserData, // optional
BOOL AsynchronousOpen,
DWORD* SessionHandle // optional
);パラメーター
| 名前 | 型 | 方向 | 説明 | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Factor | DWORD | in | 列挙する生体認証ユニットの種類を指定する WINBIO_BIOMETRIC_TYPE フラグのビットマスクです。現在サポートされているのは WINBIO_TYPE_FINGERPRINT のみです。 | ||||||||||||
| PoolType | WINBIO_POOL | in | セッションで使用する生体認証ユニットの種類を指定する ULONG 値です。次のいずれかの値を指定できます。
| ||||||||||||
| Flags | DWORD | in | 新しいセッションにおける生体認証ユニットの構成およびアクセスの特性を指定する ULONG 値です。構成フラグは、セッション内のユニットの全体的な構成を指定します。アクセスフラグは、アプリケーションが生体認証ユニットをどのように使用するかを指定します。構成フラグは必ず 1 つ指定する必要がありますが、任意のアクセスフラグと組み合わせることができます。
| ||||||||||||
| UnitArray | DWORD* | inoptional | セッションに含める生体認証ユニット識別子の配列へのポインターです。生体認証ユニットを列挙するには WinBioEnumBiometricUnits を呼び出します。PoolType パラメーターが WINBIO_POOL_SYSTEM の場合は、この値を NULL に設定します。 | ||||||||||||
| UnitCount | UINT_PTR | inoptional | UnitArray パラメーターが指す配列の要素数を指定する値です。PoolType パラメーターが WINBIO_POOL_SYSTEM の場合は、この値を 0 に設定します。 | ||||||||||||
| DatabaseId | GUID* | inoptional | セッションで使用するデータベースを指定する値です。PoolType パラメーターが WINBIO_POOL_PRIVATE の場合は、インストール済みデータベースの GUID を指定する必要があります。PoolType パラメーターが WINBIO_POOL_PRIVATE 以外の場合は、次の共通の値のいずれかを指定できます。
| ||||||||||||
| NotificationMethod | WINBIO_ASYNC_NOTIFICATION_METHOD | in | この生体認証セッションにおける非同期操作の完了通知を、クライアントアプリケーションにどのように配信するかを指定します。次のいずれかの値である必要があります。
| ||||||||||||
| TargetWindow | HWND | inoptional | 完了通知を受け取るウィンドウのハンドルです。NotificationMethod パラメーターが WINBIO_ASYNC_NOTIFY_MESSAGE に設定されていない限り、この値は無視されます。 | ||||||||||||
| MessageCode | DWORD | inoptional | 完了通知を知らせるためにフレームワークが送信するウィンドウメッセージコードです。NotificationMethod パラメーターが WINBIO_ASYNC_NOTIFY_MESSAGE に設定されていない限り、この値は無視されます。値は WM_APP(0x8000) から 0xBFFF の範囲内である必要があります。 Windows Biometric Framework は、メッセージの LPARAM 値に、操作の結果を格納する WINBIO_ASYNC_RESULT 構造体のアドレスを設定します。使用が終わったら、WinBioFree を呼び出して構造体を解放する必要があります。 | ||||||||||||
| CallbackRoutine | PWINBIO_ASYNC_COMPLETION_CALLBACK | inoptional | セッションハンドルを使用して開始した操作が完了したときに呼び出されるコールバックルーチンのアドレスです。NotificationMethod パラメーターが WINBIO_ASYNC_NOTIFY_CALLBACK に設定されていない限り、この値は無視されます。 | ||||||||||||
| UserData | void* | inoptional | 呼び出し元が用意したバッファーのアドレスです。このバッファーは、フレームワークや生体認証ユニットによって変更されることはありません。このアドレスは WINBIO_ASYNC_RESULT 構造体で返されます。アプリケーションはこのデータを利用して、完了通知を受け取ったときに実行する処理を判断したり、要求した操作に関する追加情報を保持したりできます。 | ||||||||||||
| AsynchronousOpen | BOOL | in | フレームワークセッションが開かれるまでブロックするかどうかを指定します。FALSE を指定するとプロセスはブロックされます。TRUE を指定するとセッションは非同期に開かれます。 フレームワークセッションを同期的に開くために FALSE を指定した場合、成功または失敗はこの関数の HRESULT 戻り値によって呼び出し元に直接返されます。セッションが正常に開かれた場合、アプリケーションが最初に受け取る非同期完了イベントは、フレームワークが開かれた後に要求した非同期操作に対するものになります。 フレームワークセッションを非同期に開くために TRUE を指定した場合、最初に受け取る非同期完了通知は、フレームワークを開く操作に対するものになります。NotificationMethod パラメーターが WINBIO_ASYNC_NOTIFY_CALLBACK に設定されている場合、操作結果は CallbackRoutine パラメーターで指定したコールバック関数に WINBIO_ASYNC_RESULT 構造体として配信されます。NotificationMethod パラメーターが WINBIO_ASYNC_NOTIFY_MESSAGE に設定されている場合、操作結果はウィンドウメッセージの LPARAM フィールドが指す WINBIO_ASYNC_RESULT 構造体に配信されます。 | ||||||||||||
| SessionHandle | DWORD* | outoptional | 関数が成功しなかった場合、このパラメーターは NULL になります。 セッションが同期的に開かれて成功した場合、このパラメーターにはセッションハンドルへのポインターが格納されます。 セッションを非同期に開くよう指定した場合、このメソッドは直ちに戻り、セッションハンドルは NULL になります。セッションが正常に開かれたかどうかを判断するには、WINBIO_ASYNC_RESULT 構造体を調べる必要があります。 |
戻り値の型: HRESULT
公式ドキュメント
生体認証サービスプロバイダーおよび 1 つ以上の生体認証ユニットに非同期に接続します。Windows 10 ビルド 1607 以降、この関数はモバイルイメージで使用できます。
戻り値
関数が成功した場合は S_OK を返します。関数が失敗した場合は、エラーを示す HRESULT 値を返します。返される値には次の表のものが含まれますが、これらに限定されません。一般的なエラーコードの一覧については、Common HRESULT Values を参照してください。
| 戻り値 | 説明 |
|---|---|
| 生体認証セッションを作成するために使用できるメモリが不足しています。 | |
| 通知方法を WINBIO_ASYNC_NOTIFY_MESSAGE に設定した場合、TargetWindow パラメーターに NULL または HWND_BROADCAST を指定することはできず、MessageCode パラメーターを 0 にすることもできません。 | |
|
SessionHandle パラメーターと AsynchronousOpen パラメーターを設定する必要があります。
通知方法を WINBIO_ASYNC_NOTIFY_CALLBACK に設定した場合は、CallbackRoutine パラメーターにコールバック関数のアドレスも指定する必要があります。 |
|
| Flags パラメーターに WINBIO_FLAG_RAW または WINBIO_FLAG_MAINTENANCE フラグが含まれていますが、呼び出し元にはいずれのアクセス許可も与えられていません。 | |
| UnitArray パラメーターで指定された生体認証ユニット番号のうち、1 つ以上が無効です。 | |
| クライアントアプリケーションはリモートデスクトップクライアント上で実行されており、システムプールのセッションを開こうとしています。 | |
| PoolType パラメーターが WINBIO_POOL_PRIVATE に設定されていますが、そのプール内で要求されたセンサーの 1 つ以上が使用できません。 | |
| 現在の管理ポリシーにより、Windows Biometric Framework API の使用が禁止されています。 |
解説(Remarks)
WinBioAsyncOpenSession 関数が返すセッションハンドルは、次のいずれの関数についても非同期完了通知を生成するために使用できます。
- WinBioCancel
- WinBioCaptureSample
- WinBioCloseSession
- WinBioControlUnit
- WinBioControlUnitPrivileged
- WinBioDeleteTemplate
- WinBioEnrollBegin
- WinBioEnrollCapture
- WinBioEnrollCommit
- WinBioEnrollDiscard
- WinBioEnumEnrollments
- WinBioGetProperty
- WinBioIdentify
- WinBioLocateSensor
- WinBioLockUnit
- WinBioLogonIdentifiedUser
- WinBioRegisterEventMonitor
- WinBioUnlockUnit
- WinBioUnregisterEventMonitor
- WinBioVerify
- WinBioWait
- WinBioCaptureSampleWithCallback
- WinBioEnrollCaptureWithCallback
- WinBioIdentifyWithCallback
- WinBioIdentifyWithCallback
AsynchronousOpen パラメーターは、オープン操作がブロックするかどうかのみを決定します。このパラメーターは、セッションハンドルを使用する以降の呼び出しの完了動作には影響しません。
AsynchronousOpen パラメーターに TRUE を設定した場合、この関数は引数の初期検証を行った時点で直ちに S_OK を返します。それ以降に検出されたエラーは、NotificationMethod パラメーターで指定された方法で呼び出し元に報告されます。つまり、成功を示す戻り値は WinBioAsyncOpenSession のパラメーターに問題がなかったことを示すだけであり、オープン操作が成功したことを示すものではありません。オープン操作が成功したかどうかを判断するには、WINBIO_ASYNC_RESULT 構造体を調べる必要があります。
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
各言語での呼び出し定義
// winbio.dll
#include <windows.h>
HRESULT WinBioAsyncOpenSession(
DWORD Factor,
WINBIO_POOL PoolType,
DWORD Flags,
DWORD* UnitArray, // optional
UINT_PTR UnitCount, // optional
GUID* DatabaseId, // optional
WINBIO_ASYNC_NOTIFICATION_METHOD NotificationMethod,
HWND TargetWindow, // optional
DWORD MessageCode, // optional
PWINBIO_ASYNC_COMPLETION_CALLBACK CallbackRoutine, // optional
void* UserData, // optional
BOOL AsynchronousOpen,
DWORD* SessionHandle // optional
);[DllImport("winbio.dll", ExactSpelling = true)]
static extern int WinBioAsyncOpenSession(
uint Factor, // DWORD
uint PoolType, // WINBIO_POOL
uint Flags, // DWORD
IntPtr UnitArray, // DWORD* optional
UIntPtr UnitCount, // UINT_PTR optional
IntPtr DatabaseId, // GUID* optional
int NotificationMethod, // WINBIO_ASYNC_NOTIFICATION_METHOD
IntPtr TargetWindow, // HWND optional
uint MessageCode, // DWORD optional
IntPtr CallbackRoutine, // PWINBIO_ASYNC_COMPLETION_CALLBACK optional
IntPtr UserData, // void* optional
bool AsynchronousOpen, // BOOL
IntPtr SessionHandle // DWORD* optional, out
);<DllImport("winbio.dll", ExactSpelling:=True)>
Public Shared Function WinBioAsyncOpenSession(
Factor As UInteger, ' DWORD
PoolType As UInteger, ' WINBIO_POOL
Flags As UInteger, ' DWORD
UnitArray As IntPtr, ' DWORD* optional
UnitCount As UIntPtr, ' UINT_PTR optional
DatabaseId As IntPtr, ' GUID* optional
NotificationMethod As Integer, ' WINBIO_ASYNC_NOTIFICATION_METHOD
TargetWindow As IntPtr, ' HWND optional
MessageCode As UInteger, ' DWORD optional
CallbackRoutine As IntPtr, ' PWINBIO_ASYNC_COMPLETION_CALLBACK optional
UserData As IntPtr, ' void* optional
AsynchronousOpen As Boolean, ' BOOL
SessionHandle As IntPtr ' DWORD* optional, out
) As Integer
End Function' Factor : DWORD
' PoolType : WINBIO_POOL
' Flags : DWORD
' UnitArray : DWORD* optional
' UnitCount : UINT_PTR optional
' DatabaseId : GUID* optional
' NotificationMethod : WINBIO_ASYNC_NOTIFICATION_METHOD
' TargetWindow : HWND optional
' MessageCode : DWORD optional
' CallbackRoutine : PWINBIO_ASYNC_COMPLETION_CALLBACK optional
' UserData : void* optional
' AsynchronousOpen : BOOL
' SessionHandle : DWORD* optional, out
Declare PtrSafe Function WinBioAsyncOpenSession Lib "winbio" ( _
ByVal Factor As Long, _
ByVal PoolType As Long, _
ByVal Flags As Long, _
ByVal UnitArray As LongPtr, _
ByVal UnitCount As LongPtr, _
ByVal DatabaseId As LongPtr, _
ByVal NotificationMethod As Long, _
ByVal TargetWindow As LongPtr, _
ByVal MessageCode As Long, _
ByVal CallbackRoutine As LongPtr, _
ByVal UserData As LongPtr, _
ByVal AsynchronousOpen As Long, _
ByVal SessionHandle As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
WinBioAsyncOpenSession = ctypes.windll.winbio.WinBioAsyncOpenSession
WinBioAsyncOpenSession.restype = ctypes.c_int
WinBioAsyncOpenSession.argtypes = [
wintypes.DWORD, # Factor : DWORD
wintypes.DWORD, # PoolType : WINBIO_POOL
wintypes.DWORD, # Flags : DWORD
ctypes.POINTER(wintypes.DWORD), # UnitArray : DWORD* optional
ctypes.c_size_t, # UnitCount : UINT_PTR optional
ctypes.c_void_p, # DatabaseId : GUID* optional
ctypes.c_int, # NotificationMethod : WINBIO_ASYNC_NOTIFICATION_METHOD
wintypes.HANDLE, # TargetWindow : HWND optional
wintypes.DWORD, # MessageCode : DWORD optional
ctypes.c_void_p, # CallbackRoutine : PWINBIO_ASYNC_COMPLETION_CALLBACK optional
ctypes.POINTER(None), # UserData : void* optional
wintypes.BOOL, # AsynchronousOpen : BOOL
ctypes.POINTER(wintypes.DWORD), # SessionHandle : DWORD* optional, out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('winbio.dll')
WinBioAsyncOpenSession = Fiddle::Function.new(
lib['WinBioAsyncOpenSession'],
[
-Fiddle::TYPE_INT, # Factor : DWORD
-Fiddle::TYPE_INT, # PoolType : WINBIO_POOL
-Fiddle::TYPE_INT, # Flags : DWORD
Fiddle::TYPE_VOIDP, # UnitArray : DWORD* optional
Fiddle::TYPE_UINTPTR_T, # UnitCount : UINT_PTR optional
Fiddle::TYPE_VOIDP, # DatabaseId : GUID* optional
Fiddle::TYPE_INT, # NotificationMethod : WINBIO_ASYNC_NOTIFICATION_METHOD
Fiddle::TYPE_VOIDP, # TargetWindow : HWND optional
-Fiddle::TYPE_INT, # MessageCode : DWORD optional
Fiddle::TYPE_VOIDP, # CallbackRoutine : PWINBIO_ASYNC_COMPLETION_CALLBACK optional
Fiddle::TYPE_VOIDP, # UserData : void* optional
Fiddle::TYPE_INT, # AsynchronousOpen : BOOL
Fiddle::TYPE_VOIDP, # SessionHandle : DWORD* optional, out
],
Fiddle::TYPE_INT)#[link(name = "winbio")]
extern "system" {
fn WinBioAsyncOpenSession(
Factor: u32, // DWORD
PoolType: u32, // WINBIO_POOL
Flags: u32, // DWORD
UnitArray: *mut u32, // DWORD* optional
UnitCount: usize, // UINT_PTR optional
DatabaseId: *mut GUID, // GUID* optional
NotificationMethod: i32, // WINBIO_ASYNC_NOTIFICATION_METHOD
TargetWindow: *mut core::ffi::c_void, // HWND optional
MessageCode: u32, // DWORD optional
CallbackRoutine: *const core::ffi::c_void, // PWINBIO_ASYNC_COMPLETION_CALLBACK optional
UserData: *mut (), // void* optional
AsynchronousOpen: i32, // BOOL
SessionHandle: *mut u32 // DWORD* optional, out
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("winbio.dll")]
public static extern int WinBioAsyncOpenSession(uint Factor, uint PoolType, uint Flags, IntPtr UnitArray, UIntPtr UnitCount, IntPtr DatabaseId, int NotificationMethod, IntPtr TargetWindow, uint MessageCode, IntPtr CallbackRoutine, IntPtr UserData, bool AsynchronousOpen, IntPtr SessionHandle);
"@
$api = Add-Type -MemberDefinition $sig -Name 'winbio_WinBioAsyncOpenSession' -Namespace Win32 -PassThru
# $api::WinBioAsyncOpenSession(Factor, PoolType, Flags, UnitArray, UnitCount, DatabaseId, NotificationMethod, TargetWindow, MessageCode, CallbackRoutine, UserData, AsynchronousOpen, SessionHandle)#uselib "winbio.dll"
#func global WinBioAsyncOpenSession "WinBioAsyncOpenSession" sptr, sptr, sptr, sptr, sptr, sptr, sptr, sptr, sptr, sptr, sptr, sptr, sptr
; WinBioAsyncOpenSession Factor, PoolType, Flags, varptr(UnitArray), UnitCount, varptr(DatabaseId), NotificationMethod, TargetWindow, MessageCode, CallbackRoutine, UserData, AsynchronousOpen, varptr(SessionHandle) ; 戻り値は stat
; Factor : DWORD -> "sptr"
; PoolType : WINBIO_POOL -> "sptr"
; Flags : DWORD -> "sptr"
; UnitArray : DWORD* optional -> "sptr"
; UnitCount : UINT_PTR optional -> "sptr"
; DatabaseId : GUID* optional -> "sptr"
; NotificationMethod : WINBIO_ASYNC_NOTIFICATION_METHOD -> "sptr"
; TargetWindow : HWND optional -> "sptr"
; MessageCode : DWORD optional -> "sptr"
; CallbackRoutine : PWINBIO_ASYNC_COMPLETION_CALLBACK optional -> "sptr"
; UserData : void* optional -> "sptr"
; AsynchronousOpen : BOOL -> "sptr"
; SessionHandle : DWORD* optional, out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "winbio.dll" #cfunc global WinBioAsyncOpenSession "WinBioAsyncOpenSession" int, int, int, var, sptr, var, int, sptr, int, sptr, sptr, int, var ; res = WinBioAsyncOpenSession(Factor, PoolType, Flags, UnitArray, UnitCount, DatabaseId, NotificationMethod, TargetWindow, MessageCode, CallbackRoutine, UserData, AsynchronousOpen, SessionHandle) ; Factor : DWORD -> "int" ; PoolType : WINBIO_POOL -> "int" ; Flags : DWORD -> "int" ; UnitArray : DWORD* optional -> "var" ; UnitCount : UINT_PTR optional -> "sptr" ; DatabaseId : GUID* optional -> "var" ; NotificationMethod : WINBIO_ASYNC_NOTIFICATION_METHOD -> "int" ; TargetWindow : HWND optional -> "sptr" ; MessageCode : DWORD optional -> "int" ; CallbackRoutine : PWINBIO_ASYNC_COMPLETION_CALLBACK optional -> "sptr" ; UserData : void* optional -> "sptr" ; AsynchronousOpen : BOOL -> "int" ; SessionHandle : DWORD* optional, out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。#uselib "winbio.dll" #cfunc global WinBioAsyncOpenSession "WinBioAsyncOpenSession" int, int, int, sptr, sptr, sptr, int, sptr, int, sptr, sptr, int, sptr ; res = WinBioAsyncOpenSession(Factor, PoolType, Flags, varptr(UnitArray), UnitCount, varptr(DatabaseId), NotificationMethod, TargetWindow, MessageCode, CallbackRoutine, UserData, AsynchronousOpen, varptr(SessionHandle)) ; Factor : DWORD -> "int" ; PoolType : WINBIO_POOL -> "int" ; Flags : DWORD -> "int" ; UnitArray : DWORD* optional -> "sptr" ; UnitCount : UINT_PTR optional -> "sptr" ; DatabaseId : GUID* optional -> "sptr" ; NotificationMethod : WINBIO_ASYNC_NOTIFICATION_METHOD -> "int" ; TargetWindow : HWND optional -> "sptr" ; MessageCode : DWORD optional -> "int" ; CallbackRoutine : PWINBIO_ASYNC_COMPLETION_CALLBACK optional -> "sptr" ; UserData : void* optional -> "sptr" ; AsynchronousOpen : BOOL -> "int" ; SessionHandle : DWORD* optional, out -> "sptr" ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
; HRESULT WinBioAsyncOpenSession(DWORD Factor, WINBIO_POOL PoolType, DWORD Flags, DWORD* UnitArray, UINT_PTR UnitCount, GUID* DatabaseId, WINBIO_ASYNC_NOTIFICATION_METHOD NotificationMethod, HWND TargetWindow, DWORD MessageCode, PWINBIO_ASYNC_COMPLETION_CALLBACK CallbackRoutine, void* UserData, BOOL AsynchronousOpen, DWORD* SessionHandle) #uselib "winbio.dll" #cfunc global WinBioAsyncOpenSession "WinBioAsyncOpenSession" int, int, int, var, intptr, var, int, intptr, int, intptr, intptr, int, var ; res = WinBioAsyncOpenSession(Factor, PoolType, Flags, UnitArray, UnitCount, DatabaseId, NotificationMethod, TargetWindow, MessageCode, CallbackRoutine, UserData, AsynchronousOpen, SessionHandle) ; Factor : DWORD -> "int" ; PoolType : WINBIO_POOL -> "int" ; Flags : DWORD -> "int" ; UnitArray : DWORD* optional -> "var" ; UnitCount : UINT_PTR optional -> "intptr" ; DatabaseId : GUID* optional -> "var" ; NotificationMethod : WINBIO_ASYNC_NOTIFICATION_METHOD -> "int" ; TargetWindow : HWND optional -> "intptr" ; MessageCode : DWORD optional -> "int" ; CallbackRoutine : PWINBIO_ASYNC_COMPLETION_CALLBACK optional -> "intptr" ; UserData : void* optional -> "intptr" ; AsynchronousOpen : BOOL -> "int" ; SessionHandle : DWORD* optional, out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。; HRESULT WinBioAsyncOpenSession(DWORD Factor, WINBIO_POOL PoolType, DWORD Flags, DWORD* UnitArray, UINT_PTR UnitCount, GUID* DatabaseId, WINBIO_ASYNC_NOTIFICATION_METHOD NotificationMethod, HWND TargetWindow, DWORD MessageCode, PWINBIO_ASYNC_COMPLETION_CALLBACK CallbackRoutine, void* UserData, BOOL AsynchronousOpen, DWORD* SessionHandle) #uselib "winbio.dll" #cfunc global WinBioAsyncOpenSession "WinBioAsyncOpenSession" int, int, int, intptr, intptr, intptr, int, intptr, int, intptr, intptr, int, intptr ; res = WinBioAsyncOpenSession(Factor, PoolType, Flags, varptr(UnitArray), UnitCount, varptr(DatabaseId), NotificationMethod, TargetWindow, MessageCode, CallbackRoutine, UserData, AsynchronousOpen, varptr(SessionHandle)) ; Factor : DWORD -> "int" ; PoolType : WINBIO_POOL -> "int" ; Flags : DWORD -> "int" ; UnitArray : DWORD* optional -> "intptr" ; UnitCount : UINT_PTR optional -> "intptr" ; DatabaseId : GUID* optional -> "intptr" ; NotificationMethod : WINBIO_ASYNC_NOTIFICATION_METHOD -> "int" ; TargetWindow : HWND optional -> "intptr" ; MessageCode : DWORD optional -> "int" ; CallbackRoutine : PWINBIO_ASYNC_COMPLETION_CALLBACK optional -> "intptr" ; UserData : void* optional -> "intptr" ; AsynchronousOpen : BOOL -> "int" ; SessionHandle : DWORD* optional, out -> "intptr" ; ※出力/バッファ引数はポインタ方式(token=intptr / 呼び出しは varptr(変数))。
import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
winbio = windows.NewLazySystemDLL("winbio.dll")
procWinBioAsyncOpenSession = winbio.NewProc("WinBioAsyncOpenSession")
)
// Factor (DWORD), PoolType (WINBIO_POOL), Flags (DWORD), UnitArray (DWORD* optional), UnitCount (UINT_PTR optional), DatabaseId (GUID* optional), NotificationMethod (WINBIO_ASYNC_NOTIFICATION_METHOD), TargetWindow (HWND optional), MessageCode (DWORD optional), CallbackRoutine (PWINBIO_ASYNC_COMPLETION_CALLBACK optional), UserData (void* optional), AsynchronousOpen (BOOL), SessionHandle (DWORD* optional, out)
r1, _, err := procWinBioAsyncOpenSession.Call(
uintptr(Factor),
uintptr(PoolType),
uintptr(Flags),
uintptr(UnitArray),
uintptr(UnitCount),
uintptr(DatabaseId),
uintptr(NotificationMethod),
uintptr(TargetWindow),
uintptr(MessageCode),
uintptr(CallbackRoutine),
uintptr(UserData),
uintptr(AsynchronousOpen),
uintptr(SessionHandle),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // HRESULTfunction WinBioAsyncOpenSession(
Factor: DWORD; // DWORD
PoolType: DWORD; // WINBIO_POOL
Flags: DWORD; // DWORD
UnitArray: Pointer; // DWORD* optional
UnitCount: NativeUInt; // UINT_PTR optional
DatabaseId: PGUID; // GUID* optional
NotificationMethod: Integer; // WINBIO_ASYNC_NOTIFICATION_METHOD
TargetWindow: THandle; // HWND optional
MessageCode: DWORD; // DWORD optional
CallbackRoutine: Pointer; // PWINBIO_ASYNC_COMPLETION_CALLBACK optional
UserData: Pointer; // void* optional
AsynchronousOpen: BOOL; // BOOL
SessionHandle: Pointer // DWORD* optional, out
): Integer; stdcall;
external 'winbio.dll' name 'WinBioAsyncOpenSession';result := DllCall("winbio\WinBioAsyncOpenSession"
, "UInt", Factor ; DWORD
, "UInt", PoolType ; WINBIO_POOL
, "UInt", Flags ; DWORD
, "Ptr", UnitArray ; DWORD* optional
, "UPtr", UnitCount ; UINT_PTR optional
, "Ptr", DatabaseId ; GUID* optional
, "Int", NotificationMethod ; WINBIO_ASYNC_NOTIFICATION_METHOD
, "Ptr", TargetWindow ; HWND optional
, "UInt", MessageCode ; DWORD optional
, "Ptr", CallbackRoutine ; PWINBIO_ASYNC_COMPLETION_CALLBACK optional
, "Ptr", UserData ; void* optional
, "Int", AsynchronousOpen ; BOOL
, "Ptr", SessionHandle ; DWORD* optional, out
, "Int") ; return: HRESULT●WinBioAsyncOpenSession(Factor, PoolType, Flags, UnitArray, UnitCount, DatabaseId, NotificationMethod, TargetWindow, MessageCode, CallbackRoutine, UserData, AsynchronousOpen, SessionHandle) = DLL("winbio.dll", "int WinBioAsyncOpenSession(dword, dword, dword, void*, int, void*, int, void*, dword, void*, void*, bool, void*)")
# 呼び出し: WinBioAsyncOpenSession(Factor, PoolType, Flags, UnitArray, UnitCount, DatabaseId, NotificationMethod, TargetWindow, MessageCode, CallbackRoutine, UserData, AsynchronousOpen, SessionHandle)
# Factor : DWORD -> "dword"
# PoolType : WINBIO_POOL -> "dword"
# Flags : DWORD -> "dword"
# UnitArray : DWORD* optional -> "void*"
# UnitCount : UINT_PTR optional -> "int"
# DatabaseId : GUID* optional -> "void*"
# NotificationMethod : WINBIO_ASYNC_NOTIFICATION_METHOD -> "int"
# TargetWindow : HWND optional -> "void*"
# MessageCode : DWORD optional -> "dword"
# CallbackRoutine : PWINBIO_ASYNC_COMPLETION_CALLBACK optional -> "void*"
# UserData : void* optional -> "void*"
# AsynchronousOpen : BOOL -> "bool"
# SessionHandle : DWORD* optional, out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。const std = @import("std");
extern "winbio" fn WinBioAsyncOpenSession(
Factor: u32, // DWORD
PoolType: u32, // WINBIO_POOL
Flags: u32, // DWORD
UnitArray: [*c]u32, // DWORD* optional
UnitCount: usize, // UINT_PTR optional
DatabaseId: [*c]GUID, // GUID* optional
NotificationMethod: i32, // WINBIO_ASYNC_NOTIFICATION_METHOD
TargetWindow: ?*anyopaque, // HWND optional
MessageCode: u32, // DWORD optional
CallbackRoutine: ?*anyopaque, // PWINBIO_ASYNC_COMPLETION_CALLBACK optional
UserData: ?*anyopaque, // void* optional
AsynchronousOpen: i32, // BOOL
SessionHandle: [*c]u32 // DWORD* optional, out
) callconv(std.os.windows.WINAPI) i32;proc WinBioAsyncOpenSession(
Factor: uint32, # DWORD
PoolType: uint32, # WINBIO_POOL
Flags: uint32, # DWORD
UnitArray: ptr uint32, # DWORD* optional
UnitCount: uint, # UINT_PTR optional
DatabaseId: ptr GUID, # GUID* optional
NotificationMethod: int32, # WINBIO_ASYNC_NOTIFICATION_METHOD
TargetWindow: pointer, # HWND optional
MessageCode: uint32, # DWORD optional
CallbackRoutine: pointer, # PWINBIO_ASYNC_COMPLETION_CALLBACK optional
UserData: pointer, # void* optional
AsynchronousOpen: int32, # BOOL
SessionHandle: ptr uint32 # DWORD* optional, out
): int32 {.importc: "WinBioAsyncOpenSession", stdcall, dynlib: "winbio.dll".}pragma(lib, "winbio");
extern(Windows)
int WinBioAsyncOpenSession(
uint Factor, // DWORD
uint PoolType, // WINBIO_POOL
uint Flags, // DWORD
uint* UnitArray, // DWORD* optional
size_t UnitCount, // UINT_PTR optional
GUID* DatabaseId, // GUID* optional
int NotificationMethod, // WINBIO_ASYNC_NOTIFICATION_METHOD
void* TargetWindow, // HWND optional
uint MessageCode, // DWORD optional
void* CallbackRoutine, // PWINBIO_ASYNC_COMPLETION_CALLBACK optional
void* UserData, // void* optional
int AsynchronousOpen, // BOOL
uint* SessionHandle // DWORD* optional, out
);ccall((:WinBioAsyncOpenSession, "winbio.dll"), stdcall, Int32,
(UInt32, UInt32, UInt32, Ptr{UInt32}, Csize_t, Ptr{GUID}, Int32, Ptr{Cvoid}, UInt32, Ptr{Cvoid}, Ptr{Cvoid}, Int32, Ptr{UInt32}),
Factor, PoolType, Flags, UnitArray, UnitCount, DatabaseId, NotificationMethod, TargetWindow, MessageCode, CallbackRoutine, UserData, AsynchronousOpen, SessionHandle)
# Factor : DWORD -> UInt32
# PoolType : WINBIO_POOL -> UInt32
# Flags : DWORD -> UInt32
# UnitArray : DWORD* optional -> Ptr{UInt32}
# UnitCount : UINT_PTR optional -> Csize_t
# DatabaseId : GUID* optional -> Ptr{GUID}
# NotificationMethod : WINBIO_ASYNC_NOTIFICATION_METHOD -> Int32
# TargetWindow : HWND optional -> Ptr{Cvoid}
# MessageCode : DWORD optional -> UInt32
# CallbackRoutine : PWINBIO_ASYNC_COMPLETION_CALLBACK optional -> Ptr{Cvoid}
# UserData : void* optional -> Ptr{Cvoid}
# AsynchronousOpen : BOOL -> Int32
# SessionHandle : DWORD* optional, out -> Ptr{UInt32}
# stdcall は 32bit のみ意味を持つ(x64 では無視)。local ffi = require("ffi")
ffi.cdef[[
int32_t WinBioAsyncOpenSession(
uint32_t Factor,
uint32_t PoolType,
uint32_t Flags,
uint32_t* UnitArray,
uintptr_t UnitCount,
void* DatabaseId,
int32_t NotificationMethod,
void* TargetWindow,
uint32_t MessageCode,
void* CallbackRoutine,
void* UserData,
int32_t AsynchronousOpen,
uint32_t* SessionHandle);
]]
local winbio = ffi.load("winbio")
-- winbio.WinBioAsyncOpenSession(Factor, PoolType, Flags, UnitArray, UnitCount, DatabaseId, NotificationMethod, TargetWindow, MessageCode, CallbackRoutine, UserData, AsynchronousOpen, SessionHandle)
-- Factor : DWORD
-- PoolType : WINBIO_POOL
-- Flags : DWORD
-- UnitArray : DWORD* optional
-- UnitCount : UINT_PTR optional
-- DatabaseId : GUID* optional
-- NotificationMethod : WINBIO_ASYNC_NOTIFICATION_METHOD
-- TargetWindow : HWND optional
-- MessageCode : DWORD optional
-- CallbackRoutine : PWINBIO_ASYNC_COMPLETION_CALLBACK optional
-- UserData : void* optional
-- AsynchronousOpen : BOOL
-- SessionHandle : DWORD* optional, out
-- 構造体/GUIDへのポインタは cdef が通るよう void* で表記(実型は各引数コメント参照)。値渡し構造体・enum は対応する typedef を cdef に追加すること。const koffi = require('koffi');
const lib = koffi.load('winbio.dll');
const WinBioAsyncOpenSession = lib.func('__stdcall', 'WinBioAsyncOpenSession', 'int32_t', ['uint32_t', 'uint32_t', 'uint32_t', 'uint32_t *', 'uintptr_t', 'void *', 'int32_t', 'void *', 'uint32_t', 'void *', 'void *', 'int32_t', 'uint32_t *']);
// WinBioAsyncOpenSession(Factor, PoolType, Flags, UnitArray, UnitCount, DatabaseId, NotificationMethod, TargetWindow, MessageCode, CallbackRoutine, UserData, AsynchronousOpen, SessionHandle)
// Factor : DWORD -> 'uint32_t'
// PoolType : WINBIO_POOL -> 'uint32_t'
// Flags : DWORD -> 'uint32_t'
// UnitArray : DWORD* optional -> 'uint32_t *'
// UnitCount : UINT_PTR optional -> 'uintptr_t'
// DatabaseId : GUID* optional -> 'void *'
// NotificationMethod : WINBIO_ASYNC_NOTIFICATION_METHOD -> 'int32_t'
// TargetWindow : HWND optional -> 'void *'
// MessageCode : DWORD optional -> 'uint32_t'
// CallbackRoutine : PWINBIO_ASYNC_COMPLETION_CALLBACK optional -> 'void *'
// UserData : void* optional -> 'void *'
// AsynchronousOpen : BOOL -> 'int32_t'
// SessionHandle : DWORD* optional, out -> 'uint32_t *'
// 出力ポインタは koffi.out(...) で包む。構造体は koffi.struct で定義。
// コールバック(関数ポインタ)は koffi.proto/koffi.register で型を定義して渡す(素の void* では JS 関数を渡せない)。const lib = Deno.dlopen("winbio.dll", {
WinBioAsyncOpenSession: { parameters: ["u32", "u32", "u32", "pointer", "usize", "pointer", "i32", "pointer", "u32", "pointer", "pointer", "i32", "pointer"], result: "i32" },
});
// lib.symbols.WinBioAsyncOpenSession(Factor, PoolType, Flags, UnitArray, UnitCount, DatabaseId, NotificationMethod, TargetWindow, MessageCode, CallbackRoutine, UserData, AsynchronousOpen, SessionHandle)
// Factor : DWORD -> "u32"
// PoolType : WINBIO_POOL -> "u32"
// Flags : DWORD -> "u32"
// UnitArray : DWORD* optional -> "pointer"
// UnitCount : UINT_PTR optional -> "usize"
// DatabaseId : GUID* optional -> "pointer"
// NotificationMethod : WINBIO_ASYNC_NOTIFICATION_METHOD -> "i32"
// TargetWindow : HWND optional -> "pointer"
// MessageCode : DWORD optional -> "u32"
// CallbackRoutine : PWINBIO_ASYNC_COMPLETION_CALLBACK optional -> "pointer"
// UserData : void* optional -> "pointer"
// AsynchronousOpen : BOOL -> "i32"
// SessionHandle : DWORD* optional, out -> "pointer"
// 文字列引数は "buffer"(NUL 終端のバイト列を Uint8Array で渡す)。
// 値渡し構造体は { struct: [ ...field types... ] } を使用。<?php
$ffi = FFI::cdef(<<<C
int32_t WinBioAsyncOpenSession(
uint32_t Factor,
uint32_t PoolType,
uint32_t Flags,
uint32_t* UnitArray,
size_t UnitCount,
void* DatabaseId,
int32_t NotificationMethod,
void* TargetWindow,
uint32_t MessageCode,
void* CallbackRoutine,
void* UserData,
int32_t AsynchronousOpen,
uint32_t* SessionHandle);
C, "winbio.dll");
// $ffi->WinBioAsyncOpenSession(Factor, PoolType, Flags, UnitArray, UnitCount, DatabaseId, NotificationMethod, TargetWindow, MessageCode, CallbackRoutine, UserData, AsynchronousOpen, SessionHandle);
// Factor : DWORD
// PoolType : WINBIO_POOL
// Flags : DWORD
// UnitArray : DWORD* optional
// UnitCount : UINT_PTR optional
// DatabaseId : GUID* optional
// NotificationMethod : WINBIO_ASYNC_NOTIFICATION_METHOD
// TargetWindow : HWND optional
// MessageCode : DWORD optional
// CallbackRoutine : PWINBIO_ASYNC_COMPLETION_CALLBACK optional
// UserData : void* optional
// AsynchronousOpen : BOOL
// SessionHandle : DWORD* optional, out
// 構造体/GUIDへのポインタは cdef が通るよう void* で表記(実型は各引数コメント参照)。値渡し構造体・enum は対応する typedef を cdef に追加すること。
// WINAPI(stdcall): x64 では呼出規約が統一されるため問題なし。x86 では __stdcall 対応のラッパが必要な場合あり。import com.sun.jna.*;
import com.sun.jna.ptr.*;
import com.sun.jna.win32.StdCallLibrary;
import com.sun.jna.win32.W32APIOptions;
public interface Winbio extends StdCallLibrary {
Winbio INSTANCE = Native.load("winbio", Winbio.class);
int WinBioAsyncOpenSession(
int Factor, // DWORD
int PoolType, // WINBIO_POOL
int Flags, // DWORD
IntByReference UnitArray, // DWORD* optional
long UnitCount, // UINT_PTR optional
Pointer DatabaseId, // GUID* optional
int NotificationMethod, // WINBIO_ASYNC_NOTIFICATION_METHOD
Pointer TargetWindow, // HWND optional
int MessageCode, // DWORD optional
Callback CallbackRoutine, // PWINBIO_ASYNC_COMPLETION_CALLBACK optional
Pointer UserData, // void* optional
boolean AsynchronousOpen, // BOOL
IntByReference SessionHandle // DWORD* optional, out
);
}@[Link("winbio")]
lib Libwinbio
fun WinBioAsyncOpenSession = WinBioAsyncOpenSession(
Factor : UInt32, # DWORD
PoolType : UInt32, # WINBIO_POOL
Flags : UInt32, # DWORD
UnitArray : UInt32*, # DWORD* optional
UnitCount : LibC::SizeT, # UINT_PTR optional
DatabaseId : GUID*, # GUID* optional
NotificationMethod : Int32, # WINBIO_ASYNC_NOTIFICATION_METHOD
TargetWindow : Void*, # HWND optional
MessageCode : UInt32, # DWORD optional
CallbackRoutine : Void*, # PWINBIO_ASYNC_COMPLETION_CALLBACK optional
UserData : Void*, # void* optional
AsynchronousOpen : Int32, # BOOL
SessionHandle : UInt32* # DWORD* optional, out
) : Int32
end
# 構造体/GUID/enum は lib 内に対応する型定義が必要。
# 呼出規約: x64 は規約統一のため OK。x86(32bit)は WINAPI=stdcall だが Crystal の fun に stdcall 付与構文がなく非対応。import 'dart:ffi';
import 'package:ffi/ffi.dart';
typedef WinBioAsyncOpenSessionNative = Int32 Function(Uint32, Uint32, Uint32, Pointer<Uint32>, UintPtr, Pointer<Void>, Int32, Pointer<Void>, Uint32, Pointer<Void>, Pointer<Void>, Int32, Pointer<Uint32>);
typedef WinBioAsyncOpenSessionDart = int Function(int, int, int, Pointer<Uint32>, int, Pointer<Void>, int, Pointer<Void>, int, Pointer<Void>, Pointer<Void>, int, Pointer<Uint32>);
final WinBioAsyncOpenSession = DynamicLibrary.open('winbio.dll')
.lookupFunction<WinBioAsyncOpenSessionNative, WinBioAsyncOpenSessionDart>('WinBioAsyncOpenSession');
// Factor : DWORD -> Uint32
// PoolType : WINBIO_POOL -> Uint32
// Flags : DWORD -> Uint32
// UnitArray : DWORD* optional -> Pointer<Uint32>
// UnitCount : UINT_PTR optional -> UintPtr
// DatabaseId : GUID* optional -> Pointer<Void>
// NotificationMethod : WINBIO_ASYNC_NOTIFICATION_METHOD -> Int32
// TargetWindow : HWND optional -> Pointer<Void>
// MessageCode : DWORD optional -> Uint32
// CallbackRoutine : PWINBIO_ASYNC_COMPLETION_CALLBACK optional -> Pointer<Void>
// UserData : void* optional -> Pointer<Void>
// AsynchronousOpen : BOOL -> Int32
// SessionHandle : DWORD* optional, out -> Pointer<Uint32>
// 文字列は package:ffi の "...".toNativeUtf16()/toNativeUtf8() で変換。{$mode objfpc}{$H+}
function WinBioAsyncOpenSession(
Factor: DWORD; // DWORD
PoolType: DWORD; // WINBIO_POOL
Flags: DWORD; // DWORD
UnitArray: Pointer; // DWORD* optional
UnitCount: NativeUInt; // UINT_PTR optional
DatabaseId: PGUID; // GUID* optional
NotificationMethod: Integer; // WINBIO_ASYNC_NOTIFICATION_METHOD
TargetWindow: THandle; // HWND optional
MessageCode: DWORD; // DWORD optional
CallbackRoutine: Pointer; // PWINBIO_ASYNC_COMPLETION_CALLBACK optional
UserData: Pointer; // void* optional
AsynchronousOpen: BOOL; // BOOL
SessionHandle: Pointer // DWORD* optional, out
): Integer; stdcall;
external 'winbio.dll' name 'WinBioAsyncOpenSession';import Foreign
import Foreign.C.Types
import Foreign.C.String
foreign import stdcall safe "WinBioAsyncOpenSession"
c_WinBioAsyncOpenSession :: Word32 -> Word32 -> Word32 -> Ptr Word32 -> CUIntPtr -> Ptr () -> Int32 -> Ptr () -> Word32 -> Ptr () -> Ptr () -> CInt -> Ptr Word32 -> IO Int32
-- Factor : DWORD -> Word32
-- PoolType : WINBIO_POOL -> Word32
-- Flags : DWORD -> Word32
-- UnitArray : DWORD* optional -> Ptr Word32
-- UnitCount : UINT_PTR optional -> CUIntPtr
-- DatabaseId : GUID* optional -> Ptr ()
-- NotificationMethod : WINBIO_ASYNC_NOTIFICATION_METHOD -> Int32
-- TargetWindow : HWND optional -> Ptr ()
-- MessageCode : DWORD optional -> Word32
-- CallbackRoutine : PWINBIO_ASYNC_COMPLETION_CALLBACK optional -> Ptr ()
-- UserData : void* optional -> Ptr ()
-- AsynchronousOpen : BOOL -> CInt
-- SessionHandle : DWORD* optional, out -> Ptr Word32
-- 要 GHC(Windows)。stdcall は x64 では ccall として扱われる。ブロックする API は safe 呼び出し推奨。open Ctypes
open Foreign
let winbioasyncopensession =
foreign "WinBioAsyncOpenSession"
(uint32_t @-> uint32_t @-> uint32_t @-> (ptr uint32_t) @-> size_t @-> (ptr void) @-> int32_t @-> (ptr void) @-> uint32_t @-> (ptr void) @-> (ptr void) @-> int32_t @-> (ptr uint32_t) @-> returning int32_t)
(* Factor : DWORD -> uint32_t *)
(* PoolType : WINBIO_POOL -> uint32_t *)
(* Flags : DWORD -> uint32_t *)
(* UnitArray : DWORD* optional -> (ptr uint32_t) *)
(* UnitCount : UINT_PTR optional -> size_t *)
(* DatabaseId : GUID* optional -> (ptr void) *)
(* NotificationMethod : WINBIO_ASYNC_NOTIFICATION_METHOD -> int32_t *)
(* TargetWindow : HWND optional -> (ptr void) *)
(* MessageCode : DWORD optional -> uint32_t *)
(* CallbackRoutine : PWINBIO_ASYNC_COMPLETION_CALLBACK optional -> (ptr void) *)
(* UserData : void* optional -> (ptr void) *)
(* AsynchronousOpen : BOOL -> int32_t *)
(* SessionHandle : DWORD* optional, out -> (ptr uint32_t) *)
(* foreign は cdecl 前提。x64 Windows では WINAPI と一致。構造体は ctypes structure を定義のこと。 *)(cffi:define-foreign-library winbio (t "winbio.dll"))
(cffi:use-foreign-library winbio)
(cffi:defcfun ("WinBioAsyncOpenSession" win-bio-async-open-session :convention :stdcall) :int32
(factor :uint32) ; DWORD
(pool-type :uint32) ; WINBIO_POOL
(flags :uint32) ; DWORD
(unit-array :pointer) ; DWORD* optional
(unit-count :uint64) ; UINT_PTR optional
(database-id :pointer) ; GUID* optional
(notification-method :int32) ; WINBIO_ASYNC_NOTIFICATION_METHOD
(target-window :pointer) ; HWND optional
(message-code :uint32) ; DWORD optional
(callback-routine :pointer) ; PWINBIO_ASYNC_COMPLETION_CALLBACK optional
(user-data :pointer) ; void* optional
(asynchronous-open :int32) ; BOOL
(session-handle :pointer)) ; DWORD* optional, out
; isize/usize(INT_PTR/SIZE_T)は x64 前提で :int64/:uint64。x86 では :int32/:uint32。use Win32::API;
my $WinBioAsyncOpenSession = Win32::API::More->new('winbio',
'int WinBioAsyncOpenSession(DWORD Factor, DWORD PoolType, DWORD Flags, LPVOID UnitArray, WPARAM UnitCount, LPVOID DatabaseId, int NotificationMethod, HANDLE TargetWindow, DWORD MessageCode, LPVOID CallbackRoutine, LPVOID UserData, BOOL AsynchronousOpen, LPVOID SessionHandle)');
# my $ret = $WinBioAsyncOpenSession->Call($Factor, $PoolType, $Flags, $UnitArray, $UnitCount, $DatabaseId, $NotificationMethod, $TargetWindow, $MessageCode, $CallbackRoutine, $UserData, $AsynchronousOpen, $SessionHandle);
# Factor : DWORD -> DWORD
# PoolType : WINBIO_POOL -> DWORD
# Flags : DWORD -> DWORD
# UnitArray : DWORD* optional -> LPVOID
# UnitCount : UINT_PTR optional -> WPARAM
# DatabaseId : GUID* optional -> LPVOID
# NotificationMethod : WINBIO_ASYNC_NOTIFICATION_METHOD -> int
# TargetWindow : HWND optional -> HANDLE
# MessageCode : DWORD optional -> DWORD
# CallbackRoutine : PWINBIO_ASYNC_COMPLETION_CALLBACK optional -> LPVOID
# UserData : void* optional -> LPVOID
# AsynchronousOpen : BOOL -> BOOL
# SessionHandle : DWORD* optional, out -> LPVOID
# 値渡し構造体は pack() した文字列、または Win32::API::Struct を使用。
# コールバック(関数ポインタ)は Perl sub を直接渡せません。Win32::API::Callback を使用してください。関連項目
- f WinBioAsyncOpenFramework — 生体認証フレームワークへの非同期接続ハンドルを開く。
- f WinBioCloseSession — 生体認証セッションを閉じる。
- f WinBioOpenSession — 生体認証操作用のセッションを開きハンドルを取得する。