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

WinBioGetEnabledSetting

関数
生体認証機能の有効化設定とその設定元を取得する。
DLLwinbio.dll呼出規約winapi対応OSWindows 7 以降

シグネチャ

// winbio.dll
#include <windows.h>

void WinBioGetEnabledSetting(
    BYTE* Value,
    WINBIO_SETTING_SOURCE* Source
);

パラメーター

名前方向
ValueBYTE*out
SourceWINBIO_SETTING_SOURCE*out

戻り値の型: void

各言語での呼び出し定義

// winbio.dll
#include <windows.h>

void WinBioGetEnabledSetting(
    BYTE* Value,
    WINBIO_SETTING_SOURCE* Source
);
[DllImport("winbio.dll", ExactSpelling = true)]
static extern void WinBioGetEnabledSetting(
    IntPtr Value,   // BYTE* out
    out uint Source   // WINBIO_SETTING_SOURCE* out
);
<DllImport("winbio.dll", ExactSpelling:=True)>
Public Shared Sub WinBioGetEnabledSetting(
    Value As IntPtr,   ' BYTE* out
    <Out> ByRef Source As UInteger   ' WINBIO_SETTING_SOURCE* out
)
End Sub
' Value : BYTE* out
' Source : WINBIO_SETTING_SOURCE* out
Declare PtrSafe Sub WinBioGetEnabledSetting Lib "winbio" ( _
    ByVal Value As LongPtr, _
    ByRef Source As Long)
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

WinBioGetEnabledSetting = ctypes.windll.winbio.WinBioGetEnabledSetting
WinBioGetEnabledSetting.restype = None
WinBioGetEnabledSetting.argtypes = [
    ctypes.POINTER(ctypes.c_ubyte),  # Value : BYTE* out
    ctypes.c_void_p,  # Source : WINBIO_SETTING_SOURCE* out
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('winbio.dll')
WinBioGetEnabledSetting = Fiddle::Function.new(
  lib['WinBioGetEnabledSetting'],
  [
    Fiddle::TYPE_VOIDP,  # Value : BYTE* out
    Fiddle::TYPE_VOIDP,  # Source : WINBIO_SETTING_SOURCE* out
  ],
  Fiddle::TYPE_VOID)
#[link(name = "winbio")]
extern "system" {
    fn WinBioGetEnabledSetting(
        Value: *mut u8,  // BYTE* out
        Source: *mut u32  // WINBIO_SETTING_SOURCE* out
    );
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("winbio.dll")]
public static extern void WinBioGetEnabledSetting(IntPtr Value, out uint Source);
"@
$api = Add-Type -MemberDefinition $sig -Name 'winbio_WinBioGetEnabledSetting' -Namespace Win32 -PassThru
# $api::WinBioGetEnabledSetting(Value, Source)
#uselib "winbio.dll"
#func global WinBioGetEnabledSetting "WinBioGetEnabledSetting" sptr, sptr
; WinBioGetEnabledSetting varptr(Value), Source
; Value : BYTE* out -> "sptr"
; Source : WINBIO_SETTING_SOURCE* out -> "sptr"
出力引数:
#uselib "winbio.dll"
#func global WinBioGetEnabledSetting "WinBioGetEnabledSetting" var, int
; WinBioGetEnabledSetting Value, Source
; Value : BYTE* out -> "var"
; Source : WINBIO_SETTING_SOURCE* out -> "int"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
出力引数:
; void WinBioGetEnabledSetting(BYTE* Value, WINBIO_SETTING_SOURCE* Source)
#uselib "winbio.dll"
#func global WinBioGetEnabledSetting "WinBioGetEnabledSetting" var, int
; WinBioGetEnabledSetting Value, Source
; Value : BYTE* out -> "var"
; Source : WINBIO_SETTING_SOURCE* out -> "int"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	winbio = windows.NewLazySystemDLL("winbio.dll")
	procWinBioGetEnabledSetting = winbio.NewProc("WinBioGetEnabledSetting")
)

// Value (BYTE* out), Source (WINBIO_SETTING_SOURCE* out)
r1, _, err := procWinBioGetEnabledSetting.Call(
	uintptr(Value),
	uintptr(Source),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // void
procedure WinBioGetEnabledSetting(
  Value: Pointer;   // BYTE* out
  Source: Pointer   // WINBIO_SETTING_SOURCE* out
); stdcall;
  external 'winbio.dll' name 'WinBioGetEnabledSetting';
result := DllCall("winbio\WinBioGetEnabledSetting"
    , "Ptr", Value   ; BYTE* out
    , "Ptr", Source   ; WINBIO_SETTING_SOURCE* out
    , "Int")   ; return: void
●WinBioGetEnabledSetting(Value, Source) = DLL("winbio.dll", "int WinBioGetEnabledSetting(void*, void*)")
# 呼び出し: WinBioGetEnabledSetting(Value, Source)
# Value : BYTE* out -> "void*"
# Source : WINBIO_SETTING_SOURCE* out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。