ホーム › Devices.BiometricFramework › WinBioEnumServiceProviders
WinBioEnumServiceProviders
関数指定した生体認証要素のサービスプロバイダ一覧を列挙する。
シグネチャ
// winbio.dll
#include <windows.h>
HRESULT WinBioEnumServiceProviders(
DWORD Factor,
WINBIO_BSP_SCHEMA** BspSchemaArray,
UINT_PTR* BspCount
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| Factor | DWORD | in |
| BspSchemaArray | WINBIO_BSP_SCHEMA** | out |
| BspCount | UINT_PTR* | out |
戻り値の型: HRESULT
各言語での呼び出し定義
// winbio.dll
#include <windows.h>
HRESULT WinBioEnumServiceProviders(
DWORD Factor,
WINBIO_BSP_SCHEMA** BspSchemaArray,
UINT_PTR* BspCount
);[DllImport("winbio.dll", ExactSpelling = true)]
static extern int WinBioEnumServiceProviders(
uint Factor, // DWORD
IntPtr BspSchemaArray, // WINBIO_BSP_SCHEMA** out
out UIntPtr BspCount // UINT_PTR* out
);<DllImport("winbio.dll", ExactSpelling:=True)>
Public Shared Function WinBioEnumServiceProviders(
Factor As UInteger, ' DWORD
BspSchemaArray As IntPtr, ' WINBIO_BSP_SCHEMA** out
<Out> ByRef BspCount As UIntPtr ' UINT_PTR* out
) As Integer
End Function' Factor : DWORD
' BspSchemaArray : WINBIO_BSP_SCHEMA** out
' BspCount : UINT_PTR* out
Declare PtrSafe Function WinBioEnumServiceProviders Lib "winbio" ( _
ByVal Factor As Long, _
ByVal BspSchemaArray As LongPtr, _
ByRef BspCount As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
WinBioEnumServiceProviders = ctypes.windll.winbio.WinBioEnumServiceProviders
WinBioEnumServiceProviders.restype = ctypes.c_int
WinBioEnumServiceProviders.argtypes = [
wintypes.DWORD, # Factor : DWORD
ctypes.c_void_p, # BspSchemaArray : WINBIO_BSP_SCHEMA** out
ctypes.POINTER(ctypes.c_size_t), # BspCount : UINT_PTR* out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('winbio.dll')
WinBioEnumServiceProviders = Fiddle::Function.new(
lib['WinBioEnumServiceProviders'],
[
-Fiddle::TYPE_INT, # Factor : DWORD
Fiddle::TYPE_VOIDP, # BspSchemaArray : WINBIO_BSP_SCHEMA** out
Fiddle::TYPE_VOIDP, # BspCount : UINT_PTR* out
],
Fiddle::TYPE_INT)#[link(name = "winbio")]
extern "system" {
fn WinBioEnumServiceProviders(
Factor: u32, // DWORD
BspSchemaArray: *mut *mut WINBIO_BSP_SCHEMA, // WINBIO_BSP_SCHEMA** out
BspCount: *mut usize // UINT_PTR* out
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("winbio.dll")]
public static extern int WinBioEnumServiceProviders(uint Factor, IntPtr BspSchemaArray, out UIntPtr BspCount);
"@
$api = Add-Type -MemberDefinition $sig -Name 'winbio_WinBioEnumServiceProviders' -Namespace Win32 -PassThru
# $api::WinBioEnumServiceProviders(Factor, BspSchemaArray, BspCount)#uselib "winbio.dll"
#func global WinBioEnumServiceProviders "WinBioEnumServiceProviders" sptr, sptr, sptr
; WinBioEnumServiceProviders Factor, varptr(BspSchemaArray), varptr(BspCount) ; 戻り値は stat
; Factor : DWORD -> "sptr"
; BspSchemaArray : WINBIO_BSP_SCHEMA** out -> "sptr"
; BspCount : UINT_PTR* out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。出力引数:
#uselib "winbio.dll" #cfunc global WinBioEnumServiceProviders "WinBioEnumServiceProviders" int, var, var ; res = WinBioEnumServiceProviders(Factor, BspSchemaArray, BspCount) ; Factor : DWORD -> "int" ; BspSchemaArray : WINBIO_BSP_SCHEMA** out -> "var" ; BspCount : UINT_PTR* out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。#uselib "winbio.dll" #cfunc global WinBioEnumServiceProviders "WinBioEnumServiceProviders" int, sptr, sptr ; res = WinBioEnumServiceProviders(Factor, varptr(BspSchemaArray), varptr(BspCount)) ; Factor : DWORD -> "int" ; BspSchemaArray : WINBIO_BSP_SCHEMA** out -> "sptr" ; BspCount : UINT_PTR* out -> "sptr" ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
出力引数:
; HRESULT WinBioEnumServiceProviders(DWORD Factor, WINBIO_BSP_SCHEMA** BspSchemaArray, UINT_PTR* BspCount) #uselib "winbio.dll" #cfunc global WinBioEnumServiceProviders "WinBioEnumServiceProviders" int, var, var ; res = WinBioEnumServiceProviders(Factor, BspSchemaArray, BspCount) ; Factor : DWORD -> "int" ; BspSchemaArray : WINBIO_BSP_SCHEMA** out -> "var" ; BspCount : UINT_PTR* out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。; HRESULT WinBioEnumServiceProviders(DWORD Factor, WINBIO_BSP_SCHEMA** BspSchemaArray, UINT_PTR* BspCount) #uselib "winbio.dll" #cfunc global WinBioEnumServiceProviders "WinBioEnumServiceProviders" int, intptr, intptr ; res = WinBioEnumServiceProviders(Factor, varptr(BspSchemaArray), varptr(BspCount)) ; Factor : DWORD -> "int" ; BspSchemaArray : WINBIO_BSP_SCHEMA** out -> "intptr" ; BspCount : UINT_PTR* out -> "intptr" ; ※出力/バッファ引数はポインタ方式(token=intptr / 呼び出しは varptr(変数))。
import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
winbio = windows.NewLazySystemDLL("winbio.dll")
procWinBioEnumServiceProviders = winbio.NewProc("WinBioEnumServiceProviders")
)
// Factor (DWORD), BspSchemaArray (WINBIO_BSP_SCHEMA** out), BspCount (UINT_PTR* out)
r1, _, err := procWinBioEnumServiceProviders.Call(
uintptr(Factor),
uintptr(BspSchemaArray),
uintptr(BspCount),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // HRESULTfunction WinBioEnumServiceProviders(
Factor: DWORD; // DWORD
BspSchemaArray: Pointer; // WINBIO_BSP_SCHEMA** out
BspCount: Pointer // UINT_PTR* out
): Integer; stdcall;
external 'winbio.dll' name 'WinBioEnumServiceProviders';result := DllCall("winbio\WinBioEnumServiceProviders"
, "UInt", Factor ; DWORD
, "Ptr", BspSchemaArray ; WINBIO_BSP_SCHEMA** out
, "Ptr", BspCount ; UINT_PTR* out
, "Int") ; return: HRESULT●WinBioEnumServiceProviders(Factor, BspSchemaArray, BspCount) = DLL("winbio.dll", "int WinBioEnumServiceProviders(dword, void*, void*)")
# 呼び出し: WinBioEnumServiceProviders(Factor, BspSchemaArray, BspCount)
# Factor : DWORD -> "dword"
# BspSchemaArray : WINBIO_BSP_SCHEMA** out -> "void*"
# BspCount : UINT_PTR* out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。