diff --git a/examples/FrameworkTester/DesignTimes/ChildWindowViewModel.cs b/examples/FrameworkTester/DesignTimes/ChildWindowViewModel.cs index 4176691..ce350bc 100644 --- a/examples/FrameworkTester/DesignTimes/ChildWindowViewModel.cs +++ b/examples/FrameworkTester/DesignTimes/ChildWindowViewModel.cs @@ -26,7 +26,18 @@ public RelayCommand ClearLogsCommand get; } - public ObservableCollection Logs + public ObservableCollection AsyncResultLogs + { + get; + } + + public AsyncResult SelectedAsyncResult + { + get; + set; + } + + public AsyncResultParameter SelectedAsyncResultParameter { get; } @@ -41,7 +52,7 @@ public int ApiStatus get; } - public OperationTypes OperationType + public OperationType OperationType { get; } diff --git a/examples/FrameworkTester/DesignTimes/WinBioCaptureSampleViewModel.cs b/examples/FrameworkTester/DesignTimes/WinBioCaptureSampleViewModel.cs index fdd0044..460c184 100644 --- a/examples/FrameworkTester/DesignTimes/WinBioCaptureSampleViewModel.cs +++ b/examples/FrameworkTester/DesignTimes/WinBioCaptureSampleViewModel.cs @@ -43,7 +43,7 @@ public int CaptureImageScanVerticalResolution get; } - public RejectDetails RejectDetail + public RejectDetail RejectDetail { get; } diff --git a/examples/FrameworkTester/DesignTimes/WinBioCaptureSampleWithCallbackViewModel.cs b/examples/FrameworkTester/DesignTimes/WinBioCaptureSampleWithCallbackViewModel.cs index bd9648e..a48f3ce 100644 --- a/examples/FrameworkTester/DesignTimes/WinBioCaptureSampleWithCallbackViewModel.cs +++ b/examples/FrameworkTester/DesignTimes/WinBioCaptureSampleWithCallbackViewModel.cs @@ -61,7 +61,7 @@ public bool Loop set; } - public RejectDetails RejectDetail + public RejectDetail RejectDetail { get; } diff --git a/examples/FrameworkTester/DesignTimes/WinBioEnrollCaptureViewModel.cs b/examples/FrameworkTester/DesignTimes/WinBioEnrollCaptureViewModel.cs index 8d29c1a..9223d56 100644 --- a/examples/FrameworkTester/DesignTimes/WinBioEnrollCaptureViewModel.cs +++ b/examples/FrameworkTester/DesignTimes/WinBioEnrollCaptureViewModel.cs @@ -7,7 +7,7 @@ namespace FrameworkTester.DesignTimes public sealed class WinBioEnrollCaptureViewModel : WinBioViewModel, IWinBioEnrollCaptureViewModel, IWinBioAsyncSessionViewModel { - public RejectDetails RejectDetail + public RejectDetail RejectDetail { get; } diff --git a/examples/FrameworkTester/DesignTimes/WinBioEnrollCaptureWithCallbackViewModel.cs b/examples/FrameworkTester/DesignTimes/WinBioEnrollCaptureWithCallbackViewModel.cs index 1991520..67605c9 100644 --- a/examples/FrameworkTester/DesignTimes/WinBioEnrollCaptureWithCallbackViewModel.cs +++ b/examples/FrameworkTester/DesignTimes/WinBioEnrollCaptureWithCallbackViewModel.cs @@ -19,7 +19,7 @@ public bool EnableWait set; } - public RejectDetails RejectDetail + public RejectDetail RejectDetail { get; } diff --git a/examples/FrameworkTester/DesignTimes/WinBioEnrollCommitViewModel.cs b/examples/FrameworkTester/DesignTimes/WinBioEnrollCommitViewModel.cs index 2fe1cc9..798247e 100644 --- a/examples/FrameworkTester/DesignTimes/WinBioEnrollCommitViewModel.cs +++ b/examples/FrameworkTester/DesignTimes/WinBioEnrollCommitViewModel.cs @@ -8,7 +8,7 @@ namespace FrameworkTester.DesignTimes public sealed class WinBioEnrollCommitViewModel : WinBioViewModel, IWinBioEnrollCommitViewModel, IWinBioAsyncSessionViewModel { - public IdentityTypes Type + public IdentityType Type { get; } diff --git a/examples/FrameworkTester/DesignTimes/WinBioGetCredentialStateViewModel.cs b/examples/FrameworkTester/DesignTimes/WinBioGetCredentialStateViewModel.cs index 17071db..7e936d4 100644 --- a/examples/FrameworkTester/DesignTimes/WinBioGetCredentialStateViewModel.cs +++ b/examples/FrameworkTester/DesignTimes/WinBioGetCredentialStateViewModel.cs @@ -12,7 +12,7 @@ public IBiometricIdentityRepositoryViewModel IdentityRepository get; } - public CredentialStates State + public CredentialState State { get; } diff --git a/examples/FrameworkTester/DesignTimes/WinBioGetDomainLogonSettingViewModel.cs b/examples/FrameworkTester/DesignTimes/WinBioGetDomainLogonSettingViewModel.cs index a5d8573..5523e6a 100644 --- a/examples/FrameworkTester/DesignTimes/WinBioGetDomainLogonSettingViewModel.cs +++ b/examples/FrameworkTester/DesignTimes/WinBioGetDomainLogonSettingViewModel.cs @@ -7,7 +7,7 @@ namespace FrameworkTester.DesignTimes public sealed class WinBioGetDomainLogonSettingViewModel : WinBioViewModel, IWinBioGetDomainLogonSettingViewModel { - public SettingSourceTypes Source + public SettingSourceType Source { get; } diff --git a/examples/FrameworkTester/DesignTimes/WinBioGetEnabledSettingViewModel.cs b/examples/FrameworkTester/DesignTimes/WinBioGetEnabledSettingViewModel.cs index 185f8b9..c665112 100644 --- a/examples/FrameworkTester/DesignTimes/WinBioGetEnabledSettingViewModel.cs +++ b/examples/FrameworkTester/DesignTimes/WinBioGetEnabledSettingViewModel.cs @@ -7,7 +7,7 @@ namespace FrameworkTester.DesignTimes public sealed class WinBioGetEnabledSettingViewModel : WinBioViewModel, IWinBioGetEnabledSettingViewModel { - public SettingSourceTypes Source + public SettingSourceType Source { get; } diff --git a/examples/FrameworkTester/DesignTimes/WinBioGetLogonSettingViewModel.cs b/examples/FrameworkTester/DesignTimes/WinBioGetLogonSettingViewModel.cs index a2d08aa..920ce2c 100644 --- a/examples/FrameworkTester/DesignTimes/WinBioGetLogonSettingViewModel.cs +++ b/examples/FrameworkTester/DesignTimes/WinBioGetLogonSettingViewModel.cs @@ -7,7 +7,7 @@ namespace FrameworkTester.DesignTimes public sealed class WinBioGetLogonSettingViewModel : WinBioViewModel, IWinBioGetLogonSettingViewModel { - public SettingSourceTypes Source + public SettingSourceType Source { get; } diff --git a/examples/FrameworkTester/DesignTimes/WinBioIdentifyViewModel.cs b/examples/FrameworkTester/DesignTimes/WinBioIdentifyViewModel.cs index 6c99a62..1831c45 100644 --- a/examples/FrameworkTester/DesignTimes/WinBioIdentifyViewModel.cs +++ b/examples/FrameworkTester/DesignTimes/WinBioIdentifyViewModel.cs @@ -18,7 +18,7 @@ public FingerPosition FingerPosition get; } - public RejectDetails RejectDetail + public RejectDetail RejectDetail { get; } @@ -38,7 +38,7 @@ public Guid TemplateGuid get; } - public IdentityTypes Type + public IdentityType Type { get; } diff --git a/examples/FrameworkTester/DesignTimes/WinBioIdentifyWithCallbackViewModel.cs b/examples/FrameworkTester/DesignTimes/WinBioIdentifyWithCallbackViewModel.cs index 30f8c21..642866a 100644 --- a/examples/FrameworkTester/DesignTimes/WinBioIdentifyWithCallbackViewModel.cs +++ b/examples/FrameworkTester/DesignTimes/WinBioIdentifyWithCallbackViewModel.cs @@ -30,7 +30,7 @@ public FingerPosition FingerPosition get; } - public RejectDetails RejectDetail + public RejectDetail RejectDetail { get; } @@ -50,7 +50,7 @@ public Guid TemplateGuid get; } - public IdentityTypes Type + public IdentityType Type { get; } diff --git a/examples/FrameworkTester/DesignTimes/WinBioVerifyViewModel.cs b/examples/FrameworkTester/DesignTimes/WinBioVerifyViewModel.cs index 898081b..387bcd7 100644 --- a/examples/FrameworkTester/DesignTimes/WinBioVerifyViewModel.cs +++ b/examples/FrameworkTester/DesignTimes/WinBioVerifyViewModel.cs @@ -13,7 +13,7 @@ public bool IsMatch get; } - public RejectDetails RejectDetail + public RejectDetail RejectDetail { get; } diff --git a/examples/FrameworkTester/DesignTimes/WinBioVerifyWithCallbackViewModel.cs b/examples/FrameworkTester/DesignTimes/WinBioVerifyWithCallbackViewModel.cs index 4a8aca1..a281c4b 100644 --- a/examples/FrameworkTester/DesignTimes/WinBioVerifyWithCallbackViewModel.cs +++ b/examples/FrameworkTester/DesignTimes/WinBioVerifyWithCallbackViewModel.cs @@ -25,7 +25,7 @@ public bool IsMatch get; } - public RejectDetails RejectDetail + public RejectDetail RejectDetail { get; } diff --git a/examples/FrameworkTester/FrameworkTester.csproj b/examples/FrameworkTester/FrameworkTester.csproj index 90a9055..5e7d468 100644 --- a/examples/FrameworkTester/FrameworkTester.csproj +++ b/examples/FrameworkTester/FrameworkTester.csproj @@ -118,6 +118,9 @@ + + + @@ -141,6 +144,7 @@ + diff --git a/examples/FrameworkTester/Selectors/ChildWindowLogTemplateSlector.cs b/examples/FrameworkTester/Selectors/ChildWindowLogTemplateSlector.cs new file mode 100644 index 0000000..ed0b914 --- /dev/null +++ b/examples/FrameworkTester/Selectors/ChildWindowLogTemplateSlector.cs @@ -0,0 +1,152 @@ +using System.Windows; +using System.Windows.Controls; +using FrameworkTester.ViewModels; +using WinBiometricDotNet; + +namespace FrameworkTester.Selectors +{ + + internal sealed class ChildWindowLogTemplateSlector : DataTemplateSelector + { + + #region Properties + + public DataTemplate CaptureSample + { + get; + set; + } + + public DataTemplate ControlUnit + { + get; + set; + } + + public DataTemplate DeleteTemplate + { + get; + set; + } + + public DataTemplate EnrollBegin + { + get; + set; + } + + public DataTemplate EnrollCapture + { + get; + set; + } + + public DataTemplate EnrollCommit + { + get; + set; + } + + public DataTemplate EnumBiometricUnits + { + get; + set; + } + + public DataTemplate EnumDatabases + { + get; + set; + } + + public DataTemplate EnumEnrollments + { + get; + set; + } + + public DataTemplate EnumServiceProviders + { + get; + set; + } + + public DataTemplate GetEvent + { + get; + set; + } + + public DataTemplate GetProperty + { + get; + set; + } + + public DataTemplate Identity + { + get; + set; + } + + public DataTemplate SetProperty + { + get; + set; + } + + public DataTemplate Verify + { + get; + set; + } + + #endregion + + #region Methods + + #region Overrids + + public override DataTemplate SelectTemplate(object item, DependencyObject container) + { + if (item is AsyncResultCaptureSampleDummy) + return this.CaptureSample; + if (item is AsyncResultControlUnit) + return this.ControlUnit; + if (item is AsyncResultDeleteTemplate) + return this.DeleteTemplate; + if (item is AsyncResultEnrollBegin) + return this.EnrollBegin; + if (item is AsyncResultEnrollCapture) + return this.EnrollCapture; + if (item is AsyncResultEnrollCommit) + return this.EnrollCommit; + if (item is AsyncResultEnumBiometricUnits) + return this.EnumBiometricUnits; + if (item is AsyncResultEnumDatabases) + return this.EnumDatabases; + if (item is AsyncResultEnumEnrollmentsDummy) + return this.EnumEnrollments; + if (item is AsyncResultEnumServiceProviders) + return this.EnumServiceProviders; + if (item is AsyncResultGetEvent) + return this.GetEvent; + if (item is AsyncResultGetProperty) + return this.GetProperty; + if (item is AsyncResultIdentity) + return this.Identity; + if (item is AsyncResultSetProperty) + return this.SetProperty; + if (item is AsyncResultVerify) + return this.Verify; + + return null; + } + + #endregion + + #endregion + + } + +} \ No newline at end of file diff --git a/examples/FrameworkTester/Selectors/ChildWindowTemplateSlector.cs b/examples/FrameworkTester/Selectors/ChildWindowTemplateSlector.cs index 386ad9b..56ebb18 100644 --- a/examples/FrameworkTester/Selectors/ChildWindowTemplateSlector.cs +++ b/examples/FrameworkTester/Selectors/ChildWindowTemplateSlector.cs @@ -1,6 +1,7 @@ using System.Windows; using System.Windows.Controls; using FrameworkTester.ViewModels.Interfaces; +using WinBiometricDotNet; namespace FrameworkTester.Selectors { @@ -30,10 +31,13 @@ public DataTemplate AsyncOpenSession public override DataTemplate SelectTemplate(object item, DependencyObject container) { - if (item is IAsyncOpenFrameworkChildWindowViewModel) - return this.AsyncOpenFramework; - if (item is IAsyncOpenSessionChildWindowViewModel) - return this.AsyncOpenSession; + if (item is AsyncResult result) + { + if (result.Session != null) + return this.AsyncOpenSession; + if (result.Framework != null) + return this.AsyncOpenFramework; + } return null; } diff --git a/examples/FrameworkTester/Services/Interfaces/IWinBiometricService.cs b/examples/FrameworkTester/Services/Interfaces/IWinBiometricService.cs index 6e7d1e3..7ce4573 100644 --- a/examples/FrameworkTester/Services/Interfaces/IWinBiometricService.cs +++ b/examples/FrameworkTester/Services/Interfaces/IWinBiometricService.cs @@ -82,26 +82,26 @@ void ControlUnitPrivileged(Session session, IEnumerable EnumServiceProviders(); - CredentialStates GetCredentialState(BiometricIdentity identity, CredentialTypes credentialType); + CredentialState GetCredentialState(BiometricIdentity identity, CredentialTypes credentialType); - void GetDomainLogonSetting(out bool value, out SettingSourceTypes source); + void GetDomainLogonSetting(out bool value, out SettingSourceType source); - void GetEnabledSetting(out bool value, out SettingSourceTypes source); + void GetEnabledSetting(out bool value, out SettingSourceType source); BiometricTypes GetEnrolledFactors(BiometricIdentity accountOwner); - void GetLogonSetting(out bool value, out SettingSourceTypes source); + void GetLogonSetting(out bool value, out SettingSourceType source); AntiSpoofPolicy GetAntiSpoofPolicyProperty(Session session, - PropertyTypes propertyType, + PropertyType propertyType, BiometricIdentity identity); ULONG GetSampleHintProperty(Session session, - PropertyTypes propertyType, + PropertyType propertyType, uint unitId); void GetProperty(Session session, - PropertyTypes propertyType, + PropertyType propertyType, PropertyId propertyId, uint unitId, BiometricIdentity identity, @@ -147,7 +147,7 @@ void GetProperty(Session session, void SelectEnroll(Session session, ulong selectorValue); void SetAntiSpoofPolicyProperty(Session session, - PropertyTypes propertyType, + PropertyType propertyType, BiometricIdentity identity, AntiSpoofPolicy antiSpoofPolicy); diff --git a/examples/FrameworkTester/Services/WinBiometricService.cs b/examples/FrameworkTester/Services/WinBiometricService.cs index 7e56865..4e17517 100644 --- a/examples/FrameworkTester/Services/WinBiometricService.cs +++ b/examples/FrameworkTester/Services/WinBiometricService.cs @@ -220,7 +220,7 @@ public IEnumerable EnumServiceProviders() return WinBiometric.EnumServiceProviders(); } - public CredentialStates GetCredentialState(BiometricIdentity identity, CredentialTypes credentialType) + public CredentialState GetCredentialState(BiometricIdentity identity, CredentialTypes credentialType) { if (identity == null) throw new ArgumentNullException(nameof(identity)); @@ -228,12 +228,12 @@ public CredentialStates GetCredentialState(BiometricIdentity identity, Credentia return WinBiometric.GetCredentialState(identity, credentialType); } - public void GetDomainLogonSetting(out bool value, out SettingSourceTypes source) + public void GetDomainLogonSetting(out bool value, out SettingSourceType source) { WinBiometric.GetDomainLogonSetting(out value, out source); } - public void GetEnabledSetting(out bool value, out SettingSourceTypes source) + public void GetEnabledSetting(out bool value, out SettingSourceType source) { WinBiometric.GetEnabledSetting(out value, out source); } @@ -243,27 +243,27 @@ public BiometricTypes GetEnrolledFactors(BiometricIdentity accountOwner) return WinBiometric.GetEnrolledFactors(accountOwner); } - public void GetLogonSetting(out bool value, out SettingSourceTypes source) + public void GetLogonSetting(out bool value, out SettingSourceType source) { WinBiometric.GetLogonSetting(out value, out source); } public AntiSpoofPolicy GetAntiSpoofPolicyProperty(Session session, - PropertyTypes propertyType, + PropertyType propertyType, BiometricIdentity identity) { return WinBiometric.GetAntiSpoofPolicyProperty(session, propertyType, identity); } public ULONG GetSampleHintProperty(Session session, - PropertyTypes propertyType, + PropertyType propertyType, uint unitId) { return WinBiometric.GetSampleHintProperty(session, propertyType, unitId); } public void GetProperty(Session session, - PropertyTypes propertyType, + PropertyType propertyType, PropertyId propertyId, uint unitId, BiometricIdentity identity, @@ -387,7 +387,7 @@ public void SelectEnroll(Session session, ulong selectorValue) } public void SetAntiSpoofPolicyProperty(Session session, - PropertyTypes propertyType, + PropertyType propertyType, BiometricIdentity identity, AntiSpoofPolicy antiSpoofPolicy) { diff --git a/examples/FrameworkTester/ViewModels/AsyncOpenFrameworkChildWindowViewModel.cs b/examples/FrameworkTester/ViewModels/AsyncOpenFrameworkChildWindowViewModel.cs index 5d873bb..dd187ee 100644 --- a/examples/FrameworkTester/ViewModels/AsyncOpenFrameworkChildWindowViewModel.cs +++ b/examples/FrameworkTester/ViewModels/AsyncOpenFrameworkChildWindowViewModel.cs @@ -65,10 +65,8 @@ protected override void ProcessMessage(IntPtr hwnd, IntPtr wParam, IntPtr lParam this.Result = result; this.Framework = result.Framework; - var dt = DateTime.Now.ToString("yyyy/MM/dd hh:mm:ss.fff"); - var message = $"[{dt}] [{result.OperationType}]"; - - this.Logs.Insert(0, message); + this.AsyncResultLogs.Insert(0, result); + this.SelectedAsyncResult = result; } #endregion diff --git a/examples/FrameworkTester/ViewModels/AsyncOpenSessionChildWindowViewModel.cs b/examples/FrameworkTester/ViewModels/AsyncOpenSessionChildWindowViewModel.cs index 663b4be..0fee46f 100644 --- a/examples/FrameworkTester/ViewModels/AsyncOpenSessionChildWindowViewModel.cs +++ b/examples/FrameworkTester/ViewModels/AsyncOpenSessionChildWindowViewModel.cs @@ -17,12 +17,18 @@ public sealed class AsyncOpenSessionChildWindowViewModel : ChildWindowViewModel< public AsyncOpenSessionChildWindowViewModel(Window window, uint messageCode) : base(window, messageCode) { + this.IdentityRepository = SimpleIoc.Default.GetInstance(); } #endregion #region Properties + public IBiometricIdentityRepositoryViewModel IdentityRepository + { + get; + } + private Session _Session; public Session Session @@ -62,13 +68,17 @@ public void Attach(Session session) protected override void ProcessMessage(IntPtr hwnd, IntPtr wParam, IntPtr lParam, ref bool handled) { var result = Marshal.PtrToAsyncResult(lParam); + this.Result = result; this.Session = result.Session; - var dt = DateTime.Now.ToString("yyyy/MM/dd hh:mm:ss.fff"); - var message = $"[{dt}] [{result.OperationType}]"; + if(result.Parameter is AsyncResultIdentity identity) + { + this.IdentityRepository.Add(identity.Identity); + } - this.Logs.Insert(0, message); + this.AsyncResultLogs.Insert(0, result); + this.SelectedAsyncResult = result; } #endregion diff --git a/examples/FrameworkTester/ViewModels/AsyncResultCaptureSampleDummy.cs b/examples/FrameworkTester/ViewModels/AsyncResultCaptureSampleDummy.cs new file mode 100644 index 0000000..e38815c --- /dev/null +++ b/examples/FrameworkTester/ViewModels/AsyncResultCaptureSampleDummy.cs @@ -0,0 +1,58 @@ +using System.Windows.Media.Imaging; +using FrameworkTester.Helpers; +using WinBiometricDotNet; + +namespace FrameworkTester.ViewModels +{ + + internal sealed class AsyncResultCaptureSampleDummy : AsyncResultParameter + { + + #region Constructors + + internal AsyncResultCaptureSampleDummy(AsyncResultCaptureSample captureSample) + { + this.Sample = captureSample.Sample; + this.SampleSize = captureSample.SampleSize; + this.RejectDetail = captureSample.RejectDetail; + + var image = BitmapSourceHelper.ToBitmapSource(captureSample.Sample.Image, + captureSample.Sample.Width, + captureSample.Sample.Height, + captureSample.Sample.HorizontalImageResolution, + captureSample.Sample.VerticalImageResolution); + if (image.CanFreeze) + image.Freeze(); + + this.CaptureImage = image; + } + + #endregion + + #region Properties + + public BitmapSource CaptureImage + { + get; + } + + public CaptureSample Sample + { + get; + } + + public int SampleSize + { + get; + } + + public RejectDetail RejectDetail + { + get; + } + + #endregion + + } + +} \ No newline at end of file diff --git a/examples/FrameworkTester/ViewModels/AsyncResultEnumEnrollmentsDummy.cs b/examples/FrameworkTester/ViewModels/AsyncResultEnumEnrollmentsDummy.cs new file mode 100644 index 0000000..ef32657 --- /dev/null +++ b/examples/FrameworkTester/ViewModels/AsyncResultEnumEnrollmentsDummy.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using WinBiometricDotNet; + +namespace FrameworkTester.ViewModels +{ + + internal sealed class AsyncResultEnumEnrollmentsDummy : AsyncResultParameter + { + + #region Constructors + + internal AsyncResultEnumEnrollmentsDummy(AsyncResultEnumEnrollments enumEnrollments) + { + this.Identity = enumEnrollments.Identity; + + this.FingerPositions.Clear(); + + foreach (var value in Enum.GetValues(typeof(FingerPosition)).Cast()) + { + var b = enumEnrollments.FingerPositions.Contains(value); + this.FingerPositions.Add(new KeyValuePair(value.ToString(), b)); + } + } + + #endregion + + #region Properties + + public BiometricIdentity Identity + { + get; + } + + public ObservableCollection> FingerPositions + { + get; + } = new ObservableCollection>(); + + #endregion + + } + +} \ No newline at end of file diff --git a/examples/FrameworkTester/ViewModels/ChildWindowViewModel.cs b/examples/FrameworkTester/ViewModels/ChildWindowViewModel.cs index a59a5f9..09a6924 100644 --- a/examples/FrameworkTester/ViewModels/ChildWindowViewModel.cs +++ b/examples/FrameworkTester/ViewModels/ChildWindowViewModel.cs @@ -58,7 +58,7 @@ await Task.Run(() => { this._DispatcherService.SafeAction(() => { - this.Logs.Clear(); + this.AsyncResultLogs.Clear(); }); }); })); @@ -108,10 +108,47 @@ private set } } - public ObservableCollection Logs + public ObservableCollection AsyncResultLogs { get; - } = new ObservableCollection(); + } = new ObservableCollection(); + + private AsyncResult _SelectedAsyncResult; + + public AsyncResult SelectedAsyncResult + { + get => this._SelectedAsyncResult; + set + { + this._SelectedAsyncResult = value; + this.RaisePropertyChanged(); + + if (value?.Parameter is AsyncResultCaptureSample sample) + { + this.SelectedAsyncResultParameter = new AsyncResultCaptureSampleDummy(sample); + } + else if (value?.Parameter is AsyncResultEnumEnrollments enumEnrollments) + { + this.SelectedAsyncResultParameter = new AsyncResultEnumEnrollmentsDummy(enumEnrollments); + } + else + { + this.SelectedAsyncResultParameter = value?.Parameter; + } + } + } + + private AsyncResultParameter _SelectedAsyncResultParameter; + + public AsyncResultParameter SelectedAsyncResultParameter + { + get => this._SelectedAsyncResultParameter; + private set + { + this._SelectedAsyncResultParameter = value; + this.RaisePropertyChanged(); + } + } public uint MessageCode { @@ -130,9 +167,9 @@ private set } } - private OperationTypes _OperationType; + private OperationType _OperationType; - public OperationTypes OperationType + public OperationType OperationType { get => this._OperationType; private set diff --git a/examples/FrameworkTester/ViewModels/Interfaces/IChildWindowViewModel.cs b/examples/FrameworkTester/ViewModels/Interfaces/IChildWindowViewModel.cs index 1cacf13..8d0def1 100644 --- a/examples/FrameworkTester/ViewModels/Interfaces/IChildWindowViewModel.cs +++ b/examples/FrameworkTester/ViewModels/Interfaces/IChildWindowViewModel.cs @@ -24,7 +24,18 @@ RelayCommand ClearLogsCommand get; } - ObservableCollection Logs + ObservableCollection AsyncResultLogs + { + get; + } + + AsyncResult SelectedAsyncResult + { + get; + set; + } + + AsyncResultParameter SelectedAsyncResultParameter { get; } @@ -39,7 +50,7 @@ int ApiStatus get; } - OperationTypes OperationType + OperationType OperationType { get; } diff --git a/examples/FrameworkTester/ViewModels/Interfaces/IWinBioCaptureSampleViewModel.cs b/examples/FrameworkTester/ViewModels/Interfaces/IWinBioCaptureSampleViewModel.cs index e4e0c98..60bab92 100644 --- a/examples/FrameworkTester/ViewModels/Interfaces/IWinBioCaptureSampleViewModel.cs +++ b/examples/FrameworkTester/ViewModels/Interfaces/IWinBioCaptureSampleViewModel.cs @@ -42,7 +42,7 @@ int CaptureImageScanVerticalResolution get; } - RejectDetails RejectDetail + RejectDetail RejectDetail { get; } diff --git a/examples/FrameworkTester/ViewModels/Interfaces/IWinBioEnrollCaptureViewModel.cs b/examples/FrameworkTester/ViewModels/Interfaces/IWinBioEnrollCaptureViewModel.cs index db49ea0..df6fc20 100644 --- a/examples/FrameworkTester/ViewModels/Interfaces/IWinBioEnrollCaptureViewModel.cs +++ b/examples/FrameworkTester/ViewModels/Interfaces/IWinBioEnrollCaptureViewModel.cs @@ -6,7 +6,7 @@ namespace FrameworkTester.ViewModels.Interfaces public interface IWinBioEnrollCaptureViewModel : IWinBioViewModel { - RejectDetails RejectDetail + RejectDetail RejectDetail { get; } diff --git a/examples/FrameworkTester/ViewModels/Interfaces/IWinBioEnrollCommitViewModel.cs b/examples/FrameworkTester/ViewModels/Interfaces/IWinBioEnrollCommitViewModel.cs index 02a0845..8fb6ea2 100644 --- a/examples/FrameworkTester/ViewModels/Interfaces/IWinBioEnrollCommitViewModel.cs +++ b/examples/FrameworkTester/ViewModels/Interfaces/IWinBioEnrollCommitViewModel.cs @@ -7,7 +7,7 @@ namespace FrameworkTester.ViewModels.Interfaces public interface IWinBioEnrollCommitViewModel : IWinBioViewModel { - IdentityTypes Type + IdentityType Type { get; } diff --git a/examples/FrameworkTester/ViewModels/Interfaces/IWinBioGetCredentialStateViewModel.cs b/examples/FrameworkTester/ViewModels/Interfaces/IWinBioGetCredentialStateViewModel.cs index c755b0a..f719e2e 100644 --- a/examples/FrameworkTester/ViewModels/Interfaces/IWinBioGetCredentialStateViewModel.cs +++ b/examples/FrameworkTester/ViewModels/Interfaces/IWinBioGetCredentialStateViewModel.cs @@ -11,7 +11,7 @@ IBiometricIdentityRepositoryViewModel IdentityRepository get; } - CredentialStates State + CredentialState State { get; } diff --git a/examples/FrameworkTester/ViewModels/Interfaces/IWinBioIdentifyViewModel.cs b/examples/FrameworkTester/ViewModels/Interfaces/IWinBioIdentifyViewModel.cs index 4c64d06..b0d9cd7 100644 --- a/examples/FrameworkTester/ViewModels/Interfaces/IWinBioIdentifyViewModel.cs +++ b/examples/FrameworkTester/ViewModels/Interfaces/IWinBioIdentifyViewModel.cs @@ -17,7 +17,7 @@ FingerPosition FingerPosition get; } - RejectDetails RejectDetail + RejectDetail RejectDetail { get; } @@ -37,7 +37,7 @@ Guid TemplateGuid get; } - IdentityTypes Type + IdentityType Type { get; } diff --git a/examples/FrameworkTester/ViewModels/Interfaces/IWinBioPropertyViewModel.cs b/examples/FrameworkTester/ViewModels/Interfaces/IWinBioPropertyViewModel.cs index da987cc..50c0fe3 100644 --- a/examples/FrameworkTester/ViewModels/Interfaces/IWinBioPropertyViewModel.cs +++ b/examples/FrameworkTester/ViewModels/Interfaces/IWinBioPropertyViewModel.cs @@ -6,7 +6,7 @@ namespace FrameworkTester.ViewModels.Interfaces public interface IWinBioPropertyViewModel { - SettingSourceTypes Source + SettingSourceType Source { get; } diff --git a/examples/FrameworkTester/ViewModels/Interfaces/IWinBioVerifyViewModel.cs b/examples/FrameworkTester/ViewModels/Interfaces/IWinBioVerifyViewModel.cs index f9705c4..c7d319f 100644 --- a/examples/FrameworkTester/ViewModels/Interfaces/IWinBioVerifyViewModel.cs +++ b/examples/FrameworkTester/ViewModels/Interfaces/IWinBioVerifyViewModel.cs @@ -12,7 +12,7 @@ bool IsMatch get; } - RejectDetails RejectDetail + RejectDetail RejectDetail { get; } diff --git a/examples/FrameworkTester/ViewModels/MainViewModel.cs b/examples/FrameworkTester/ViewModels/MainViewModel.cs index cf64c44..c74496e 100644 --- a/examples/FrameworkTester/ViewModels/MainViewModel.cs +++ b/examples/FrameworkTester/ViewModels/MainViewModel.cs @@ -237,17 +237,17 @@ private void OnEventMonitored(object sender, EventMonitoredEventArgs e) var identity = ui.Identity; switch (ui.Identity.Type) { - case IdentityTypes.Null: - subMessage = $"IdentityTypes: Null"; + case IdentityType.Null: + subMessage = $"IdentityType: Null"; break; - case IdentityTypes.WildCard: - subMessage = $"IdentityTypes: WildCard"; + case IdentityType.WildCard: + subMessage = $"IdentityType: WildCard"; break; - case IdentityTypes.Guid: - subMessage = $"IdentityTypes: Guid, TemplateGuid: {identity.TemplateGuid}"; + case IdentityType.Guid: + subMessage = $"IdentityType: Guid, TemplateGuid: {identity.TemplateGuid}"; break; - case IdentityTypes.Sid: - subMessage = $"IdentityTypes: Guid, Sid: {identity.Sid}"; + case IdentityType.Sid: + subMessage = $"IdentityType: Guid, Sid: {identity.Sid}"; break; default: throw new ArgumentOutOfRangeException(); diff --git a/examples/FrameworkTester/ViewModels/PropertyViewModel.cs b/examples/FrameworkTester/ViewModels/PropertyViewModel.cs index a2a6749..79352c9 100644 --- a/examples/FrameworkTester/ViewModels/PropertyViewModel.cs +++ b/examples/FrameworkTester/ViewModels/PropertyViewModel.cs @@ -16,7 +16,7 @@ public abstract class PropertyViewModel : ViewModelBase protected PropertyViewModel() { - this.PropertyTypes = Enum.GetValues(typeof(PropertyTypes)).Cast().ToArray(); + this.PropertyTypes = Enum.GetValues(typeof(PropertyType)).Cast().ToArray(); this.SelectedPropertyType = this.PropertyTypes.First(); @@ -27,9 +27,9 @@ protected PropertyViewModel() #region Properties - private PropertyTypes _SelectedPropertyType; + private PropertyType _SelectedPropertyType; - public PropertyTypes SelectedPropertyType + public PropertyType SelectedPropertyType { get => this._SelectedPropertyType; set @@ -49,7 +49,7 @@ public abstract string Name get; } - public IEnumerable PropertyTypes + public IEnumerable PropertyTypes { get; } diff --git a/examples/FrameworkTester/ViewModels/WinBioAsyncEnumBiometricUnitsViewModel.cs b/examples/FrameworkTester/ViewModels/WinBioAsyncEnumBiometricUnitsViewModel.cs index 630ad23..e178b04 100644 --- a/examples/FrameworkTester/ViewModels/WinBioAsyncEnumBiometricUnitsViewModel.cs +++ b/examples/FrameworkTester/ViewModels/WinBioAsyncEnumBiometricUnitsViewModel.cs @@ -3,13 +3,12 @@ using System.Windows; using FrameworkTester.ViewModels.Interfaces; using GalaSoft.MvvmLight.Command; -using GalaSoft.MvvmLight.Ioc; using WinBiometricDotNet; namespace FrameworkTester.ViewModels { - public sealed class WinBioAsyncEnumBiometricUnitsViewModel : WinBioViewModel, IWinBioAsyncEnumBiometricUnitsViewModel + public sealed class WinBioAsyncEnumBiometricUnitsViewModel : WinBioFrameworkViewModel, IWinBioAsyncEnumBiometricUnitsViewModel { #region Constructors @@ -18,12 +17,6 @@ public WinBioAsyncEnumBiometricUnitsViewModel() { WinBiometric.AsyncCompleted -= this.WinBiometricAsyncCompleted; WinBiometric.AsyncCompleted += this.WinBiometricAsyncCompleted; - - this.HandleRepository = SimpleIoc.Default.GetInstance>(); - this.HandleRepository.PropertyChanged += (sender, args) => - { - this.ExecuteCommand.RaiseCanExecuteChanged(); - }; } #endregion @@ -71,11 +64,6 @@ public override RelayCommand ExecuteCommand } public override string Name => "WinBioAsyncEnumBiometricUnits"; - - public IHandleRepositoryViewModel HandleRepository - { - get; - } public ObservableCollection Units { diff --git a/examples/FrameworkTester/ViewModels/WinBioAsyncEnumDatabasesViewModel.cs b/examples/FrameworkTester/ViewModels/WinBioAsyncEnumDatabasesViewModel.cs index 231f098..d6e3e61 100644 --- a/examples/FrameworkTester/ViewModels/WinBioAsyncEnumDatabasesViewModel.cs +++ b/examples/FrameworkTester/ViewModels/WinBioAsyncEnumDatabasesViewModel.cs @@ -3,13 +3,12 @@ using System.Windows; using FrameworkTester.ViewModels.Interfaces; using GalaSoft.MvvmLight.Command; -using GalaSoft.MvvmLight.Ioc; using WinBiometricDotNet; namespace FrameworkTester.ViewModels { - public sealed class WinBioAsyncEnumDatabasesViewModel : WinBioViewModel, IWinBioAsyncEnumDatabasesViewModel + public sealed class WinBioAsyncEnumDatabasesViewModel : WinBioFrameworkViewModel, IWinBioAsyncEnumDatabasesViewModel { #region Constructors @@ -18,12 +17,6 @@ public WinBioAsyncEnumDatabasesViewModel() { WinBiometric.AsyncCompleted -= this.WinBiometricAsyncCompleted; WinBiometric.AsyncCompleted += this.WinBiometricAsyncCompleted; - - this.HandleRepository = SimpleIoc.Default.GetInstance>(); - this.HandleRepository.PropertyChanged += (sender, args) => - { - this.ExecuteCommand.RaiseCanExecuteChanged(); - }; } #endregion @@ -72,11 +65,6 @@ public override RelayCommand ExecuteCommand public override string Name => "WinBioAsyncEnumDatabases"; - public IHandleRepositoryViewModel HandleRepository - { - get; - } - public ObservableCollection Databases { get; diff --git a/examples/FrameworkTester/ViewModels/WinBioAsyncEnumServiceProvidersViewModel.cs b/examples/FrameworkTester/ViewModels/WinBioAsyncEnumServiceProvidersViewModel.cs index 9ff1ffb..5a1158e 100644 --- a/examples/FrameworkTester/ViewModels/WinBioAsyncEnumServiceProvidersViewModel.cs +++ b/examples/FrameworkTester/ViewModels/WinBioAsyncEnumServiceProvidersViewModel.cs @@ -3,13 +3,12 @@ using System.Windows; using FrameworkTester.ViewModels.Interfaces; using GalaSoft.MvvmLight.Command; -using GalaSoft.MvvmLight.Ioc; using WinBiometricDotNet; namespace FrameworkTester.ViewModels { - public sealed class WinBioAsyncEnumServiceProvidersViewModel : WinBioViewModel, IWinBioAsyncEnumServiceProvidersViewModel + public sealed class WinBioAsyncEnumServiceProvidersViewModel : WinBioFrameworkViewModel, IWinBioAsyncEnumServiceProvidersViewModel { #region Constructors @@ -18,12 +17,6 @@ public WinBioAsyncEnumServiceProvidersViewModel() { WinBiometric.AsyncCompleted -= this.WinBiometricAsyncCompleted; WinBiometric.AsyncCompleted += this.WinBiometricAsyncCompleted; - - this.HandleRepository = SimpleIoc.Default.GetInstance>(); - this.HandleRepository.PropertyChanged += (sender, args) => - { - this.ExecuteCommand.RaiseCanExecuteChanged(); - }; } #endregion @@ -72,11 +65,6 @@ public override RelayCommand ExecuteCommand public override string Name => "WinBioAsyncEnumServiceProviders"; - public IHandleRepositoryViewModel HandleRepository - { - get; - } - private BiometricServiceProvider _SelectedServiceProvider; public BiometricServiceProvider SelectedServiceProvider diff --git a/examples/FrameworkTester/ViewModels/WinBioAsyncOpenFrameworkViewModel.cs b/examples/FrameworkTester/ViewModels/WinBioAsyncOpenFrameworkViewModel.cs index 34d3827..bf97d34 100644 --- a/examples/FrameworkTester/ViewModels/WinBioAsyncOpenFrameworkViewModel.cs +++ b/examples/FrameworkTester/ViewModels/WinBioAsyncOpenFrameworkViewModel.cs @@ -12,7 +12,7 @@ namespace FrameworkTester.ViewModels { - public sealed class WinBioAsyncOpenFrameworkViewModel : WinBioViewModel, IWinBioAsyncOpenFrameworkViewModel, IWinBioAsyncChildWindowViewModel + public sealed class WinBioAsyncOpenFrameworkViewModel : WinBioFrameworkViewModel, IWinBioAsyncOpenFrameworkViewModel, IWinBioAsyncChildWindowViewModel { #region Constructors @@ -28,12 +28,6 @@ public WinBioAsyncOpenFrameworkViewModel() WinBiometric.AsyncCompleted -= this.WinBiometricAsyncCompleted; WinBiometric.AsyncCompleted += this.WinBiometricAsyncCompleted; - - this.HandleRepository = SimpleIoc.Default.GetInstance>(); - this.HandleRepository.PropertyChanged += (sender, args) => - { - this.ExecuteCommand.RaiseCanExecuteChanged(); - }; } #endregion @@ -161,11 +155,6 @@ public bool Async } } - public IHandleRepositoryViewModel HandleRepository - { - get; - } - private uint _MessageCode; public uint MessageCode diff --git a/examples/FrameworkTester/ViewModels/WinBioCaptureSampleViewModel.cs b/examples/FrameworkTester/ViewModels/WinBioCaptureSampleViewModel.cs index c65dbf7..9defb6b 100644 --- a/examples/FrameworkTester/ViewModels/WinBioCaptureSampleViewModel.cs +++ b/examples/FrameworkTester/ViewModels/WinBioCaptureSampleViewModel.cs @@ -197,9 +197,9 @@ public override RelayCommand ExecuteCommand public override string Name => "WinBioCaptureSample"; - private RejectDetails _RejectDetail; + private RejectDetail _RejectDetail; - public RejectDetails RejectDetail + public RejectDetail RejectDetail { get { diff --git a/examples/FrameworkTester/ViewModels/WinBioCaptureSampleWithCallbackViewModel.cs b/examples/FrameworkTester/ViewModels/WinBioCaptureSampleWithCallbackViewModel.cs index 8a7761e..5196ddf 100644 --- a/examples/FrameworkTester/ViewModels/WinBioCaptureSampleWithCallbackViewModel.cs +++ b/examples/FrameworkTester/ViewModels/WinBioCaptureSampleWithCallbackViewModel.cs @@ -222,9 +222,9 @@ public bool Loop public override string Name => "WinBioCaptureSampleWithCallback"; - private RejectDetails _RejectDetail; + private RejectDetail _RejectDetail; - public RejectDetails RejectDetail + public RejectDetail RejectDetail { get { diff --git a/examples/FrameworkTester/ViewModels/WinBioEnrollCaptureViewModel.cs b/examples/FrameworkTester/ViewModels/WinBioEnrollCaptureViewModel.cs index 9ea347c..5c5bc66 100644 --- a/examples/FrameworkTester/ViewModels/WinBioEnrollCaptureViewModel.cs +++ b/examples/FrameworkTester/ViewModels/WinBioEnrollCaptureViewModel.cs @@ -62,9 +62,9 @@ public override RelayCommand ExecuteCommand public override string Name => "WinBioEnrollCapture"; - private RejectDetails _RejectDetail; + private RejectDetail _RejectDetail; - public RejectDetails RejectDetail + public RejectDetail RejectDetail { get { diff --git a/examples/FrameworkTester/ViewModels/WinBioEnrollCaptureWithCallbackViewModel.cs b/examples/FrameworkTester/ViewModels/WinBioEnrollCaptureWithCallbackViewModel.cs index 539830f..4593539 100644 --- a/examples/FrameworkTester/ViewModels/WinBioEnrollCaptureWithCallbackViewModel.cs +++ b/examples/FrameworkTester/ViewModels/WinBioEnrollCaptureWithCallbackViewModel.cs @@ -83,7 +83,7 @@ public override RelayCommand ExecuteCommand this.WaitCallback = false; } - }, () => this.WaitCallback && this.HandleRepository?.SelectedHandle != null)); + }, () => !this.WaitCallback && this.HandleRepository?.SelectedHandle != null)); } } @@ -101,9 +101,9 @@ public override bool EnableWait public override string Name => "WinBioEnrollCaptureWithCallback"; - private RejectDetails _RejectDetail; + private RejectDetail _RejectDetail; - public RejectDetails RejectDetail + public RejectDetail RejectDetail { get { diff --git a/examples/FrameworkTester/ViewModels/WinBioEnrollCommitViewModel.cs b/examples/FrameworkTester/ViewModels/WinBioEnrollCommitViewModel.cs index 98f5a3f..6db94e7 100644 --- a/examples/FrameworkTester/ViewModels/WinBioEnrollCommitViewModel.cs +++ b/examples/FrameworkTester/ViewModels/WinBioEnrollCommitViewModel.cs @@ -20,7 +20,7 @@ public override RelayCommand ExecuteCommand { return this._ExecuteCommand ?? (this._ExecuteCommand = new RelayCommand(() => { - this.Type = IdentityTypes.Null; + this.Type = IdentityType.Null; this.TemplateGuid = Guid.Empty; this.Sid = ""; @@ -79,9 +79,9 @@ private set } } - private IdentityTypes _Type; + private IdentityType _Type; - public IdentityTypes Type + public IdentityType Type { get { diff --git a/examples/FrameworkTester/ViewModels/WinBioEnumBiometricUnitsViewModel.cs b/examples/FrameworkTester/ViewModels/WinBioEnumBiometricUnitsViewModel.cs index ba3f430..004a953 100644 --- a/examples/FrameworkTester/ViewModels/WinBioEnumBiometricUnitsViewModel.cs +++ b/examples/FrameworkTester/ViewModels/WinBioEnumBiometricUnitsViewModel.cs @@ -26,9 +26,9 @@ public override RelayCommand ExecuteCommand this.Result = "WAIT"; this.UpdateUIImmediately(); - this._Units.Clear(); + this.Units.Clear(); foreach (var unit in this.BiometricService.EnumBiometricUnits()) - this._Units.Add(unit); + this.Units.Add(unit); this.Result = "OK"; } @@ -43,15 +43,10 @@ public override RelayCommand ExecuteCommand public override string Name => "WinBioEnumBiometricUnits"; - private readonly ObservableCollection _Units = new ObservableCollection(); - public ObservableCollection Units { - get - { - return this._Units; - } - } + get; + } = new ObservableCollection(); #endregion diff --git a/examples/FrameworkTester/ViewModels/WinBioEnumDatabasesViewModel.cs b/examples/FrameworkTester/ViewModels/WinBioEnumDatabasesViewModel.cs index d118908..692dd74 100644 --- a/examples/FrameworkTester/ViewModels/WinBioEnumDatabasesViewModel.cs +++ b/examples/FrameworkTester/ViewModels/WinBioEnumDatabasesViewModel.cs @@ -26,7 +26,7 @@ public WinBioEnumDatabasesViewModel() { this._DispatcherService = SimpleIoc.Default.GetInstance(); - this._Databases.CollectionChanged += (sender, args) => + this.Databases.CollectionChanged += (sender, args) => { this._DispatcherService.SafeAction(() => this.RemoveDatabaseCommand.RaiseCanExecuteChanged()); }; @@ -91,12 +91,12 @@ public override RelayCommand ExecuteCommand { this.SelectedDatabase = null; - this._Databases.Clear(); + this.Databases.Clear(); foreach (var database in this.BiometricService.EnumBiometricDatabases()) - this._Databases.Add(database); + this.Databases.Add(database); - if (this._Databases.Any()) - this.SelectedDatabase = this._Databases.First(); + if (this.Databases.Any()) + this.SelectedDatabase = this.Databases.First(); this.Result = "OK"; } @@ -111,15 +111,10 @@ public override RelayCommand ExecuteCommand public override string Name => "WinBioEnumDatabases"; - private readonly ObservableCollection _Databases = new ObservableCollection(); - public ObservableCollection Databases { - get - { - return this._Databases; - } - } + get; + } = new ObservableCollection(); private RelayCommand _RemoveDatabaseCommand; @@ -135,9 +130,9 @@ public RelayCommand RemoveDatabaseCommand this.BiometricService.RemoveDatabase(this.SelectedUnit, databaseId); this.Result = "OK"; - var database = this._Databases.First(d => d.DatabaseId == databaseId); + var database = this.Databases.First(d => d.DatabaseId == databaseId); if (database != null) - this._Databases.Remove(database); + this.Databases.Remove(database); MessageBox.Show($"{databaseId} was removed."); } @@ -146,7 +141,7 @@ public RelayCommand RemoveDatabaseCommand MessageBox.Show(e.Message); this.Result = "FAIL"; } - }, () => this._Databases.Any())); + }, () => this.Databases.Any())); } } diff --git a/examples/FrameworkTester/ViewModels/WinBioFrameworkViewModel.cs b/examples/FrameworkTester/ViewModels/WinBioFrameworkViewModel.cs new file mode 100644 index 0000000..71a55d2 --- /dev/null +++ b/examples/FrameworkTester/ViewModels/WinBioFrameworkViewModel.cs @@ -0,0 +1,34 @@ +using FrameworkTester.ViewModels.Interfaces; +using GalaSoft.MvvmLight.Ioc; + +namespace FrameworkTester.ViewModels +{ + + public abstract class WinBioFrameworkViewModel : WinBioViewModel, IWinBioAsyncFrameworkViewModel + { + + #region Constructors + + protected WinBioFrameworkViewModel() + { + this.HandleRepository = SimpleIoc.Default.GetInstance>(); + this.HandleRepository.PropertyChanged += (sender, args) => + { + this.ExecuteCommand.RaiseCanExecuteChanged(); + }; + } + + #endregion + + #region Properties + + public IHandleRepositoryViewModel HandleRepository + { + get; + } + + #endregion + + } + +} \ No newline at end of file diff --git a/examples/FrameworkTester/ViewModels/WinBioGetCredentialStateViewModel.cs b/examples/FrameworkTester/ViewModels/WinBioGetCredentialStateViewModel.cs index 18d4d21..e2bef43 100644 --- a/examples/FrameworkTester/ViewModels/WinBioGetCredentialStateViewModel.cs +++ b/examples/FrameworkTester/ViewModels/WinBioGetCredentialStateViewModel.cs @@ -34,7 +34,7 @@ public override RelayCommand ExecuteCommand { return this._ExecuteCommand ?? (this._ExecuteCommand = new RelayCommand(() => { - this.State = CredentialStates.NotSet; + this.State = CredentialState.NotSet; try { @@ -62,9 +62,9 @@ public IBiometricIdentityRepositoryViewModel IdentityRepository public override string Name => "WinBioGetCredentialState"; - private CredentialStates _State; + private CredentialState _State; - public CredentialStates State + public CredentialState State { get => this._State; private set diff --git a/examples/FrameworkTester/ViewModels/WinBioGetDomainLogonSettingViewModel.cs b/examples/FrameworkTester/ViewModels/WinBioGetDomainLogonSettingViewModel.cs index e18500d..71aeb7c 100644 --- a/examples/FrameworkTester/ViewModels/WinBioGetDomainLogonSettingViewModel.cs +++ b/examples/FrameworkTester/ViewModels/WinBioGetDomainLogonSettingViewModel.cs @@ -9,7 +9,7 @@ public sealed class WinBioGetDomainLogonSettingViewModel : WinBioPropertyViewMod public override string Name => "WinBioGetDomainLogonSetting"; - protected override void GetValueAndSource(out bool value, out SettingSourceTypes source) + protected override void GetValueAndSource(out bool value, out SettingSourceType source) { this.BiometricService.GetDomainLogonSetting(out value, out source); } diff --git a/examples/FrameworkTester/ViewModels/WinBioGetEnabledSettingViewModel.cs b/examples/FrameworkTester/ViewModels/WinBioGetEnabledSettingViewModel.cs index 0946892..5744ba3 100644 --- a/examples/FrameworkTester/ViewModels/WinBioGetEnabledSettingViewModel.cs +++ b/examples/FrameworkTester/ViewModels/WinBioGetEnabledSettingViewModel.cs @@ -9,9 +9,9 @@ public sealed class WinBioGetEnabledSettingViewModel : WinBioPropertyViewModel, public override string Name => "WinBioGetEnabledSetting"; - protected override void GetValueAndSource(out bool value, out SettingSourceTypes source) + protected override void GetValueAndSource(out bool value, out SettingSourceType source) { - this.BiometricService.GetDomainLogonSetting(out value, out source); + this.BiometricService.GetEnabledSetting(out value, out source); } } diff --git a/examples/FrameworkTester/ViewModels/WinBioGetLogonSettingViewModel.cs b/examples/FrameworkTester/ViewModels/WinBioGetLogonSettingViewModel.cs index 3ac6475..49135de 100644 --- a/examples/FrameworkTester/ViewModels/WinBioGetLogonSettingViewModel.cs +++ b/examples/FrameworkTester/ViewModels/WinBioGetLogonSettingViewModel.cs @@ -9,9 +9,9 @@ public sealed class WinBioGetLogonSettingViewModel : WinBioPropertyViewModel, IW public override string Name => "WinBioGetLogonSetting"; - protected override void GetValueAndSource(out bool value, out SettingSourceTypes source) + protected override void GetValueAndSource(out bool value, out SettingSourceType source) { - this.BiometricService.GetDomainLogonSetting(out value, out source); + this.BiometricService.GetLogonSetting(out value, out source); } } diff --git a/examples/FrameworkTester/ViewModels/WinBioIdentifyViewModel.cs b/examples/FrameworkTester/ViewModels/WinBioIdentifyViewModel.cs index 568b8cf..34f89de 100644 --- a/examples/FrameworkTester/ViewModels/WinBioIdentifyViewModel.cs +++ b/examples/FrameworkTester/ViewModels/WinBioIdentifyViewModel.cs @@ -30,7 +30,7 @@ public override RelayCommand ExecuteCommand { return this._ExecuteCommand ?? (this._ExecuteCommand = new RelayCommand(() => { - this.Type = IdentityTypes.Null; + this.Type = IdentityType.Null; this.TemplateGuid = Guid.Empty; this.Sid = ""; this.UnitId = 0; @@ -84,9 +84,9 @@ public IBiometricIdentityRepositoryViewModel IdentityRepository get; } - private RejectDetails _RejectDetail; + private RejectDetail _RejectDetail; - public RejectDetails RejectDetail + public RejectDetail RejectDetail { get => this._RejectDetail; private set @@ -135,9 +135,9 @@ private set } } - private IdentityTypes _Type; + private IdentityType _Type; - public IdentityTypes Type + public IdentityType Type { get { diff --git a/examples/FrameworkTester/ViewModels/WinBioIdentifyWithCallbackViewModel.cs b/examples/FrameworkTester/ViewModels/WinBioIdentifyWithCallbackViewModel.cs index 0f610fb..ef77a85 100644 --- a/examples/FrameworkTester/ViewModels/WinBioIdentifyWithCallbackViewModel.cs +++ b/examples/FrameworkTester/ViewModels/WinBioIdentifyWithCallbackViewModel.cs @@ -60,7 +60,7 @@ public override RelayCommand ExecuteCommand { return this._ExecuteCommand ?? (this._ExecuteCommand = new RelayCommand(() => { - this.Type = IdentityTypes.Null; + this.Type = IdentityType.Null; this.TemplateGuid = Guid.Empty; this.Sid = ""; this.UnitId = 0; @@ -126,9 +126,9 @@ public IBiometricIdentityRepositoryViewModel IdentityRepository get; } - private RejectDetails _RejectDetail; + private RejectDetail _RejectDetail; - public RejectDetails RejectDetail + public RejectDetail RejectDetail { get => this._RejectDetail; private set @@ -174,9 +174,9 @@ private set } } - private IdentityTypes _Type; + private IdentityType _Type; - public IdentityTypes Type + public IdentityType Type { get => this._Type; private set diff --git a/examples/FrameworkTester/ViewModels/WinBioPropertyViewModel.cs b/examples/FrameworkTester/ViewModels/WinBioPropertyViewModel.cs index 90af282..eb1ed53 100644 --- a/examples/FrameworkTester/ViewModels/WinBioPropertyViewModel.cs +++ b/examples/FrameworkTester/ViewModels/WinBioPropertyViewModel.cs @@ -44,9 +44,9 @@ public override RelayCommand ExecuteCommand } } - private SettingSourceTypes _Source; + private SettingSourceType _Source; - public SettingSourceTypes Source + public SettingSourceType Source { get => this._Source; private set @@ -72,7 +72,7 @@ private set #region Methods - protected abstract void GetValueAndSource(out bool value, out SettingSourceTypes source); + protected abstract void GetValueAndSource(out bool value, out SettingSourceType source); #endregion diff --git a/examples/FrameworkTester/ViewModels/WinBioSessionViewModel.cs b/examples/FrameworkTester/ViewModels/WinBioSessionViewModel.cs index d661ca4..86bf352 100644 --- a/examples/FrameworkTester/ViewModels/WinBioSessionViewModel.cs +++ b/examples/FrameworkTester/ViewModels/WinBioSessionViewModel.cs @@ -12,6 +12,10 @@ public abstract class WinBioSessionViewModel : WinBioViewModel, IWinBioAsyncSess protected WinBioSessionViewModel() { this.HandleRepository = SimpleIoc.Default.GetInstance>(); + this.HandleRepository.PropertyChanged += (sender, args) => + { + this.ExecuteCommand.RaiseCanExecuteChanged(); + }; } #endregion diff --git a/examples/FrameworkTester/ViewModels/WinBioVerifyViewModel.cs b/examples/FrameworkTester/ViewModels/WinBioVerifyViewModel.cs index f619a65..2b98352 100644 --- a/examples/FrameworkTester/ViewModels/WinBioVerifyViewModel.cs +++ b/examples/FrameworkTester/ViewModels/WinBioVerifyViewModel.cs @@ -75,9 +75,9 @@ private set public override string Name => "WinBioVerify"; - private RejectDetails _RejectDetail; + private RejectDetail _RejectDetail; - public RejectDetails RejectDetail + public RejectDetail RejectDetail { get { diff --git a/examples/FrameworkTester/ViewModels/WinBioVerifyWithCallbackViewModel.cs b/examples/FrameworkTester/ViewModels/WinBioVerifyWithCallbackViewModel.cs index 2b6756c..fef90ae 100644 --- a/examples/FrameworkTester/ViewModels/WinBioVerifyWithCallbackViewModel.cs +++ b/examples/FrameworkTester/ViewModels/WinBioVerifyWithCallbackViewModel.cs @@ -89,7 +89,7 @@ public override RelayCommand ExecuteCommand this.WaitCallback = false; } - }, () => this.WaitCallback && this.HandleRepository?.SelectedHandle != null)); + }, () => !this.WaitCallback && this.HandleRepository?.SelectedHandle != null)); } } @@ -122,9 +122,9 @@ private set public override string Name => "WinBioVerifyWithCallback"; - private RejectDetails _RejectDetail; + private RejectDetail _RejectDetail; - public RejectDetails RejectDetail + public RejectDetail RejectDetail { get { diff --git a/examples/FrameworkTester/Views/ChildWindow.xaml b/examples/FrameworkTester/Views/ChildWindow.xaml index 6354422..c9fc1a3 100644 --- a/examples/FrameworkTester/Views/ChildWindow.xaml +++ b/examples/FrameworkTester/Views/ChildWindow.xaml @@ -2,22 +2,25 @@ x:Class="FrameworkTester.Views.ChildWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:controls="clr-namespace:FrameworkTester.Controls" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:designTimes="clr-namespace:FrameworkTester.DesignTimes" - xmlns:interfaces="clr-namespace:FrameworkTester.ViewModels.Interfaces" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:selectors="clr-namespace:FrameworkTester.Selectors" + xmlns:viewModels="clr-namespace:FrameworkTester.ViewModels" + xmlns:winBiometricDotNet="clr-namespace:WinBiometricDotNet;assembly=WinBiometricDotNet" x:Name="_Window" Title="{Binding Handle, Converter={StaticResource IntegerToHexStringConveter}}" Width="600" - Height="450" + Height="650" d:DataContext="{d:DesignInstance {x:Type designTimes:ChildWindowViewModel}}" - d:DesignHeight="450" + d:DesignHeight="650" d:DesignWidth="600" ShowInTaskbar="False" mc:Ignorable="d"> + - + @@ -33,8 +36,6 @@ - - @@ -45,86 +46,175 @@ Grid.Row="0" Grid.Column="0" Style="{StaticResource LabelTextBlock}" - Text="Last Received: " /> + Text="ApiStatus: " /> + Text="{Binding ApiStatus}" /> + Text="OperationType: " /> + Text="{Binding OperationType}" /> + Text="SequenceNumber: " /> + Text="{Binding SequenceNumber}" /> + Text="Framework Handle: " /> + Text="{Binding Framework.Handle, Converter={StaticResource IntegerToHexStringConveter}}" /> + Text="UnitId: " /> + Text="{Binding UnitId}" /> + Text="UserData: " /> + Text="{Binding UserData, Converter={StaticResource IntegerToHexStringConveter}}" /> + Text="TimeStamp: " /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Text="{Binding Path=TimeStamp, StringFormat=yyyy/MM/dd hh:mm:ss.fff}" /> - + + + @@ -142,109 +232,898 @@ + + + + + + Text="SampleSize: " /> + Text="{Binding SampleSize}" /> + Text="RejectDetail: " /> + Text="{Binding RejectDetail}" /> + Text="Width: " /> + Text="{Binding Sample.Width}" /> + Text="Height: " /> + Text="{Binding Sample.Height}" /> + Text="HorizontalResolution: " /> + Text="{Binding Sample.HorizontalImageResolution}" /> + Text="VerticalResolution: " /> + Text="{Binding Sample.VerticalImageResolution}" /> + Text="ScanHorizontalResolution: " /> + Text="{Binding Sample.HorizontalScanResolution}" /> + Text="ScanVerticalResolution: " /> + Text="{Binding Sample.VerticalScanResolution}" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + - + - + + + @@ -265,8 +1144,24 @@ + ItemsSource="{Binding AsyncResultLogs}" + SelectedItem="{Binding SelectedAsyncResult}"> + + + + + + + + + + + + + + + diff --git a/examples/FrameworkTester/Views/WinBioEnumBiometricUnits.xaml b/examples/FrameworkTester/Views/WinBioEnumBiometricUnits.xaml index 7977a9c..f28c932 100644 --- a/examples/FrameworkTester/Views/WinBioEnumBiometricUnits.xaml +++ b/examples/FrameworkTester/Views/WinBioEnumBiometricUnits.xaml @@ -17,7 +17,7 @@ - + @@ -49,11 +49,149 @@ Grid.Row="4" Grid.Column="2" VerticalAlignment="Stretch"> - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/FrameworkTester/Views/WinBioEnumDatabases.xaml b/examples/FrameworkTester/Views/WinBioEnumDatabases.xaml index f11b85b..27b2e30 100644 --- a/examples/FrameworkTester/Views/WinBioEnumDatabases.xaml +++ b/examples/FrameworkTester/Views/WinBioEnumDatabases.xaml @@ -17,7 +17,7 @@ - + @@ -41,6 +41,109 @@ Grid.Column="2" Style="{StaticResource ValueTextBlock}" Text="{Binding Result}" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/examples/FrameworkTester/Views/WinBioEnumServiceProviders.xaml b/examples/FrameworkTester/Views/WinBioEnumServiceProviders.xaml index b39279c..c5181bd 100644 --- a/examples/FrameworkTester/Views/WinBioEnumServiceProviders.xaml +++ b/examples/FrameworkTester/Views/WinBioEnumServiceProviders.xaml @@ -17,7 +17,6 @@ - @@ -46,91 +45,91 @@ VerticalAlignment="Top" Style="{StaticResource LabelTextBlock}" Text="ServiceProviders: " /> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + VerticalAlignment="Stretch"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/nuget/WinBiometricDotNet.0.5.0.nuspec b/nuget/WinBiometricDotNet.0.5.0.nuspec deleted file mode 100644 index b586560..0000000 --- a/nuget/WinBiometricDotNet.0.5.0.nuspec +++ /dev/null @@ -1,24 +0,0 @@ - - - - WinBiometricDotNet - 0.5.0 - Takuya Takeuchi - Takuya Takeuchi - true - https://opensource.org/licenses/MIT - https://github.com/takuya-takeuchi/WinBiometricDotNet - https://github.com/takuya-takeuchi/WinBiometricDotNet/blob/master/nuget/fingerprint128.png?raw=true - Windows Bitometric Framework .NET wrapper - © Takuya Takeuchi 2018 - windowsbiometricframework wbf biometric - - - - - - - - - - \ No newline at end of file diff --git a/nuget/WinBiometricDotNet.nuspec b/nuget/WinBiometricDotNet.nuspec index c73f5a1..f19004c 100644 --- a/nuget/WinBiometricDotNet.nuspec +++ b/nuget/WinBiometricDotNet.nuspec @@ -2,7 +2,7 @@ WinBiometricDotNet - 0.7.0 + 0.8.0 WinBiometricDotNet Takuya Takeuchi Takuya Takeuchi diff --git a/sources/WinBiometricDotNet/AntiSpoofPolicy.cs b/sources/WinBiometricDotNet/AntiSpoofPolicy.cs index 40b1187..901db85 100644 --- a/sources/WinBiometricDotNet/AntiSpoofPolicy.cs +++ b/sources/WinBiometricDotNet/AntiSpoofPolicy.cs @@ -3,6 +3,9 @@ namespace WinBiometricDotNet { + /// + /// Represents the antispoofing policy for a user. + /// public sealed class AntiSpoofPolicy { @@ -14,6 +17,9 @@ internal unsafe AntiSpoofPolicy(SafeNativeMethods.WINBIO_ANTI_SPOOF_POLICY* ptr this.Source = (PolicySource)ptr->Source; } + /// + /// Initializes a new instance of the class. + /// public AntiSpoofPolicy() { } @@ -22,12 +28,18 @@ public AntiSpoofPolicy() #region Properties + /// + /// Gets or sets the action to take for the antispoofing policy. + /// public AntiSpoofPolicyAction Action { get; set; } + /// + /// Gets or sets a value for the antispoofing policy. + /// public PolicySource Source { get; diff --git a/sources/WinBiometricDotNet/AntiSpoofPolicyAction.cs b/sources/WinBiometricDotNet/AntiSpoofPolicyAction.cs index 1d2394a..d8b9b40 100644 --- a/sources/WinBiometricDotNet/AntiSpoofPolicyAction.cs +++ b/sources/WinBiometricDotNet/AntiSpoofPolicyAction.cs @@ -3,13 +3,25 @@ namespace WinBiometricDotNet { + /// + /// Specifies the types of actions you take for the antispoofing policy of a user. + /// public enum AntiSpoofPolicyAction { + /// + /// Turns off the detection of spoofing for a biometric factor. + /// Disable = SafeNativeMethods.WINBIO_ANTI_SPOOF_POLICY_ACTION.WINBIO_ANTI_SPOOF_DISABLE, + /// + /// Turns on the detection of spoofing for a biometric factor. + /// Enable = SafeNativeMethods.WINBIO_ANTI_SPOOF_POLICY_ACTION.WINBIO_ANTI_SPOOF_ENABLE, + /// + /// Removes the entire antispoofing policy for the biometric factor from the account. + /// Remove = SafeNativeMethods.WINBIO_ANTI_SPOOF_POLICY_ACTION.WINBIO_ANTI_SPOOF_REMOVE, } diff --git a/sources/WinBiometricDotNet/AsyncCompletedEventArgs.cs b/sources/WinBiometricDotNet/AsyncCompletedEventArgs.cs index cb1ae82..bcb323a 100644 --- a/sources/WinBiometricDotNet/AsyncCompletedEventArgs.cs +++ b/sources/WinBiometricDotNet/AsyncCompletedEventArgs.cs @@ -3,6 +3,9 @@ namespace WinBiometricDotNet { + /// + /// Provides data for the event handler. + /// public sealed class AsyncCompletedEventArgs : EventArgs { @@ -17,6 +20,9 @@ internal AsyncCompletedEventArgs(AsyncResult result) #region Properties + /// + /// Gets a value that represents the result of an event. + /// public AsyncResult Result { get; diff --git a/sources/WinBiometricDotNet/AsyncCompletedHandler.cs b/sources/WinBiometricDotNet/AsyncCompletedHandler.cs index a68370e..293b252 100644 --- a/sources/WinBiometricDotNet/AsyncCompletedHandler.cs +++ b/sources/WinBiometricDotNet/AsyncCompletedHandler.cs @@ -1,6 +1,11 @@ namespace WinBiometricDotNet { + /// + /// Represents the method that will handle the event. + /// + /// The source of the event. + /// A that contains the event data. public delegate void AsyncCompletedHandler(object sender, AsyncCompletedEventArgs e); } \ No newline at end of file diff --git a/sources/WinBiometricDotNet/AsyncNotificationMethod.cs b/sources/WinBiometricDotNet/AsyncNotificationMethod.cs index eca10eb..8edfad2 100644 --- a/sources/WinBiometricDotNet/AsyncNotificationMethod.cs +++ b/sources/WinBiometricDotNet/AsyncNotificationMethod.cs @@ -3,15 +3,31 @@ namespace WinBiometricDotNet { + /// + /// Defines constants that specify how completion notifications for asynchronous operations are to be delivered to the client application. + /// This API supports the product infrastructure and is not intended to be used directly from your code. + /// public enum AsyncNotificationMethod { + /// + /// The operation is synchronous. + /// NotifyNone = SafeNativeMethods.WINBIO_ASYNC_NOTIFICATION_METHOD.WINBIO_ASYNC_NOTIFY_NONE, + /// + /// The client-implemented PWINBIO_ASYNC_COMPLETION_CALLBACK function is called by the framework. + /// NotifyCallback = SafeNativeMethods.WINBIO_ASYNC_NOTIFICATION_METHOD.WINBIO_ASYNC_NOTIFY_CALLBACK, + /// + /// The framework sends completion notices to the client application window message queue. + /// NotifyMessage = SafeNativeMethods.WINBIO_ASYNC_NOTIFICATION_METHOD.WINBIO_ASYNC_NOTIFY_MESSAGE, + /// + /// The maximum enumeration value. This constant is not directly used by the WinBioAsyncOpenFramework and WinBioAsyncOpenSession. + /// NotifyMaximumValue = SafeNativeMethods.WINBIO_ASYNC_NOTIFICATION_METHOD.WINBIO_ASYNC_NOTIFY_MAXIMUM_VALUE } diff --git a/sources/WinBiometricDotNet/AsyncResult.cs b/sources/WinBiometricDotNet/AsyncResult.cs index 5ce6164..f8360bc 100644 --- a/sources/WinBiometricDotNet/AsyncResult.cs +++ b/sources/WinBiometricDotNet/AsyncResult.cs @@ -1,11 +1,13 @@ using System; using WinBiometricDotNet.Interop; using HRESULT = System.Int32; -using WINBIO_SESSION_HANDLE = System.UInt32; namespace WinBiometricDotNet { + /// + /// The class contains the results of an asynchronous operation. + /// public sealed class AsyncResult { @@ -14,43 +16,93 @@ public sealed class AsyncResult internal unsafe AsyncResult(SafeNativeMethods.WINBIO_ASYNC_RESULT* result) { this.ApiStatus = result->ApiStatus; - this.OperationType = (OperationTypes)result->Operation; + this.OperationType = (OperationType)result->Operation; this.SequenceNumber = result->SequenceNumber; switch (this.OperationType) { - case OperationTypes.Open: - case OperationTypes.Close: - case OperationTypes.Verify: - case OperationTypes.Identify: - case OperationTypes.LocateSensor: - case OperationTypes.EnrollBegin: - case OperationTypes.EnrollCapture: - case OperationTypes.EnrollCommit: - case OperationTypes.EnrollDiscard: - case OperationTypes.EnumEnrollments: - case OperationTypes.DeleteTemplate: - case OperationTypes.CaptureSample: - case OperationTypes.GetProperty: - case OperationTypes.SetProperty: - case OperationTypes.GetEvent: - case OperationTypes.LockUnit: - case OperationTypes.UnlockUnit: - case OperationTypes.ControlUnit: - case OperationTypes.ControlUnitPrivileged: - this.Session = new Session(result->SessionHandle); - break; - case OperationTypes.OpenFramework: - case OperationTypes.CloseFramework: - case OperationTypes.EnumServiceProviders: - case OperationTypes.EnumBiometricUnits: - case OperationTypes.EnumDatabases: - case OperationTypes.UnitArrival: - case OperationTypes.UnitRemoval: + case OperationType.Open: + case OperationType.Close: + case OperationType.Verify: + case OperationType.Identify: + case OperationType.LocateSensor: + case OperationType.EnrollBegin: + case OperationType.EnrollCapture: + case OperationType.EnrollCommit: + case OperationType.EnrollDiscard: + case OperationType.EnumEnrollments: + case OperationType.DeleteTemplate: + case OperationType.CaptureSample: + case OperationType.GetProperty: + case OperationType.SetProperty: + case OperationType.GetEvent: + case OperationType.LockUnit: + case OperationType.UnlockUnit: + case OperationType.ControlUnit: + case OperationType.ControlUnitPrivileged: + this.Session = new Session(result->SessionHandle, true); + break; + case OperationType.OpenFramework: + case OperationType.CloseFramework: + case OperationType.EnumServiceProviders: + case OperationType.EnumBiometricUnits: + case OperationType.EnumDatabases: + case OperationType.UnitArrival: + case OperationType.UnitRemoval: this.Framework = new Framework(result->SessionHandle); break; } + switch (this.OperationType) + { + case OperationType.Verify: + this.Parameter = new AsyncResultVerify(&result->Parameter.Verify); + break; + case OperationType.Identify: + this.Parameter = new AsyncResultIdentity(&result->Parameter.Identify); + break; + case OperationType.EnrollBegin: + this.Parameter = new AsyncResultEnrollBegin(&result->Parameter.EnrollBegin); + break; + case OperationType.EnrollCapture: + this.Parameter = new AsyncResultEnrollCapture(&result->Parameter.EnrollCapture); + break; + case OperationType.EnrollCommit: + this.Parameter = new AsyncResultEnrollCommit(&result->Parameter.EnrollCommit); + break; + case OperationType.EnumEnrollments: + this.Parameter = new AsyncResultEnumEnrollments(&result->Parameter.EnumEnrollments); + break; + case OperationType.DeleteTemplate: + this.Parameter = new AsyncResultDeleteTemplate(&result->Parameter.DeleteTemplate); + break; + case OperationType.CaptureSample: + this.Parameter = new AsyncResultCaptureSample(&result->Parameter.CaptureSample); + break; + case OperationType.GetProperty: + this.Parameter = new AsyncResultGetProperty(&result->Parameter.GetProperty); + break; + case OperationType.SetProperty: + this.Parameter = new AsyncResultSetProperty(&result->Parameter.SetProperty); + break; + case OperationType.GetEvent: + this.Parameter = new AsyncResultGetEvent(&result->Parameter.GetEvent); + break; + case OperationType.ControlUnit: + case OperationType.ControlUnitPrivileged: + this.Parameter = new AsyncResultControlUnit(&result->Parameter.ControlUnit); + break; + case OperationType.EnumServiceProviders: + this.Parameter = new AsyncResultEnumServiceProviders(&result->Parameter.EnumServiceProviders); + break; + case OperationType.EnumBiometricUnits: + this.Parameter = new AsyncResultEnumBiometricUnits(&result->Parameter.EnumBiometricUnits); + break; + case OperationType.EnumDatabases: + this.Parameter = new AsyncResultEnumDatabases(&result->Parameter.EnumDatabases); + break; + } + this.UnitId = result->UnitId; this.UserData = result->UserData; this.TimeStamp = DateTime.FromFileTime(result->TimeStamp); @@ -60,46 +112,73 @@ internal unsafe AsyncResult(SafeNativeMethods.WINBIO_ASYNC_RESULT* result) #region Properties + /// + /// Gets the error code returned by the operation. + /// public HRESULT ApiStatus { get; } + /// + /// Gets the handle of an asynchronous session started by calling the function. + /// public Framework Framework { get; } - public OperationTypes OperationType + /// + /// Gets type of the asynchronous operation. + /// + public OperationType OperationType { get; } - public ulong SequenceNumber + /// + /// Gets the data that contain additional information about the success or failure of asynchronous operations begun by the client application. + /// + public AsyncResultParameter Parameter { get; } - public WINBIO_SESSION_HANDLE SessionHandle + /// + /// Gets the sequence number of the asynchronous operation. + /// + public ulong SequenceNumber { get; } + /// + /// Gets the handle of an asynchronous session started by calling the function. + /// public Session Session { get; } + /// + /// Gets the system date and time at which the biometric operation began. + /// public DateTime TimeStamp { get; } + /// + /// Gets the numeric unit identifier of the biometric unit that performed the operation. + /// public uint UnitId { get; } + /// + /// Gets the address of an optional buffer supplied by the caller. + /// public IntPtr UserData { get; @@ -107,19 +186,6 @@ public IntPtr UserData #endregion - #region Methods - - #region Overrids - #endregion - - #region Event Handlers - #endregion - - #region Helpers - #endregion - - #endregion - } } \ No newline at end of file diff --git a/sources/WinBiometricDotNet/AsyncResultCaptureSample.cs b/sources/WinBiometricDotNet/AsyncResultCaptureSample.cs new file mode 100644 index 0000000..f64d94b --- /dev/null +++ b/sources/WinBiometricDotNet/AsyncResultCaptureSample.cs @@ -0,0 +1,64 @@ +using System; +using System.Runtime.InteropServices; +using WinBiometricDotNet.Interop; + +namespace WinBiometricDotNet +{ + + public sealed class AsyncResultCaptureSample : AsyncResultParameter + { + + #region Constructors + + internal unsafe AsyncResultCaptureSample(SafeNativeMethods.WINBIO_ASYNC_RESULT_CAPTURESAMPLE* captureSample) + { + this.RejectDetail = (RejectDetail)captureSample->RejectDetail; + this.SampleSize = (int)captureSample->SampleSize; + + var sample = (SafeNativeMethods.WINBIO_BIR*)captureSample->Sample; + if (captureSample != null) + { + var tmp = (UIntPtr)((ulong)sample + sample->StandardDataBlock.Offset); + var ansiBdbHeader = (SafeNativeMethods.WINBIO_BDB_ANSI_381_HEADER*)tmp; + var bdbAnsi381Header = sizeof(SafeNativeMethods.WINBIO_BDB_ANSI_381_HEADER); + var ansiBdbRecord = (SafeNativeMethods.WINBIO_BDB_ANSI_381_RECORD*)((byte*)(ansiBdbHeader) + bdbAnsi381Header); + var bdbAnsi381Record = sizeof(SafeNativeMethods.WINBIO_BDB_ANSI_381_RECORD); + var firstPixel = (IntPtr)ansiBdbRecord + bdbAnsi381Record; + + var image = new byte[ansiBdbRecord->BlockLength - bdbAnsi381Record]; + Marshal.Copy(firstPixel, image, 0, image.Length); + + this.Sample = new CaptureSample(ansiBdbRecord->HorizontalLineLength, + ansiBdbRecord->VerticalLineLength, + ansiBdbHeader->HorizontalScanResolution, + ansiBdbHeader->VerticalScanResolution, + ansiBdbHeader->HorizontalImageResolution, + ansiBdbHeader->VerticalImageResolution, + image); + } + } + + #endregion + + #region Properties + + public CaptureSample Sample + { + get; + } + + public int SampleSize + { + get; + } + + public RejectDetail RejectDetail + { + get; + } + + #endregion + + } + +} \ No newline at end of file diff --git a/sources/WinBiometricDotNet/AsyncResultControlUnit.cs b/sources/WinBiometricDotNet/AsyncResultControlUnit.cs new file mode 100644 index 0000000..35f82c7 --- /dev/null +++ b/sources/WinBiometricDotNet/AsyncResultControlUnit.cs @@ -0,0 +1,71 @@ +using System; +using System.Runtime.InteropServices; +using WinBiometricDotNet.Interop; + +namespace WinBiometricDotNet +{ + + public sealed class AsyncResultControlUnit : AsyncResultParameter + { + + #region Constructors + + internal unsafe AsyncResultControlUnit(SafeNativeMethods.WINBIO_ASYNC_RESULT_CONTROLUNIT* controlUnit) + { + this.Component = (Component)controlUnit->Component; + this.ControlCode = controlUnit->ControlCode; + this.OperationStatus = (OperationStatus)controlUnit->OperationStatus; + this.ReceiveDataSize = (int)controlUnit->ReceiveDataSize; + + if (controlUnit->SendBuffer != IntPtr.Zero) + { + this.SendBuffer = new byte[(int)controlUnit->SendBufferSize]; + Marshal.Copy(controlUnit->SendBuffer, this.SendBuffer, 0, this.SendBuffer.Length); + } + + if (controlUnit->ReceiveBuffer != IntPtr.Zero) + { + this.ReceiveBuffer = new byte[(int)controlUnit->ReceiveBufferSize]; + Marshal.Copy(controlUnit->ReceiveBuffer, this.ReceiveBuffer, 0, this.ReceiveBuffer.Length); + } + } + + #endregion + + #region Properties + + public Component Component + { + get; + } + + public uint ControlCode + { + get; + } + + public OperationStatus OperationStatus + { + get; + } + + public byte[] ReceiveBuffer + { + get; + } + + public int ReceiveDataSize + { + get; + } + + public byte[] SendBuffer + { + get; + } + + #endregion + + } + +} \ No newline at end of file diff --git a/sources/WinBiometricDotNet/AsyncResultDeleteTemplate.cs b/sources/WinBiometricDotNet/AsyncResultDeleteTemplate.cs new file mode 100644 index 0000000..49ccb8d --- /dev/null +++ b/sources/WinBiometricDotNet/AsyncResultDeleteTemplate.cs @@ -0,0 +1,35 @@ +using WinBiometricDotNet.Interop; + +namespace WinBiometricDotNet +{ + + public sealed class AsyncResultDeleteTemplate : AsyncResultParameter + { + + #region Constructors + + internal unsafe AsyncResultDeleteTemplate(SafeNativeMethods.WINBIO_ASYNC_RESULT_DELETESAMPLE* deleteSample) + { + this.Identity = new BiometricIdentity(&deleteSample->Identity); + this.FingerPosition = (FingerPosition)deleteSample->SubFactor; + } + + #endregion + + #region Properties + + public BiometricIdentity Identity + { + get; + } + + public FingerPosition FingerPosition + { + get; + } + + #endregion + + } + +} \ No newline at end of file diff --git a/sources/WinBiometricDotNet/AsyncResultEnrollBegin.cs b/sources/WinBiometricDotNet/AsyncResultEnrollBegin.cs new file mode 100644 index 0000000..eeac90b --- /dev/null +++ b/sources/WinBiometricDotNet/AsyncResultEnrollBegin.cs @@ -0,0 +1,29 @@ +using WinBiometricDotNet.Interop; + +namespace WinBiometricDotNet +{ + + public sealed class AsyncResultEnrollBegin : AsyncResultParameter + { + + #region Constructors + + internal unsafe AsyncResultEnrollBegin(SafeNativeMethods.WINBIO_ASYNC_RESULT_ENROLLBEGIN* enrollbegin) + { + this.FingerPosition = (FingerPosition)enrollbegin->SubFactor; + } + + #endregion + + #region Properties + + public FingerPosition FingerPosition + { + get; + } + + #endregion + + } + +} \ No newline at end of file diff --git a/sources/WinBiometricDotNet/AsyncResultEnrollCapture.cs b/sources/WinBiometricDotNet/AsyncResultEnrollCapture.cs new file mode 100644 index 0000000..49acdcd --- /dev/null +++ b/sources/WinBiometricDotNet/AsyncResultEnrollCapture.cs @@ -0,0 +1,29 @@ +using WinBiometricDotNet.Interop; + +namespace WinBiometricDotNet +{ + + public sealed class AsyncResultEnrollCapture : AsyncResultParameter + { + + #region Constructors + + internal unsafe AsyncResultEnrollCapture(SafeNativeMethods.WINBIO_ASYNC_RESULT_ENROLLCAPTURE* enrollCapture) + { + this.RejectDetail = (RejectDetail)enrollCapture->RejectDetail; + } + + #endregion + + #region Properties + + public RejectDetail RejectDetail + { + get; + } + + #endregion + + } + +} \ No newline at end of file diff --git a/sources/WinBiometricDotNet/AsyncResultEnrollCommit.cs b/sources/WinBiometricDotNet/AsyncResultEnrollCommit.cs new file mode 100644 index 0000000..c4c8f43 --- /dev/null +++ b/sources/WinBiometricDotNet/AsyncResultEnrollCommit.cs @@ -0,0 +1,35 @@ +using WinBiometricDotNet.Interop; + +namespace WinBiometricDotNet +{ + + public sealed class AsyncResultEnrollCommit : AsyncResultParameter + { + + #region Constructors + + internal unsafe AsyncResultEnrollCommit(SafeNativeMethods.WINBIO_ASYNC_RESULT_ENROLLCOMMIT* enrollCommit) + { + this.Identity = new BiometricIdentity(&enrollCommit->Identity); + this.IsNewTemplate = enrollCommit->IsNewTemplate; + } + + #endregion + + #region Properties + + public BiometricIdentity Identity + { + get; + } + + public bool IsNewTemplate + { + get; + } + + #endregion + + } + +} \ No newline at end of file diff --git a/sources/WinBiometricDotNet/AsyncResultEnumBiometricUnits.cs b/sources/WinBiometricDotNet/AsyncResultEnumBiometricUnits.cs new file mode 100644 index 0000000..03ee588 --- /dev/null +++ b/sources/WinBiometricDotNet/AsyncResultEnumBiometricUnits.cs @@ -0,0 +1,41 @@ +using System; +using System.Runtime.InteropServices; +using WinBiometricDotNet.Interop; + +namespace WinBiometricDotNet +{ + + public sealed class AsyncResultEnumBiometricUnits : AsyncResultParameter + { + + #region Constructors + + internal unsafe AsyncResultEnumBiometricUnits(SafeNativeMethods.WINBIO_ASYNC_RESULT_ENUMBIOMETRICUNITS* enumBiometricUnits) + { + var count = (int)enumBiometricUnits->UnitCount; + this.BiometricUnits = new BiometricUnit[count]; + + var size = Marshal.SizeOf(); + var p = (byte*)enumBiometricUnits->UnitSchemaArray; + for (var index = 0; index < count; index++) + { + var tmp = p + size * index; + var schema = Marshal.PtrToStructure((IntPtr)tmp); + this.BiometricUnits[index] = new BiometricUnit(schema); + } + } + + #endregion + + #region Properties + + public BiometricUnit[] BiometricUnits + { + get; + } + + #endregion + + } + +} \ No newline at end of file diff --git a/sources/WinBiometricDotNet/AsyncResultEnumDatabases.cs b/sources/WinBiometricDotNet/AsyncResultEnumDatabases.cs new file mode 100644 index 0000000..930723d --- /dev/null +++ b/sources/WinBiometricDotNet/AsyncResultEnumDatabases.cs @@ -0,0 +1,41 @@ +using System; +using System.Runtime.InteropServices; +using WinBiometricDotNet.Interop; + +namespace WinBiometricDotNet +{ + + public sealed class AsyncResultEnumDatabases : AsyncResultParameter + { + + #region Constructors + + internal unsafe AsyncResultEnumDatabases(SafeNativeMethods.WINBIO_ASYNC_RESULT_ENUMDATABASES* enumDatabases) + { + var count = (int)enumDatabases->StorageCount; + this.Databases = new BiometricDatabase[count]; + + var size = Marshal.SizeOf(); + var p = (byte*)enumDatabases->StorageSchemaArray; + for (var index = 0; index < count; index++) + { + var tmp = p + size * index; + var schema = Marshal.PtrToStructure((IntPtr)tmp); + this.Databases[index] = new BiometricDatabase(schema); + } + } + + #endregion + + #region Properties + + public BiometricDatabase[] Databases + { + get; + } + + #endregion + + } + +} \ No newline at end of file diff --git a/sources/WinBiometricDotNet/AsyncResultEnumEnrollments.cs b/sources/WinBiometricDotNet/AsyncResultEnumEnrollments.cs new file mode 100644 index 0000000..8ce1788 --- /dev/null +++ b/sources/WinBiometricDotNet/AsyncResultEnumEnrollments.cs @@ -0,0 +1,40 @@ +using System.Linq; +using System.Runtime.InteropServices; +using WinBiometricDotNet.Interop; + +namespace WinBiometricDotNet +{ + + public sealed class AsyncResultEnumEnrollments : AsyncResultParameter + { + + #region Constructors + + internal unsafe AsyncResultEnumEnrollments(SafeNativeMethods.WINBIO_ASYNC_RESULT_ENUMENROLLMENTS* enumEnrollments) + { + this.Identity = new BiometricIdentity(&enumEnrollments->Identity); + + var array = new byte[(int)enumEnrollments->SubFactorCount]; + Marshal.Copy(enumEnrollments->SubFactorArray, array, 0, (int)enumEnrollments->SubFactorCount); + this.FingerPositions = array.Select(f => (FingerPosition)f).ToArray(); + } + + #endregion + + #region Properties + + public BiometricIdentity Identity + { + get; + } + + public FingerPosition[] FingerPositions + { + get; + } + + #endregion + + } + +} \ No newline at end of file diff --git a/sources/WinBiometricDotNet/AsyncResultEnumServiceProviders.cs b/sources/WinBiometricDotNet/AsyncResultEnumServiceProviders.cs new file mode 100644 index 0000000..09f8c6a --- /dev/null +++ b/sources/WinBiometricDotNet/AsyncResultEnumServiceProviders.cs @@ -0,0 +1,41 @@ +using System; +using System.Runtime.InteropServices; +using WinBiometricDotNet.Interop; + +namespace WinBiometricDotNet +{ + + public sealed class AsyncResultEnumServiceProviders : AsyncResultParameter + { + + #region Constructors + + internal unsafe AsyncResultEnumServiceProviders(SafeNativeMethods.WINBIO_ASYNC_RESULT_ENUMSERVICEPROVIDERS* enumServiceProviders) + { + var count = (int)enumServiceProviders->BspCount; + this.ServiceProviders = new BiometricServiceProvider[count]; + + var size = Marshal.SizeOf(); + var p = (byte*)enumServiceProviders->BspSchemaArray; + for (var index = 0; index < count; index++) + { + var tmp = p + size * index; + var schema = Marshal.PtrToStructure((IntPtr)tmp); + this.ServiceProviders[index] = new BiometricServiceProvider(schema); + } + } + + #endregion + + #region Properties + + public BiometricServiceProvider[] ServiceProviders + { + get; + } + + #endregion + + } + +} \ No newline at end of file diff --git a/sources/WinBiometricDotNet/AsyncResultGetEvent.cs b/sources/WinBiometricDotNet/AsyncResultGetEvent.cs new file mode 100644 index 0000000..565f8b8 --- /dev/null +++ b/sources/WinBiometricDotNet/AsyncResultGetEvent.cs @@ -0,0 +1,55 @@ +using WinBiometricDotNet.Interop; + +namespace WinBiometricDotNet +{ + + public sealed class AsyncResultGetEvent : AsyncResultParameter + { + + #region Constructors + + internal unsafe AsyncResultGetEvent(SafeNativeMethods.WINBIO_ASYNC_RESULT_GETEVENT* getEvent) + { + var @event = &getEvent->Event; + switch (@event->Type) + { + case SafeNativeMethods.WINBIO_EVENT_FP_UNCLAIMED: + var winbioEventUnclaimed = @event->Parameters.Unclaimed; + this.Parameter = new UnclaimedEvent(winbioEventUnclaimed.UnitId, + (RejectDetail)winbioEventUnclaimed.RejectDetail); + break; + case SafeNativeMethods.WINBIO_EVENT_FP_UNCLAIMED_IDENTIFY: + var winbioEventUnclaimedidentity = @event->Parameters.UnclaimedIdentify; + this.Parameter = new UnclaimedIdentifyEvent(winbioEventUnclaimedidentity.UnitId, + (FingerPosition)winbioEventUnclaimedidentity.SubFactor, + new BiometricIdentity(&winbioEventUnclaimedidentity.Identity), + (RejectDetail)winbioEventUnclaimedidentity.RejectDetail); + break; + case SafeNativeMethods.WINBIO_EVENT_ERROR: + var winbioEventError = @event->Parameters.Error; + this.Parameter = new ErrorEvent(winbioEventError.ErrorCode); + break; + } + + this.EventType = (EventTypes)@event->Type; + } + + #endregion + + #region Properties + + public EventTypes EventType + { + get; + } + + public EventParameter Parameter + { + get; + } + + #endregion + + } + +} \ No newline at end of file diff --git a/sources/WinBiometricDotNet/AsyncResultGetProperty.cs b/sources/WinBiometricDotNet/AsyncResultGetProperty.cs new file mode 100644 index 0000000..c7ea96c --- /dev/null +++ b/sources/WinBiometricDotNet/AsyncResultGetProperty.cs @@ -0,0 +1,60 @@ +using System; +using System.Runtime.InteropServices; +using WinBiometricDotNet.Interop; + +namespace WinBiometricDotNet +{ + + public sealed class AsyncResultGetProperty : AsyncResultParameter + { + + #region Constructors + + internal unsafe AsyncResultGetProperty(SafeNativeMethods.WINBIO_ASYNC_RESULT_GETPROPERTY* getProperty) + { + this.Identity = new BiometricIdentity(&getProperty->Identity); + this.FingerPosition = (FingerPosition)getProperty->SubFactor; + this.PropertyType = (PropertyType)getProperty->PropertyType; + this.PropertyId = (PropertyId)getProperty->PropertyId; + + if (getProperty->PropertyBuffer != IntPtr.Zero) + { + this.PropertyBuffer = new byte[(int)getProperty->PropertyBufferSize]; + Marshal.Copy(getProperty->PropertyBuffer, this.PropertyBuffer, 0, this.PropertyBuffer.Length); + } + } + + #endregion + + #region Properties + + public BiometricIdentity Identity + { + get; + } + + public FingerPosition FingerPosition + { + get; + } + + public byte[] PropertyBuffer + { + get; + } + + public PropertyId PropertyId + { + get; + } + + public PropertyType PropertyType + { + get; + } + + #endregion + + } + +} \ No newline at end of file diff --git a/sources/WinBiometricDotNet/AsyncResultIdentity.cs b/sources/WinBiometricDotNet/AsyncResultIdentity.cs new file mode 100644 index 0000000..4daa7ab --- /dev/null +++ b/sources/WinBiometricDotNet/AsyncResultIdentity.cs @@ -0,0 +1,41 @@ +using WinBiometricDotNet.Interop; + +namespace WinBiometricDotNet +{ + + public sealed class AsyncResultIdentity : AsyncResultParameter + { + + #region Constructors + + internal unsafe AsyncResultIdentity(SafeNativeMethods.WINBIO_ASYNC_RESULT_IDENTITY* identity) + { + this.Identity = new BiometricIdentity(&identity->Identity); + this.FingerPosition = (FingerPosition)identity->SubFactor; + this.RejectDetail = (RejectDetail)identity->RejectDetail; + } + + #endregion + + #region Properties + + public BiometricIdentity Identity + { + get; + } + + public FingerPosition FingerPosition + { + get; + } + + public RejectDetail RejectDetail + { + get; + } + + #endregion + + } + +} \ No newline at end of file diff --git a/sources/WinBiometricDotNet/AsyncResultParameter.cs b/sources/WinBiometricDotNet/AsyncResultParameter.cs new file mode 100644 index 0000000..ba3f3cd --- /dev/null +++ b/sources/WinBiometricDotNet/AsyncResultParameter.cs @@ -0,0 +1,8 @@ +namespace WinBiometricDotNet +{ + + public abstract class AsyncResultParameter + { + } + +} \ No newline at end of file diff --git a/sources/WinBiometricDotNet/AsyncResultSetProperty.cs b/sources/WinBiometricDotNet/AsyncResultSetProperty.cs new file mode 100644 index 0000000..01e92ad --- /dev/null +++ b/sources/WinBiometricDotNet/AsyncResultSetProperty.cs @@ -0,0 +1,60 @@ +using System; +using System.Runtime.InteropServices; +using WinBiometricDotNet.Interop; + +namespace WinBiometricDotNet +{ + + public sealed class AsyncResultSetProperty : AsyncResultParameter + { + + #region Constructors + + internal unsafe AsyncResultSetProperty(SafeNativeMethods.WINBIO_ASYNC_RESULT_SETPROPERTY* setProperty) + { + this.Identity = new BiometricIdentity(&setProperty->Identity); + this.FingerPosition = (FingerPosition)setProperty->SubFactor; + this.PropertyType = (PropertyType)setProperty->PropertyType; + this.PropertyId = (PropertyId)setProperty->PropertyId; + + if (setProperty->PropertyBuffer != IntPtr.Zero) + { + this.PropertyBuffer = new byte[(int)setProperty->PropertyBufferSize]; + Marshal.Copy(setProperty->PropertyBuffer, this.PropertyBuffer, 0, this.PropertyBuffer.Length); + } + } + + #endregion + + #region Properties + + public BiometricIdentity Identity + { + get; + } + + public FingerPosition FingerPosition + { + get; + } + + public byte[] PropertyBuffer + { + get; + } + + public PropertyId PropertyId + { + get; + } + + public PropertyType PropertyType + { + get; + } + + #endregion + + } + +} \ No newline at end of file diff --git a/sources/WinBiometricDotNet/AsyncResultVerify.cs b/sources/WinBiometricDotNet/AsyncResultVerify.cs index aec7b06..892d00c 100644 --- a/sources/WinBiometricDotNet/AsyncResultVerify.cs +++ b/sources/WinBiometricDotNet/AsyncResultVerify.cs @@ -1,16 +1,17 @@ -namespace WinBiometricDotNet +using WinBiometricDotNet.Interop; + +namespace WinBiometricDotNet { - public sealed class AsyncResultVerify + public sealed class AsyncResultVerify : AsyncResultParameter { #region Constructors - internal AsyncResultVerify(bool match, RejectDetails rejectDetail) + internal unsafe AsyncResultVerify(SafeNativeMethods.WINBIO_ASYNC_RESULT_VERIFY* verify) { - this.Match = match; - this.RejectDetail = rejectDetail; - + this.Match = verify->Match; + this.RejectDetail = (RejectDetail)verify->RejectDetail; } #endregion @@ -22,7 +23,7 @@ public bool Match get; } - public RejectDetails RejectDetail + public RejectDetail RejectDetail { get; } diff --git a/sources/WinBiometricDotNet/BiometricCapabilities.cs b/sources/WinBiometricDotNet/BiometricCapabilities.cs index 241f65b..a36b8d9 100644 --- a/sources/WinBiometricDotNet/BiometricCapabilities.cs +++ b/sources/WinBiometricDotNet/BiometricCapabilities.cs @@ -1,26 +1,72 @@ using System; +using WinBiometricDotNet.Interop; +using WINBIO_CAPABILITIES = System.UInt32; namespace WinBiometricDotNet { + /// + /// Specifies the capabilities of biometric sensor. + /// [Flags] - public enum BiometricCapabilities + public enum BiometricCapabilities : WINBIO_CAPABILITIES { - Sensor = (0x00000001), + /// + /// The device can collect biometric data. + /// + Sensor = SafeNativeMethods.WINBIO_CAPABILITY_SENSOR, - Matching = (0x00000002), + /// + /// The device can perform match operations. + /// + Matching = SafeNativeMethods.WINBIO_CAPABILITY_MATCHING, - Database = (0x00000004), + /// + /// The sensor contains an onboard database. + /// + Database = SafeNativeMethods.WINBIO_CAPABILITY_DATABASE, - Proccessing = (0x00000008), + /// + /// The device can process samples and turn them into biometric templates. + /// + Proccessing = SafeNativeMethods.WINBIO_CAPABILITY_PROCESSING, - Encryption = (0x00000010), + /// + /// The device supports encryption of samples and templates. + /// + Encryption = SafeNativeMethods.WINBIO_CAPABILITY_ENCRYPTION, - Navigation = (0x00000020), + /// + /// The device can be used as a navigation device. Some devices and drivers can capture data in a format that can be translated by a user-mode application into navigation events, much like a mouse. + /// + Navigation = SafeNativeMethods.WINBIO_CAPABILITY_NAVIGATION, - Indicator = (0x00000040) + /// + /// The device has an indicator that can be turned on or off. + /// + Indicator = SafeNativeMethods.WINBIO_CAPABILITY_INDICATOR, - } + /// + /// The sensor adapter manages its own connection to the biometric hardware. + /// + VirtualSensor = SafeNativeMethods.WINBIO_CAPABILITY_VIRTUAL_SENSOR, + + ///// + ///// The device supports security methods available in the WinBio engine adapter interface version 4.0 or later. + ///// + //SecureSensor = SafeNativeMethods.WINBIO_CAPABILITY_SECURE_SENSOR, + + ///// + ///// Secure Connection Protocol (SCP) V1 + ///// + //ScpV1 = SafeNativeMethods.WINBIO_CAPABILITY_SCP_V1, + + ///// + ///// Modern standby support + ///// + //Wake = SafeNativeMethods.WINBIO_CAPABILITY_WAKE, + +} } \ No newline at end of file diff --git a/sources/WinBiometricDotNet/BiometricDatabase.cs b/sources/WinBiometricDotNet/BiometricDatabase.cs index 49a0351..84cff80 100644 --- a/sources/WinBiometricDotNet/BiometricDatabase.cs +++ b/sources/WinBiometricDotNet/BiometricDatabase.cs @@ -5,6 +5,9 @@ namespace WinBiometricDotNet { + /// + /// The class describes the capabilities of a biometric storage adapter. + /// public sealed class BiometricDatabase { @@ -25,36 +28,57 @@ internal BiometricDatabase(SafeNativeMethods.WINBIO_STORAGE_SCHEMA schema) #region Properties + /// + /// Gets the type of biometric measurement saved in the database. + /// public BiometricTypes BiometricFactor { get; } + /// + /// Gets a string value that can be sent to a database server to identify the database. + /// public string ConnectionString { get; } + /// + /// Gets a flag about the characteristics of the database. + /// public DatabaseFlags DatabaseFlag { get; } + /// + /// Gets a GUID that identifies the database. + /// public Guid DatabaseId { get; } + /// + /// Gets a type about the characteristics of the database. + /// public DatabaseTypes DatabaseTypes { get; } + /// + /// Gets a GUID that identifies the format of the templates in the database. + /// public Guid DataFormat { get; } + /// + /// Gets the path and file name of the database if it resides on the computer disk. + /// public string FilePath { get; diff --git a/sources/WinBiometricDotNet/BiometricIdentity.cs b/sources/WinBiometricDotNet/BiometricIdentity.cs index 50240ce..0ce5416 100644 --- a/sources/WinBiometricDotNet/BiometricIdentity.cs +++ b/sources/WinBiometricDotNet/BiometricIdentity.cs @@ -6,23 +6,26 @@ namespace WinBiometricDotNet { + /// + /// The class contains an identifying value associated with a biometric template. + /// public sealed class BiometricIdentity { #region Constructors - internal BiometricIdentity(SafeNativeMethods.WINBIO_IDENTITY identity) + internal unsafe BiometricIdentity(SafeNativeMethods.WINBIO_IDENTITY* identity) { - this.Type = (IdentityTypes)identity.Type; - var value = identity.Value; + this.Type = (IdentityType)identity->Type; + var value = identity->Value; switch (this.Type) { - case IdentityTypes.Null: + case IdentityType.Null: break; - case IdentityTypes.WildCard: + case IdentityType.WildCard: break; - case IdentityTypes.Guid: + case IdentityType.Guid: unsafe { var templateGuid = value.TemplateGuid; @@ -34,7 +37,7 @@ internal BiometricIdentity(SafeNativeMethods.WINBIO_IDENTITY identity) this.TemplateGuid = new Guid(a, b, c, d); } break; - case IdentityTypes.Sid: + case IdentityType.Sid: unsafe { var accountSid = value.AccountSid; @@ -45,18 +48,24 @@ internal BiometricIdentity(SafeNativeMethods.WINBIO_IDENTITY identity) break; } - this.Source = identity; + this.Source = *identity; } #endregion #region Properties - public IdentityTypes Type + /// + /// Gets the format of the identity information contained in this class. + /// + public IdentityType Type { get; } + /// + /// Gets a value that contains an account SID. + /// public SecurityIdentifier Sid { get; @@ -67,6 +76,9 @@ internal SafeNativeMethods.WINBIO_IDENTITY Source get; } + /// + /// Gets a 128-bit GUID value that identifies the template. + /// public Guid TemplateGuid { get; diff --git a/sources/WinBiometricDotNet/BiometricPoolType.cs b/sources/WinBiometricDotNet/BiometricPoolType.cs index 01580b0..6521470 100644 --- a/sources/WinBiometricDotNet/BiometricPoolType.cs +++ b/sources/WinBiometricDotNet/BiometricPoolType.cs @@ -1,16 +1,19 @@ -namespace WinBiometricDotNet +using WinBiometricDotNet.Interop; +using WINBIO_POOL_TYPE = System.UInt32; + +namespace WinBiometricDotNet { - public enum BiometricPoolType + public enum BiometricPoolType: WINBIO_POOL_TYPE { - Unknown = 0, + Unknown = SafeNativeMethods.WINBIO_POOL_UNKNOWN, - System, + System = SafeNativeMethods.WINBIO_POOL_SYSTEM, - Private, + Private = SafeNativeMethods.WINBIO_POOL_PRIVATE, - Unassigned + Unassigned = SafeNativeMethods.WINBIO_POOL_UNASSIGNED } diff --git a/sources/WinBiometricDotNet/BiometricSensorSubType.cs b/sources/WinBiometricDotNet/BiometricSensorSubType.cs index 46706d5..6c80a31 100644 --- a/sources/WinBiometricDotNet/BiometricSensorSubType.cs +++ b/sources/WinBiometricDotNet/BiometricSensorSubType.cs @@ -1,14 +1,17 @@ -namespace WinBiometricDotNet +using WinBiometricDotNet.Interop; +using WINBIO_BIOMETRIC_SENSOR_SUBTYPE = System.UInt32; + +namespace WinBiometricDotNet { - public enum BiometricSensorSubType + public enum BiometricSensorSubType : WINBIO_BIOMETRIC_SENSOR_SUBTYPE { - Unknown = 0, + Unknown = SafeNativeMethods.WINBIO_SENSOR_SUBTYPE_UNKNOWN, - Swipe, + Swipe = SafeNativeMethods.WINBIO_FP_SENSOR_SUBTYPE_SWIPE, - Touch + Touch = SafeNativeMethods.WINBIO_FP_SENSOR_SUBTYPE_TOUCH } diff --git a/sources/WinBiometricDotNet/BiometricTypes.cs b/sources/WinBiometricDotNet/BiometricTypes.cs index 1872dd4..80abdb6 100644 --- a/sources/WinBiometricDotNet/BiometricTypes.cs +++ b/sources/WinBiometricDotNet/BiometricTypes.cs @@ -1,60 +1,139 @@ using System; +using WinBiometricDotNet.Interop; namespace WinBiometricDotNet { + /// + /// Represent the standard biometric types defined by National Institute of Standards and Technology Information (NISTIR) 6529-A. + /// [Flags] public enum BiometricTypes : uint { - Mask = 0x00FFFFFF, - - NoAvailable = 0x00000000, - - Multiple = 0x00000001, - - FacialFeatures = 0x00000002, - - Voice = 0x00000004, - - Fingerprint = 0x00000008, - - Iris = 0x00000010, - - Retina = 0x00000020, - - HandGeometry = 0x00000040, - - SignatureDynamics = 0x00000080, - - KeystrokeDynamics = 0x00000100, - - LipMovement = 0x00000200, - - ThermalFaceImage = 0x00000400, - - ThermalHandImage = 0x00000800, - - Gait = 0x00001000, - - Scent = 0x00002000, - - Dna = 0x00004000, - - EarShape = 0x00008000, - - FingerGeometry = 0x00010000, - - Palmprint = 0x00020000, - - VeinPattern = 0x00040000, - - FootPrint = 0x00080000, - - Other = 0x40000000, - - Password = 0x80000000, - + /// + /// Bitmask that specifies the supported set of biometric factors. + /// + Mask = SafeNativeMethods.WINBIO_STANDARD_TYPE_MASK, + + /// + /// No biometric type is available. + /// + NoAvailable = SafeNativeMethods.WINBIO_NO_TYPE_AVAILABLE, + + /// + /// Multiple types are specified. + /// + Multiple = SafeNativeMethods.WINBIO_TYPE_MULTIPLE, + + /// + /// The biometric sensor captures facial features. + /// + FacialFeatures = SafeNativeMethods.WINBIO_TYPE_FACIAL_FEATURES, + + /// + /// The biometric sensor captures voice data. + /// + Voice = SafeNativeMethods.WINBIO_TYPE_VOICE, + + /// + /// The biometric sensor captures fingerprint data. + /// + Fingerprint = SafeNativeMethods.WINBIO_TYPE_FINGERPRINT, + + /// + /// The biometric sensor captures iris data. + /// + Iris = SafeNativeMethods.WINBIO_TYPE_IRIS, + + /// + /// The biometric sensor captures retina data. + /// + Retina = SafeNativeMethods.WINBIO_TYPE_RETINA, + + /// + /// The biometric sensor captures hand data. + /// + HandGeometry = SafeNativeMethods.WINBIO_TYPE_HAND_GEOMETRY, + + /// + /// The biometric sensor captures signatures. + /// + SignatureDynamics = SafeNativeMethods.WINBIO_TYPE_SIGNATURE_DYNAMICS, + + /// + /// The biometric sensor captures keystrokes. + /// + KeystrokeDynamics = SafeNativeMethods.WINBIO_TYPE_KEYSTROKE_DYNAMICS, + + /// + /// The biometric sensor captures lip data. + /// + LipMovement = SafeNativeMethods.WINBIO_TYPE_LIP_MOVEMENT, + + /// + /// The biometric sensor captures thermal face imaging. + /// + ThermalFaceImage = SafeNativeMethods.WINBIO_TYPE_THERMAL_FACE_IMAGE, + + /// + /// The biometric sensor captures thermal hand imaging. + /// + ThermalHandImage = SafeNativeMethods.WINBIO_TYPE_THERMAL_HAND_IMAGE, + + /// + /// The biometric sensor captures walking gait data. + /// + Gait = SafeNativeMethods.WINBIO_TYPE_GAIT, + + /// + /// The biometric sensor captures scent data. + /// + Scent = SafeNativeMethods.WINBIO_TYPE_SCENT, + + /// + /// The biometric sensor captures DNA data. + /// + Dna = SafeNativeMethods.WINBIO_TYPE_DNA, + + /// + /// The biometric sensor captures ear information. + /// + EarShape = SafeNativeMethods.WINBIO_TYPE_EAR_SHAPE, + + /// + /// The biometric sensor captures finger shape information. + /// + FingerGeometry = SafeNativeMethods.WINBIO_TYPE_FINGER_GEOMETRY, + + /// + /// The biometric sensor captures palm prints. + /// + Palmprint = SafeNativeMethods.WINBIO_TYPE_PALM_PRINT, + + /// + /// The biometric sensor captures blood vein pattern data. + /// + VeinPattern = SafeNativeMethods.WINBIO_TYPE_VEIN_PATTERN, + + /// + /// The biometric sensor captures foot prints. + /// + FootPrint = SafeNativeMethods.WINBIO_TYPE_FOOT_PRINT, + + /// + /// The supported biometric data is not defined by the current constants. + /// + Other = SafeNativeMethods.WINBIO_TYPE_OTHER, + + /// + /// The biometric sensor captures password data. + /// + Password = SafeNativeMethods.WINBIO_TYPE_PASSWORD, + + /// + /// The biometric sensor captures any type of data. + /// Any = (Mask | Other | Password) } diff --git a/sources/WinBiometricDotNet/CaptureEnrollResult.cs b/sources/WinBiometricDotNet/CaptureEnrollResult.cs index 561a3fb..6daf408 100644 --- a/sources/WinBiometricDotNet/CaptureEnrollResult.cs +++ b/sources/WinBiometricDotNet/CaptureEnrollResult.cs @@ -6,12 +6,12 @@ public sealed class CaptureEnrollResult #region Constructors - internal CaptureEnrollResult(OperationStatus operationStatus, RejectDetails rejectDetail): + internal CaptureEnrollResult(OperationStatus operationStatus, RejectDetail rejectDetail): this(operationStatus, rejectDetail, false) { } - internal CaptureEnrollResult(OperationStatus operationStatus, RejectDetails rejectDetail, bool isRequiredMoreData) + internal CaptureEnrollResult(OperationStatus operationStatus, RejectDetail rejectDetail, bool isRequiredMoreData) { this.OperationStatus = operationStatus; this.RejectDetail = rejectDetail; @@ -27,7 +27,7 @@ public OperationStatus OperationStatus get; } - public RejectDetails RejectDetail + public RejectDetail RejectDetail { get; } diff --git a/sources/WinBiometricDotNet/CaptureSampleResult.cs b/sources/WinBiometricDotNet/CaptureSampleResult.cs index 13689b5..9ec8185 100644 --- a/sources/WinBiometricDotNet/CaptureSampleResult.cs +++ b/sources/WinBiometricDotNet/CaptureSampleResult.cs @@ -6,7 +6,7 @@ public sealed class CaptureSampleResult #region Constructors - internal CaptureSampleResult(uint unitId, OperationStatus operationStatus, RejectDetails rejectDetail, uint sampleSize) + internal CaptureSampleResult(uint unitId, OperationStatus operationStatus, RejectDetail rejectDetail, uint sampleSize) { this.UnitId = unitId; this.OperationStatus = operationStatus; @@ -29,7 +29,7 @@ public OperationStatus OperationStatus get; } - public RejectDetails RejectDetail + public RejectDetail RejectDetail { get; } diff --git a/sources/WinBiometricDotNet/ChangeTypes.cs b/sources/WinBiometricDotNet/ChangeTypes.cs index 241d1da..022ef78 100644 --- a/sources/WinBiometricDotNet/ChangeTypes.cs +++ b/sources/WinBiometricDotNet/ChangeTypes.cs @@ -1,8 +1,10 @@ -using WinBiometricDotNet.Interop; +using System; +using WinBiometricDotNet.Interop; namespace WinBiometricDotNet { + [Flags] public enum ChangeTypes : uint { diff --git a/sources/WinBiometricDotNet/CredentialState.cs b/sources/WinBiometricDotNet/CredentialState.cs new file mode 100644 index 0000000..d45e179 --- /dev/null +++ b/sources/WinBiometricDotNet/CredentialState.cs @@ -0,0 +1,15 @@ +using WinBiometricDotNet.Interop; + +namespace WinBiometricDotNet +{ + + public enum CredentialState + { + + NotSet = SafeNativeMethods.WINBIO_CREDENTIAL_STATE.WINBIO_CREDENTIAL_NOT_SET, + + Set = SafeNativeMethods.WINBIO_CREDENTIAL_STATE.WINBIO_CREDENTIAL_SET + + } + +} \ No newline at end of file diff --git a/sources/WinBiometricDotNet/CredentialStates.cs b/sources/WinBiometricDotNet/CredentialStates.cs deleted file mode 100644 index 1046432..0000000 --- a/sources/WinBiometricDotNet/CredentialStates.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace WinBiometricDotNet -{ - - public enum CredentialStates - { - - NotSet = 0x00000001, - - Set = 0x00000002 - - } - -} \ No newline at end of file diff --git a/sources/WinBiometricDotNet/CredentialTypes.cs b/sources/WinBiometricDotNet/CredentialTypes.cs index 6e04858..f582970 100644 --- a/sources/WinBiometricDotNet/CredentialTypes.cs +++ b/sources/WinBiometricDotNet/CredentialTypes.cs @@ -1,12 +1,16 @@ -namespace WinBiometricDotNet +using System; +using WinBiometricDotNet.Interop; + +namespace WinBiometricDotNet { + [Flags] public enum CredentialTypes : uint { - Password = 0x00000001, + Password = SafeNativeMethods.WINBIO_CREDENTIAL_TYPE.WINBIO_CREDENTIAL_PASSWORD, - All = 0xffffffff + All = SafeNativeMethods.WINBIO_CREDENTIAL_TYPE.WINBIO_CREDENTIAL_ALL } diff --git a/sources/WinBiometricDotNet/DatabaseFlags.cs b/sources/WinBiometricDotNet/DatabaseFlags.cs index fde7421..743d82a 100644 --- a/sources/WinBiometricDotNet/DatabaseFlags.cs +++ b/sources/WinBiometricDotNet/DatabaseFlags.cs @@ -1,15 +1,17 @@ using System; +using WinBiometricDotNet.Interop; +using ULONG = System.UInt32; namespace WinBiometricDotNet { [Flags] - public enum DatabaseFlags + public enum DatabaseFlags : ULONG { - Removable = 0x00010000, + Removable = SafeNativeMethods.WINBIO_DATABASE_FLAG_REMOVABLE, - Remote = 0x00020000 + Remote = SafeNativeMethods.WINBIO_DATABASE_FLAG_REMOTE } diff --git a/sources/WinBiometricDotNet/DatabaseTypes.cs b/sources/WinBiometricDotNet/DatabaseTypes.cs index 6da74bd..f1f7115 100644 --- a/sources/WinBiometricDotNet/DatabaseTypes.cs +++ b/sources/WinBiometricDotNet/DatabaseTypes.cs @@ -1,19 +1,21 @@ using System; +using WinBiometricDotNet.Interop; +using ULONG = System.UInt32; namespace WinBiometricDotNet { [Flags] - public enum DatabaseTypes + public enum DatabaseTypes: ULONG { - File = 0x00000001, + File = SafeNativeMethods.WINBIO_DATABASE_TYPE_FILE, - DatabaseManagementSystem = 0x00000002, + DatabaseManagementSystem = SafeNativeMethods.WINBIO_DATABASE_TYPE_DBMS, - OnChip = 0x00000003, + OnChip = SafeNativeMethods.WINBIO_DATABASE_TYPE_ONCHIP, - SmartCard = 0x00000004 + SmartCard = SafeNativeMethods.WINBIO_DATABASE_TYPE_SMARTCARD } diff --git a/sources/WinBiometricDotNet/Docs/ja/WinBiometricDotNet.xml b/sources/WinBiometricDotNet/Docs/ja/WinBiometricDotNet.xml new file mode 100644 index 0000000..f845e78 --- /dev/null +++ b/sources/WinBiometricDotNet/Docs/ja/WinBiometricDotNet.xml @@ -0,0 +1,6594 @@ + + + + WinBiometricDotNet + + + + + ユーザーのアンチ スプーフィング ポリシーを表現します。 + + + + + クラスの新しいインスタンスを初期化します。 + + + + + アンチ スプーフィング ポリシーとして採用するアクションを取得または設定します。 + + + + + アンチ スプーフィング ポリシーの値をを取得または設定します。 + + + + + アンチ スプーフィング ポリシーとして採用するアクションの種類を指定します。 + + + + + 生体要素に対するスプーフィングの検出を無効にします。 + + + + + 生体要素に対するスプーフィングの検出を有効にします。 + + + + + アカウントからバイオメトリックス要素に対する全てのアンチ スプーフィング ポリシーを削除します。 + + + + + イベント ハンドラーのデータを提供します。 + + + + + イベントの結果を表す値を取得します。 + + + + + イベントを処理するメソッドを表します。 + + イベントのソース。 + イベント データを格納します。 + + + + クライアント アプリケーションへ非同期操作に対する完了通知がどのように配信されるかを指定する定数を定義します。 + この API は 製品 インフラストラクチャをサポートします。コードから直接使用するためのものではありません。 + + + + + 操作が同期です。 + + + + + クライアント実装の PWINBIO_ASYNC_COMPLETION_CALLBACK 関数がフレームワークから呼び出されます。 + + + + + フレームワークがクライアント アプリケーションのウィンドウ メッセージ キューに対して完了通知を送信します。 + + + + + 最大列挙値。この定数は WinBioAsyncOpenFramework や WinBioAsyncOpenSession から直接使用されません。 + + + + + クラスは非同期操作の結果を格納します。 + + + + + 操作によるエラー コードを取得します。 + + + + + 関数の呼び出しによって開始された非同期セッションのハンドルを取得します。 + + + + + 非同期操作の種類を取得します。 + + + + + クライアント アプリケーションによって開始された非同期操作の成功または失敗についての追加情報を格納するデータを取得します。 + Gets encloses nested data that contain additional information about the success or failure of asynchronous operations begun by the client application. + + + + + 非同期操作のシーケンス番号を取得します。 + + + + + 関数の呼び出しによって開始された非同期セッションのハンドルを取得します。 + + + + + バイオメトリックス操作を開始した時点のシステム日時を取得します。 + + + + + 操作を実行するバイオメトリックス装置の数値的な装置識別子を取得します。 + + + + + 呼び出し側によって提供されたオプション バッファーのアドレスを取得します。 + + + + + バイオメトリックス センサーの能力を指定します。 + + + + + デバイスはバイオメトリックス データを収集可能です。 + + + + + デバイスは照合操作を実行可能です。 + + + + + センサーはオンボード データベースを格納します。 + + + + + デバイスはサンプルを処理しバイオメトリックス テンプレートに変換可能です。 + + + + + デバイスはサンプルとテンプレートの暗号化をサポートします。 + + + + + デバイスはナビゲーション デバイスとして利用可能です。いくつかのデバイス、ドライバーは、マウスのようなナビゲーション イベントへユーザーモード アプリケーションにより翻訳が可能なフォーマット内部にデータをキャプチャ可能です。 + + + + + デバイスはオン/オフが可能なインジケ一夕ーを備えています。 + + + + + センサー アダプターはバイオメトリックス ハードウェアへの接続を管理します。 + + + + + クラスはバイオメトリックス ストレージ アダプターの能力を表現します。 + + + + + データベース内に保存されたバイオメトリックス測定の種類を取得します。 + + + + + データベースを識別するデータベース サーバーに送信される文字列の値を取得します。 + + + + + データベースの特性についてのフラグを取得します。 + + + + + データベースを識別する GUID (グローバル一意識別子) を取得します。 + + + + + データベースの特性についての種別を取得します。 + + + + + データベース内のテンプレート フォーマットを識別する GUID (グローバル一意識別子) を取得します。 + + + + + コンピュータ ディスク上に存在する場合、データベースのパスとファイル名を取得します。 + + + + + クラスはバイオメトリックス テンプレートに関連付けられた識別値を格納します。 + + + + + このクラスに格納された情報を識別情報のフォーマットを取得します。 + + + + + アカウントの SID (セキュリティ識別子) を格納する値を取得します。 + + + + + テンプレートを識別する 128 ビットの GUID (グローバル一意識別子) を取得します。 + + + + + NISTIR 6529-A (米国標準技術局内部機関報告書 6529-A) によって定義された標準的なバイオメトリックスの種類を表現します。 + + + + + バイオメトリックス要素のサポートされた組み合わせを指定するビットマスクです。 + + + + + 利用可能なバイオメトリックスの種類がありません。 + + + + + 複数の種類が指定されています。 + + + + + バイオメトリックス センサーは顔特徴をキャプチャします。 + + + + + バイオメトリックス センサーは音声データをキャプチャします。 + + + + + バイオメトリックス センサーは指紋データをキャプチャします。 + + + + + バイオメトリックス センサーは虹彩データをキャプチャします。 + + + + + バイオメトリックス センサーは網膜データをキャプチャします。 + + + + + バイオメトリックス センサーは掌形データをキャプチャします。 + + + + + バイオメトリックス センサーは動的署名をキャプチャします。 + + + + + バイオメトリックス センサーはキー操作をキャプチャします。 + + + + + バイオメトリックス センサーはリップムーブメントをキャプチャします。 + + + + + バイオメトリックス センサーは顔面熱画像をキャプチャします。 + + + + + バイオメトリックス センサーは掌熱画像をキャプチャします。 + + + + + バイオメトリックス センサーは歩行・歩容データをキャプチャします。 + + + + + バイオメトリックス センサーは臭跡データをキャプチャします。 + + + + + バイオメトリックス センサーは DNA (デオキシリボ核酸) データをキャプチャします。 + + + + + バイオメトリックス センサーは耳情報をキャプチャします。 + + + + + バイオメトリックス センサーは指形データをキャプチャします。 + + + + + バイオメトリックス センサーは掌紋データをキャプチャします。 + + + + + バイオメトリックス センサーは静脈パターンデータをキャプチャします。 + + + + + バイオメトリックス センサーは足紋データをキャプチャします。 + + + + + サポートしているバイオメトリックス データは現時点で定義されていません。 + + + + + バイオメトリックス センサーはパスワード データをキャプチャします。 + + + + + バイオメトリックス センサーは任意のデータをキャプチャします。 + + + + + The operation completed successfully. + + + + + No more data is available. + + + + + Required to delete the object. + + + + + Required to read the DACL and ownership information for the object. For access to the system access control list (SACL), see ACCESS_SYSTEM_SECURITY later in this table. + + + + + test + + + + + Required to change the DACL information for the object. + + + + + Required to change the ownership information in the object's security descriptor (SECURITY_DESCRIPTOR). + + + + + Required to get or set the SACL in an object's ACL. The operating system grants this right to the new token only if the SE_SECURITY_NAME privilege is enabled in the access token of the calling thread. + + + + + Currently defined to equal READ_CONTROL. + + + + + Combines DELETE, READ_CONTROL, WRITE_DAC, and WRITE_OWNER access. + + + + + Combines DELETE, READ_CONTROL, WRITE_DAC, WRITE_OWNER, and SYNCHRONIZE access. However, the SYNCHRONIZE value is not applicable to token objects. Thus, STANDARD_RIGHTS_ALL has a functionally equivalent to STANDARD_RIGHTS_REQUIRED. + + + + + Required to change the default owner, primary group, or DACL of an access token. + + + + + Required to adjust the attributes of the groups in an access token. + + + + + Required to enable or disable the privileges in an access token. + + + + + Required to adjust the session ID (SID) of an access token. The operating system grants this right to the new token only if the SE_TCB_NAME privilege is enabled in the access token of the calling thread. + + + + + Required to attach a primary token to a process. The operating system grants this right to the new token only if the SE_ASSIGNPRIMARYTOKEN_NAME privilege is enabled in the access token of the calling thread. + + + + + Required to duplicate an access token. Note that the givenExistingTokenHandle token must contain this right in order to successfully use this routine. + + + + + Combines STANDARD_RIGHTS_EXECUTE and TOKEN_IMPERSONATE. + + + + + Required to attach an impersonation access token to a process. + + + + + Required to query an access token. + + + + + Required to query the source of an access token. + + + + + Combines STANDARD_RIGHTS_READ and TOKEN_QUERY. + + + + + Combines STANDARD_RIGHTS_WRITE, TOKEN_ADJUST_PRIVILEGES, TOKEN_ADJUST_GROUPS, and TOKEN_ADJUST_DEFAULT. + + + + + Combines all possible token access permissions for a token. + + + + + test + + + + + Permission to query subkey data. + + + + + Permission to set subkey data. + + + + + Permission to create subkeys. + + + + + Permission to enumerate subkeys. + + + + + Permission for change notification. + + + + + Permission to create a symbolic link. + + + + + Access a 32-bit key from either a 32-bit or 64-bit application. + + + + + Access a 64-bit key from either a 32-bit or 64-bit application. + + + + + + + + + + Combination of , , and access. + + + + + Combination of and access. + + + + + Permission for read access. + + + + + Combination of , , , , , and access. + + + + + No type restriction. + + + + + Restrict type to 32-bit | . + + + + + Restrict type to 64-bit | . + + + + + Restrict type to . + + + + + Restrict type to . + + + + + Restrict type to . + + + + + Restrict type to . + + + + + Restrict type to . + + + + + Restrict type to . + + + + + Restrict type to . + + + + + The key did not exist and was created. + + + + + The key existed and was simply opened without being changed. + + + + + Binary data in any form. + + + + + A 32-bit number. + + + + + A 32-bit number in little-endian format. + Windows is designed to run on little-endian computer architectures. Therefore, this value is defined as in the Windows header files. + + + + + A 32-bit number in big-endian format. + Some UNIX systems support big-endian architectures. + + + + + A null-terminated string that contains unexpanded references to environment variables (for example, "%PATH%"). It will be a Unicode or ANSI string depending on whether you use the Unicode or ANSI functions. To expand the environment variable references, use the function. + + + + + A null-terminated Unicode string that contains the target path of a symbolic link that was created by calling the function with . + + + + + A sequence of null-terminated strings, terminated by an empty string (\0). + The following is an example: + String1\0String2\0String3\0LastString\0\0 + The first \0 terminates the first string, the second to the last \0 terminates the last string, and the final \0 terminates the sequence. Note that the final terminator must be factored into the length of the string. + + + + + No defined value type. + + + + + A 64-bit number. + + + + + A 64-bit number in little-endian format. + Windows is designed to run on little-endian computer architectures. Therefore, this value is defined as in the Windows header files. + + + + + A null-terminated string. This will be either a Unicode or an ANSI string, depending on whether you use the Unicode or ANSI functions. + + + + + Reserved for future use. + + + + + Reserved for future use. + + + + + Reserved for future use. + + + + + Reserved for future use. + + + + + Reserved for future use. + + + + + The specified biometric factor is not supported. + + + + + The unit ID number does not correspond to a valid biometric device. + + + + + The biometric sample does not match any known identity. + + + + + The biometric operation was canceled before it could complete. + + + + + The biometric sample does not match the specified identity or sub-factor. + + + + + A biometric sample could not be captured because the capture operation was aborted. + + + + + An enrollment transaction could not be started because another enrollment is already in progress. + + + + + The captured sample cannot be used for further biometric operations. + + + + + The biometric unit does not support the specified unit control code. + + + + + A pending data collection operation is already in progress. + + + + + The biometric sensor driver does not support the requested data format. + + + + + The biometric sensor driver does not support the requested data type. + + + + + The biometric sensor driver does not support the requested data purpose. + + + + + The biometric unit is not in the proper state to perform the specified operation. + + + + + The operation could not be performed because the sensor device was busy. + + + + + The storage adapter was not able to create a new database. + + + + + The storage adapter was not able to open an existing database. + + + + + The storage adapter was not able to close a database. + + + + + The storage adapter was not able to erase a database. + + + + + The storage adapter was not able to find a database. + + + + + The storage adapter was not able to create a database because the specified database already exists. + + + + + The storage adapter was not able to add a record to the database because the database is full. + + + + + The database is locked and its contents are inaccessible. + + + + + The contents of the database have become corrupted and are inaccessible. + + + + + No records were deleted because the specified identity and sub-factor are not present in the database. + + + + + The specified identity and sub-factor are already enrolled in the database. + + + + + An error occurred while trying to read from the database. + + + + + An error occurred while trying to write to the database. + + + + + No records in the database matched the query. + + + + + All records from the most recent database query have been retrieved. + + + + + A database operation unexpectedly encountered the end of the file. + + + + + A database operation failed due to a malformed index vector. + + + + + The biometric unit does not belong to the specified service provider. + + + + + The biometric unit does not belong to the specified sensor pool. + + + + + The sensor adapter capture buffer is empty. + + + + + The sensor adapter does not support the sensor mode specified in the configuration. + + + + + The requested operation cannot be performed due to a locking conflict. + + + + + The data in a biometric template matches that of another template already in the database. + + + + + The requested operation is not valid for the current state of the session or the biometric unit. + + + + + The session cannot begin a new operation because another operation is already in progress. + + + + + System policy settings have disabled the biometric credential provider. + + + + + The requested credential was not found. + + + + + System policy settings have disabled the biometric service. + + + + + The biometric unit could not be configured. + + + + + A private pool cannot be created because one or more biometric units are not available. + + + + + A secure attention sequence (CTRL-ALT-DELETE) is required for logon. + + + + + A biometric sensor has failed. + + + + + >Fast user switching is disabled. + + + + + The System sensor pool cannot be opened from Terminal Server client sessions. + + + + + There is already an active event monitor associated with the specified session. + + + + + The value specified is not a valid property type. + + + + + The value specified is not a valid property ID. + + + + + The biometric unit does not support the specified property. + + + + + The adapter did not pass its integrity check. + + + + + This operation requires a different type of session handle. + + + + + This session handle has already been closed. + + + + + The requested operation was aborted because it would have caused a deadlock. + + + + + There is no pre-boot logon identity available. + + + + + The operation was aborted because there were too many errors. + + + + + System policy settings have disabled pre-boot auto-logon using biometrics. + + + + + The specified ticket is either incorrect or has expired. + + + + + The calling process has too many outstanding tickets. + + + + + The biometric service could not decrypt the data. + + + + + Biometric authentication has been disabled because of too many unregistered fingerpint scans. + + + + + The requested pool type is not supported by this biometric factor. + + + + + A specific individual must be selected in order to perform an enrollment. + + + + + A presence monitor is already active on that session. + + + + + The specified sub-factor value is out of range or is not supported. + + + + + The sensor adapter returned an invalid calibration format array. + + + + + The sensor and engine adapter don't share a common calibration format. + + + + + The sensor adapter does not support the requested calibration format. + + + + + The requested calibration buffer size is too small. + + + + + The requested calibration buffer size is too large. + + + + + The sensor adapter cannot process the contents of the calibration buffer. + + + + + The key identifier is invalid. + + + + + The key cannot be created. + + + + + The key identifier buffer is too small. + + + + + The biometric unt is unable to provide data for this property at the present time. + + + + + Policy protection is not available because a TPM 2.0 device is either not present or not supported. + + + + + The biometric sensor does not support a secure hardware data path. + + + + + The identifier does not refer to a valid buffer. + + + + + The contents of the buffer are not valid. + + + + + The Windows Biometric Service secure component was compromised. + + + + + The Windows Biometric Service canceled the enrollment because the platform entered a suspended state. + + + + + Another sample is needed for the current enrollment template. + + + + + Return data includes multiple status values, which must be checked separately. + + + + + For a directory, the right to create a file in the directory. + + + + + For a directory, the right to create a subdirectory. + + + + + All possible access rights for a file. + + + + + For a file object, the right to append data to the file. (For local files, write operations will not overwrite existing data if this flag is specified without .) For a directory object, the right to create a subdirectory (). + + + + + For a named pipe, the right to create a pipe. + + + + + For a directory, the right to delete a directory and all the files it contains, including read-only files. + + + + + For a native code file, the right to execute the file. This access right given to scripts may cause the script to be executable, depending on the script interpreter. + + + + + For a directory, the right to list the contents of the directory. + + + + + The right to read file attributes. + + + + + For a file object, the right to read the corresponding file data. For a directory object, the right to read the corresponding directory data. + + + + + The right to read extended file attributes. + + + + + For a directory, the right to traverse the directory. By default, users are assigned the privilege, which ignores the access right. See the remarks in File Security and Access Rights for more information. + + + + + The right to write file attributes. + + + + + For a file object, the right to write data to the file. For a directory object, the right to create a file in the directory (). + + + + + The right to write extended file attributes. + + + + + Includes READ_CONTROL, which is the right to read the information in the file or directory object's security descriptor. This does not include the information in the SACL. + + + + + Same as STANDARD_RIGHTS_READ. + + + + + The maximum length of a security identifier (SID) value. Currently this is 68. + + + + + The maximum length of a WINBIO_STRING value. Currently this is 256. + + + + + The maximum number of bytes in a single biometric data capture. + + + + + If this value is used, the system maps the file into the calling process's virtual address space as if it were a data file. Nothing is done to execute or prepare to execute the mapped file. Therefore, you cannot call functions like , or with this DLL. Using this value causes writes to read-only memory to raise an access violation. Use this flag when you want to load a DLL only to extract messages or resources from it. + This value can be used with . For more information, see Remarks. + + + + + Similar to , except that the DLL file is opened with exclusive write access for the calling process. Other processes cannot open the DLL file for write access while it is in use. However, the DLL can still be opened by other processes. + This value can be used with . For more information, see Remarks. + Windows Server 2003 and Windows XP: This value is not supported until Windows Vista. + + + + + If this value is used, the system maps the file into the process's virtual address space as an image file. However, the loader does not load the static imports or perform the other usual initialization steps. Use this flag when you want to load a DLL only to extract messages or resources from it. + Unless the application depends on the file having the in-memory layout of an image, this value should be used with either or . For more information, see the Remarks section. + Windows Server 2003 and Windows XP: This value is not supported until Windows Vista. + + + + + If this value is used, the application's installation directory is searched for the DLL and its dependencies. Directories in the standard search path are not searched. This value cannot be combined with . + Windows 7, Windows Server 2008 R2, Windows Vista, and Windows Server 2008: This value requires KB2533623 to be installed. + Windows Server 2003 and Windows XP: This value is not supported. + + + + + This value is a combination of , , and . Directories in the standard search path are not searched. This value cannot be combined with . + This value represents the recommended maximum number of directories an application should include in its DLL search path. + Windows 7, Windows Server 2008 R2, Windows Vista, and Windows Server 2008: This value requires KB2533623 to be installed. + Windows Server 2003 and Windows XP: This value is not supported. + + + + + If this value is used, the directory that contains the DLL is temporarily added to the beginning of the list of directories that are searched for the DLL's dependencies. Directories in the standard search path are not searched. + The parameter must specify a fully qualified path. This value cannot be combined with . + For example, if Lib2.dll is a dependency of C:\Dir1\Lib1.dll, loading Lib1.dll with this value causes the system to search for Lib2.dll only in C:\Dir1. To search for Lib2.dll in C:\Dir1 and all of the directories in the DLL search path, combine this value with . + Windows 7, Windows Server 2008 R2, Windows Vista, and Windows Server 2008: This value requires KB2533623 to be installed. + Windows Server 2003 and Windows XP: This value is not supported. + + + + + If this value is used, %windows%\system32 is searched for the DLL and its dependencies. Directories in the standard search path are not searched. This value cannot be combined with . + Windows 7, Windows Server 2008 R2, Windows Vista, and Windows Server 2008: This value requires KB2533623 to be installed. + Windows Server 2003 and Windows XP: This value is not supported. + + + + + If this value is used, directories added using the or the function are searched for the DLL and its dependencies. If more than one directory has been added, the order in which the directories are searched is unspecified. Directories in the standard search path are not searched. This value cannot be combined with . + Windows 7, Windows Server 2008 R2, Windows Vista, and Windows Server 2008: This value requires KB2533623 to be installed. + Windows Server 2003 and Windows XP: This value is not supported. + + + + + Registry entries subordinate to this key define types (or classes) of documents and the properties associated with those types. Shell and COM applications use the information stored under this key. + This key also provides backward compatibility with the Windows 3.1 registration database by storing information for DDE and OLE support. File viewers and user interface extensions store their OLE class identifiers in , and in-process servers are registered in this key. + This handle should not be used in a service or an application that impersonates different users. + For more information, see . + + + + + Contains information about the current hardware profile of the local computer system. The information under describes only the differences between the current hardware configuration and the standard configuration. Information about the standard hardware configuration is stored under the Software and System keys of . + is an alias for HKEY_LOCAL_MACHINE\System\CurrentControlSet\Hardware Profiles\Current. + For more information, see . + + + + + Registry entries subordinate to this key define the preferences of the current user. These preferences include the settings of environment variables, data about program groups, colors, printers, network connections, and application preferences. This key makes it easier to establish the current user's settings; the key maps to the current user's branch in HKEY_USERS. In , software vendors store the current user-specific preferences to be used within their applications. Microsoft, for example, creates the HKEY_CURRENT_USER\Software\Microsoft key for its applications to use, with each application creating its own subkey under the Microsoft key. + The mapping between and HKEY_USERS is per process and is established the first time the process references . The mapping is based on the security context of the first thread to reference . If this security context does not have a registry hive loaded in , the mapping is established with HKEY_USERS\.Default. After this mapping is established it persists, even if the security context of the thread changes. + All registry entries in except those under HKEY_CURRENT_USER\Software\Classes are included in the per-user registry portion of a roaming user profile. To exclude other entries from a roaming user profile, store them in . + This handle should not be used in a service or an application that impersonates different users. Instead, call the function. + For more information, see . + + + + + Registry entries subordinate to this key define preferences of the current user that are local to the machine. These entries are not included in the per-user registry portion of a roaming user profile. + Windows Server 2008, Windows Vista, Windows Server 2003, and Windows XP/2000: This key is supported starting with Windows 7 and Windows Server 2008 R2. + + + + + Registry entries subordinate to this key define the physical state of the computer, including data about the bus type, system memory, and installed hardware and software. It contains subkeys that hold current configuration data, including Plug and Play information (the Enum branch, which includes a complete list of all hardware that has ever been on the system), network logon preferences, network security information, software-related information (such as server names and the location of the server), and other system information. + For more information, see . + + + + + Registry entries subordinate to this key allow you to access performance data. The data is not actually stored in the registry; the registry functions cause the system to collect the data from its source. + + + + + Registry entries subordinate to this key reference the text strings that describe counters in the local language of the area in which the computer system is running. These entries are not available to Regedit.exe and Regedt32.exe. + Windows 2000: This key is not supported. + + + + + Registry entries subordinate to this key reference the text strings that describe counters in US English. These entries are not available to Regedit.exe and Regedt32.exe. + Windows 2000: This key is not supported. + + + + + Registry entries subordinate to this key define the default user configuration for new users on the local computer and the user configuration for the current user. + + + + + InterNational Committee for Information Technology Standards (INCITS) technical committee M1 (biometrics). + + + + + ANSI INCITS 381 finger image based data interchange format. + + + + + The device requires the user to swipe their fingertip over the sensor. + + + + + The device requires the user to place their entire fingerprint on a sensor pad. + + + + + Bitmask that specifies the supported set of biometric factors. + + + + + No biometric type is available. + + + + + Multiple types are specified. + + + + + The biometric sensor captures facial features. + + + + + The biometric sensor captures voice data. + + + + + The biometric sensor captures fingerprint data. + + + + + The biometric sensor captures iris data. + + + + + The biometric sensor captures retina data. + + + + + The biometric sensor captures hand data. + + + + + The biometric sensor captures signatures. + + + + + The biometric sensor captures keystrokes. + + + + + The biometric sensor captures lip data. + + + + + The biometric sensor captures thermal face imaging. + + + + + The biometric sensor captures thermal hand imaging. + + + + + The biometric sensor captures walking gait data. + + + + + The biometric sensor captures scent data. + + + + + The biometric sensor captures DNA data. + + + + + The biometric sensor captures ear information. + + + + + The biometric sensor captures finger shape information. + + + + + The biometric sensor captures palm prints. + + + + + The biometric sensor captures blood vein pattern data. + + + + + The biometric sensor captures foot prints. + + + + + The supported biometric data is not defined by the current constants. + + + + + The biometric sensor captures password data. + + + + + The biometric sensor captures any type of data. + + + + + The data is encrypted. + + + + + The data is digitally signed or is protected by a message authentication code (MAC). + + + + + If this flag and the flag are set, the data is signed. If this flag is not set but the flag is set, a MAC is computed on the data. + + + + + The data is in the format with which it was captured. + + + + + The data is not raw but has not been completely processed. + + + + + The data has been processed. + + + + + The flag mask. This value is always one (1). + + + + + Provided for conformity with NISTIR 6529-A, the Common Biometric Exchange Formats Framework (CBEFF) Patron Format A, but not used. + + + + + The ProductId member is valid. + + + + + Provided for conformity with NISTIR 6529-A, CBEFF Patron Format A, but not used. + + + + + Provided for conformity with NISTIR 6529-A, CBEFF Patron Format A, but not used. + + + + + The CreationDate member is valid. + + + + + The ValidityPeriod member is valid. + + + + + The Type member is valid. + + + + + The Subtype member is valid. + + + + + The HeaderVersion member is valid. + + + + + The PatronHeaderVersion member is valid. + + + + + The Purpose member is valid. + + + + + Provided for conformity with NISTIR 6529-A, CBEFF Patron Format A, but not used. + + + + + The DataQuality member is valid. + + + + + Provided for conformity with NISTIR 6529-A, CBEFF Patron Format A, but not used. + + + + + Provided for conformity with NISTIR 6529-A, CBEFF Patron Format A, but not used. + + + + + Provided for conformity with NISTIR 6529-A, CBEFF Patron Format A, but not used. + + + + + No purpose is specified. + + + + + Verify the identity of a user. + + + + + Identify a user. + + + + + Enroll a user. + + + + + Capture a biometric sample and determine whether the sample corresponds to the specified user identity. + + + + + Capture a biometric sample and determine whether it matches an existing biometric template. + + + + + Extra information that can be used for logging or for display. This value is ignored on input by all functions. On output, it will only be available if supported by the biometric unit and you specify WINBIO_DATA_FLAG_RAW in the Flags parameter of the WinBioCaptureSample function. + + + + + Quality measurements are supported by the BIR creator, but no value is set in the BIR. + + + + + Quality measurements are not supported by the BIR creator. + + + + + Specifies the header version. + + + + + Specifies the patron header version. + + + + + The device can collect biometric data. + + + + + The device can perform match operations. + + + + + The sensor contains an onboard database. + + + + + The device can process samples and turn them into biometric templates. + + + + + The device supports encryption of samples and templates. + + + + + The device can be used as a navigation device. Some devices and drivers can capture data in a format that can be translated by a user-mode application into navigation events, much like a mouse. + + + + + The device has an indicator that can be turned on or off. + + + + + Specifies a sensor adapter. + + + + + Specifies an engine adapter. + + + + + Specifies a storage adapter. + + + + + Represents a mask for all of the _TYPE_ bits. + + + + + The database is contained in a file. + + + + + The database is managed by an external database management system (DBMS) component, such as Microsoft SQL Server. + + + + + The database resides on the biometric sensor. + + + + + The database resides on a smart card. + + + + + Represents a mask for all of the _FLAG_ bits. + + + + + The storage medium containing the database can be physically removed from the computer. + + + + + The database resides on a remote computer. + + + + + Each biometric unit in the sensor pool uses the default database specified in the default biometric unit configuration. + + + + + Can be used for scenarios prior to starting Windows. Typically, the database is part of the sensor chip or is part of the BIOS and can only be used for template enrollment and deletion. + + + + + The database resides on the sensor chip. + + + + + The sensor detected a finger swipe that was not requested by the application or by the window that currently has focus. The Windows Biometric Framework calls into your callback function to indicate that a finger swipe has occurred but does not try to identify the fingerprint. + + + + + The sensor detected a finger swipe that was not requested by the application or by the window that currently has focus. The Windows Biometric Framework attempts to identify the fingerprint and passes the result of that process to your callback function. + + + + + Sensor configuration flag. The biometric units operate in the manner specified during installation. + + + + + Sensor configuration flag. The biometric units operate only as basic capture devices. + + + + + Sensor configuration flag. The biometric units use internal processing and storage capabilities. + + + + + Desired access flag. The client application captures raw biometric data using . + + + + + Desired access flag. The client performs vendor-defined control operations on a biometric unit by calling . + + + + + A biometric unit has been attached to or detached from the computer. + + + + + The template has no associated ID. + + + + + The structure matches all template identities. + + + + + A GUID identifies the template. + + + + + An account SID identifies the template. + + + + + The sensor indicator light is on. + + + + + The sensor indicator light is off. + + + + + No IBIA (International Biometric Industry Association) assigned owner value is available. + + + + + No owner assigned format type is available. + + + + + No operation has been identified. + + + + + A biometric session was opened. For more information see WinBioAsyncOpenSession. + + + + + A biometric session was closed. For more information, see WinBioCloseSession. + + + + + A biometric sample was verified against a user identity. For more information, see WinBioVerify. + + + + + A biometric sample was captured and compared to an existing template. For more information, see WinBioIdentify. + + + + + The ID number of a biometric unit was retrieved. For more information, see WinBioLocateSensor. + + + + + A biometric enrollment sequence was initiated. For more information, see WinBioEnrollBegin. + + + + + A biometric sample was captured and added to the template. For more information, see WinBioEnrollCapture. + + + + + A pending biometric template was finalized. For more information, see WinBioEnrollCommit. + + + + + A pending biometric template was discarded. For more information, see WinBioEnrollDiscard. + + + + + The sub-factors for a given template were enumerated. For more information, see WinBioEnumEnrollments. + + + + + A biometric template was deleted from the store. For more information, see WinBioDeleteTemplate. + + + + + A biometric sample was captured. For more information, see WinBioCaptureSample. + + + + + A biometric session, unit, or template property was retrieved. For more information, see WinBioGetProperty. + + + + + Not used. + + + + + Not used. + + + + + A biometric unit was locked for exclusive use by a session. For more information, see WinBioLockUnit. + + + + + The session lock on a biometric unit was released. For more information, see WinBioUnlockUnit. + + + + + Vendor defined operations were performed on a control unit. For more information, see WinBioControlUnit. + + + + + Privileged vendor defined operations were performed on a control unit. For more information, see WinBioControlUnitPrivileged. + + + + + A handle to the biometric framework was opened. + + + + + A handle to the biometric framework was closed. For more information, see WinBioCloseFramework. + + + + + The installed biometric service providers were enumerated. For more information, see WinBioEnumServiceProviders. + + + + + The attached biometric units were enumerated. For more information, see WinBioEnumBiometricUnits. + + + + + The registered databases were enumerated. For more information, see WinBioEnumDatabases. + + + + + A biometric unit was created. For more information, see WinBioAsyncMonitorFrameworkChanges. + + + + + A biometric unit was deleted. For more information, see WinBioAsyncMonitorFrameworkChanges. + + + + + The session connects to a shared collection of biometric units managed by the service provider. + + + + + The session connects to a collection of biometric units that are managed by the caller. + + + + + Estimate of the maximum number of good biometric samples required to complete an enrollment template. + + + + + Returns extended information about the capabilities and attributes of the Sensor component connected to a specific biometric unit. + + + + + Returns extended information about the capabilities and attributes of the Engine component connected to a specific biometric unit. + + + + + Returns extended information about the capabilities and attributes of the Storage component connected to a specific biometric unit. + + + + + Returns extended information about the status of an in-progress enrollment on a particular biometric unit. If no enrollment is in progress on the BU, it returns WINBIO_E_INVALID_OPERATION in the 'TemplateStatus' field. + + + + + Returns extended information about the current status of a specific biometric unit. + + + + + Gets or sets the values of the anti-spoofing policy for a specific user account. + Performing a 'Get' operation with the wildcard identity returns the system default value of this policy. + + + + + A biometric session. + + + + + A biometric unit. + + + + + A biometric template. + + + + + The finger scan began too high on the finger. + + + + + The finger scan began too low on the finger. + + + + + The finger was too far left during scanning. + + + + + The finger was too far right during scanning. + + + + + The finger was swiped too quickly on the sensor. + + + + + The finger was swiped too slowly on the sensor. + + + + + The scan quality was too poor. + + + + + The finger did not pass straight across the sensor. + + + + + Not enough of the finger was scanned. + + + + + The fingerprint captures could not be combined. + + + + + The operating mode is not known. + + + + + Operate the sensor in basic mode. The sensor acts only as a capture device. Any onboard processing or storage capabilities that exist are not used. + + + + + Operate the sensor in advanced mode. The sensor can capture samples and perform matching and storage functions. + + + + + Operate the sensor as a mouse pad. This is not currently supported. + + + + + Operate the sensor in sleep mode. + + + + + The setting is not valid. + + + + + The setting originated from built-in policy. + + + + + The setting was created by Group Policy. + + + + + The setting originated in the local computer registry. + + + + + Called by the Windows Biometric Framework to notify the client application that an asynchronous operation has completed. The callback is defined by the client application and called by the Windows Biometric Framework. + + Pointer to a structure that contains information about the completed operation. The structure is created by the Windows Biometric Framework. You must call WinBioFree to release the structure. + + + + Called by the Windows Biometric Framework to return results from the asynchronous function. The client application must implement this function. + Important We recommend that, beginning with Windows 8, you no longer use the / combination. Instead, do the following: + + + Implement a function to receive notice when the operation completes. + + + Call the function. Pass the address of your callback in the parameter. Pass in the parameter. Retrieve an asynchronous session handle. + + + Use the asynchronous session handle to call . When the operation finishes, the Windows Biometric Framework will allocate and initialize a structure with the results and invoke your callback with a pointer to the results structure. + + + Call from your callback implementation to release the structure after you have finished using it. + + + + Pointer to a buffer defined by the application and passed to the parameter of the function. The buffer is not modified by the framework or the biometric unit. Your application can use the data to help it determine what actions to perform or to maintain additional information about the biometric capture. + Error code returned by the capture operation. + Biometric unit ID number. + Pointer to the sample data. + Size, in bytes, of the sample data pointed to by the Sample parameter. + Additional information about the failure, if any, to perform the operation. For more information, see Remarks. + + + + The function is called by the Windows Biometric Framework to return results from the asynchronous function. The client application must implement this function. + Important We recommend that, beginning with Windows 8, you no longer use the / combination. Instead, do the following: + + + Implement a function to receive notice when the operation completes. + + + Call the function. Pass the address of your callback in the CallbackRoutine parameter. Pass in the NotificationMethod parameter. Retrieve an asynchronous session handle. + + + Use the asynchronous session handle to call . When the operation finishes, the Windows Biometric Framework will allocate and initialize a structure with the results and invoke your callback with a pointer to the results structure. + + + Call from your callback implementation to release the structure after you have finished using it. + + + + Pointer to a buffer defined by the application and passed to the EnrollCallback parameter of the function. The buffer is not modified by the framework or the biometric unit. Your application can use the data to help it determine what actions to perform or to maintain additional information about the biometric capture. + Error code returned by the capture operation. + Additional information about the failure, if any, to perform the operation. For more information, see Remarks. + + + + Called by the Windows Biometric Framework to return results from the asynchronous function. The client application must implement this function. + + Pointer to a buffer defined by the application and passed to the EventCallbackContext parameter of the function. The buffer is not modified by the framework or the biometric unit. Your application can use the data to help it determine what actions to perform or to maintain additional information about the biometric capture. + Error code returned by the capture operation. + Pointer to a value. For more information, see Constants. + + + + The function is called by the Windows Biometric Framework to return results from the asynchronous function. The client application must implement this function. + Important We recommend that, beginning with Windows 8, you no longer use the / combination. Instead, do the following: + + + Implement a function to receive notice when the operation completes. + + + Call the function. Pass the address of your callback in the CallbackRoutine parameter. Pass in the NotificationMethod parameter. Retrieve an asynchronous session handle. + + + Use the asynchronous session handle to call . When the operation finishes, the Windows Biometric Framework will allocate and initialize a structure with the results and invoke your callback with a pointer to the results structure. + + + Call from your callback implementation to release the structure after you have finished using it. + + + + Pointer to a buffer defined by the application and passed to the IdentifyCallbackContext parameter of the function. The buffer is not modified by the framework or the biometric unit. Your application can use the data to help it determine what actions to perform or to maintain additional information about the biometric capture. + Error code returned by the capture operation. + Biometric unit ID number. + A structure that receives the GUID or SID of the user providing the biometric sample. + A value that receives the sub-factor associated with the biometric sample. See the Remarks section for more details. + Additional information about the failure, if any, to perform the operation. For more information, see Remarks. + + + + Called by the Windows Biometric Framework to return results from the asynchronous function. The client application must implement this function. + Important We recommend that, beginning with Windows 8, you no longer use the / combination. Instead, do the following: + + + Implement a function to receive notice when the operation completes. + + + Call the function. Pass the address of your callback in the CallbackRoutine parameter. Pass in the NotificationMethod parameter. Retrieve an asynchronous session handle. + + + Use the asynchronous session handle to call . When the operation finishes, the Windows Biometric Framework will allocate and initialize a structure with the results and invoke your callback with a pointer to the results structure. + + + Call from your callback implementation to release the structure after you have finished using it. + + + + Pointer to a buffer defined by the application and passed to the LocateCallbackContext parameter of the WinBioLocateSensorWithCallback function. The buffer is not modified by the framework or the biometric unit. Your application can use the data to help it determine what actions to perform or to maintain additional information about the biometric capture. + Error code returned by the capture operation. + Biometric unit ID number. + + + + Called by the Windows Biometric Framework to return results from the asynchronous function. The client application must implement this function. + Important We recommend that, beginning with Windows 8, you no longer use the / combination. Instead, do the following: + + + Implement a function to receive notice when the operation completes. + + + Call the function. Pass the address of your callback in the CallbackRoutine parameter. Pass in the NotificationMethod parameter. Retrieve an asynchronous session handle. + + + Use the asynchronous session handle to call WinBioVerify. When the operation finishes, the Windows Biometric Framework will allocate and initialize a structure with the results and invoke your callback with a pointer to the results structure. + + + Call from your callback implementation to release the structure after you have finished using it. + + + + Pointer to a buffer defined by the application and passed to the VerifyCallbackContext parameter of the WinBioVerifyWithCallback function. The buffer is not modified by the framework or the biometric unit. Your application can use the data to help it determine what actions to perform or to maintain additional information about the biometric capture. + Error code returned by the capture operation. + Biometric unit ID number. + A Boolean value that specifies whether the captured sample matched the user identity specified by the Identity parameter. + Additional information about the failure, if any, to perform the operation. For more information, see Remarks. + + + + The enumeration contains values that specify the type of information being assigned to or retrieved from an access token. + The function uses these values to indicate the type of token information to retrieve. + The function uses these values to set the token information. + + + + + The buffer receives a structure that contains the user account of the token. + + + + + The buffer receives a structure that contains the group accounts associated with the token. + + + + + The buffer receives a structure that contains the privileges of the token. + + + + + The buffer receives a structure that contains the default owner security identifier (SID) for newly created objects. + + + + + The buffer receives a structure that contains the default primary group SID for newly created objects. + + + + + The buffer receives a structure that contains the default DACL for newly created objects. + + + + + The buffer receives a structure that contains the source of the token. access is needed to retrieve this information. + + + + + The buffer receives a value that indicates whether the token is a primary or impersonation token. + + + + + The buffer receives a SECURITY_IMPERSONATION_LEVEL value that indicates the impersonation level of the token. If the access token is not an impersonation token, the function fails. + + + + + The buffer receives a structure that contains various token statistics. + + + + + The buffer receives a structure that contains the list of restricting SIDs in a restricted token. + + + + + The buffer receives a DWORD value that indicates the Terminal Services session identifier that is associated with the token. + If the token is associated with the terminal server client session, the session identifier is nonzero. + Windows Server 2003 and Windows XP: If the token is associated with the terminal server console session, the session identifier is zero. + In a non-Terminal Services environment, the session identifier is zero. + If TokenSessionId is set with , the application must have the Act As Part Of the Operating System privilege, and the application must be enabled to set the session ID in a token. + + + + + The buffer receives a structure that contains the user SID, the group accounts, the restricted SIDs, and the authentication ID associated with the token. + + + + + Reserved. + + + + + The buffer receives a DWORD value that is nonzero if the token includes the SANDBOX_INERT flag. + + + + + Reserved. + + + + + The buffer receives a value. + If the token resulted from a logon that used explicit credentials, such as passing a name, domain, and password to the LogonUser function, then the structure will contain the ID of the logon session that created it. + If the token resulted from network authentication, such as a call to or a call to with dwLogonType set to or , then this value will be zero. + + + + + The buffer receives a value that specifies the elevation level of the token. + + + + + The buffer receives a structure that contains a handle to another token that is linked to this token. + + + + + The buffer receives a structure that specifies whether the token is elevated. + + + + + The buffer receives a DWORD value that is nonzero if the token has ever been filtered. + + + + + The buffer receives a structure that specifies security information contained in the token. + + + + + The buffer receives a DWORD value that is nonzero if virtualization is allowed for the token. + + + + + The buffer receives a DWORD value that is nonzero if virtualization is enabled for the token. + + + + + The buffer receives a structure that specifies the token's integrity level. + + + + + The buffer receives a DWORD value that is nonzero if the token has the UIAccess flag set. + + + + + The buffer receives a structure that specifies the token's mandatory integrity policy. + + + + + The buffer receives a structure that specifies the token's logon SID. + + + + + The buffer receives a DWORD value that is nonzero if the token is an app container token. Any callers who check the TokenIsAppContainer and have it return 0 should also verify that the caller token is not an identify level impersonation token. If the current token is not an app container but is an identity level token, you should return AccessDenied. + + + + + The buffer receives a structure that contains the capabilities associated with the token. + + + + + The buffer receives a structure that contains the AppContainerSid associated with the token. If the token is not associated with an app container, the TokenAppContainer member of the structure points to NULL. + + + + + The buffer receives a DWORD value that includes the app container number for the token. For tokens that are not app container tokens, this value is zero. + + + + + The buffer receives a structure that contains the user claims associated with the token. + + + + + The buffer receives a structure that contains the device claims associated with the token. + + + + + This value is reserved. + + + + + This value is reserved. + + + + + The buffer receives a structure that contains the device groups that are associated with the token. + + + + + The buffer receives a structure that contains the restricted device groups that are associated with the token. + + + + + This value is reserved. + + + + + This value is reserved. + + + + + The maximum value for this enumeration. + + + + + Defines constants that specify how completion notifications for asynchronous operations are to be delivered to the client application. This enumeration is used by the and functions. + + + + + The operation is synchronous. + + + + + The client-implemented PWINBIO_ASYNC_COMPLETION_CALLBACK function is called by the framework. + + + + + The framework sends completion notices to the client application window message queue. + + + + + The maximum enumeration value. This constant is not directly used by the WinBioAsyncOpenFramework and WinBioAsyncOpenSession. + + + + + Defines flags that can be used to specify the end-user credential format. This enumeration is used by the function. + + + + + The password is in a generic format. + + + + + The password is in a compressed format. + + + + + The password credential was wrapped with . + + + + + Defines flags that can be used to filter on the credential type. This enumeration is used by the , , and functions. + + + + + Filters password credentials. + + + + + Filters all credentials. + + + + + Defines values that specify whether a credential has been associated with the biometric data for an end user. This enumeration is used by the function. + + + + + A credential has been associated with the end user. + + + + + A credential has not been associated with the end user. + + + + + The function copies a security identifier (SID) to a buffer. + + Specifies the length, in bytes, of the buffer receiving the copy of the SID. + A pointer to a buffer that receives a copy of the source SID structure. + A pointer to a SID structure that the function copies to the buffer pointed to by the pDestinationSid parameter. + + If the function succeeds, the return value is nonzero. + If the function fails, the return value is zero. To get extended error information, call . + + + + + The function returns the length, in bytes, of a valid security identifier (SID). + + A pointer to the SID structure whose length is returned. The structure is assumed to be valid. + + If the SID structure is valid, the return value is the length, in bytes, of the SID structure. + If the SID structure is not valid, the return value is undefined. Before calling , pass the SID to the function to verify that the SID is valid. + + + + + The function retrieves a specified type of information about an access token. The calling process must have appropriate access rights to obtain the information. + To determine if a user is a member of a specific group, use the function. To determine group membership for app container tokens, use the function. + + + + + + + A pointer to a variable that receives the number of bytes needed for the buffer pointed to by the TokenInformation parameter. If this value is larger than the value specified in the TokenInformationLength parameter, the function fails and stores no data in the buffer. + If the value of the TokenInformationClass parameter is and the token has no default DACL, the function sets the variable pointed to by ReturnLength to sizeof() and sets the DefaultDacl member of the structure to NULL. + + + If the function succeeds, the return value is nonzero. + If the function fails, the return value is zero. To get extended error information, call . + + + + + The function opens the access token associated with a process. + + A handle to the process whose access token is opened. The process must have the access permission. + + Specifies an access mask that specifies the requested types of access to the access token. These requested access types are compared with the discretionary access control list (DACL) of the token to determine which accesses are granted or denied. + For a list of access rights for access tokens, see Access Rights for Access-Token Objects. + + A pointer to a handle that identifies the newly opened access token when the function returns. + + If the function succeeds, the return value is nonzero. + If the function fails, the return value is zero. To get extended error information, call . + + + + + + Deletes a subkey and its values from the specified platform-specific view of the registry. Note that key names are not case sensitive. + To delete a subkey as a transacted operation, call the function. + + + + The name of the key to be deleted. This key must be a subkey of the key specified by the value of the parameter. + The function opens the subkey with the DELETE access right. + Key names are not case sensitive. + The value of this parameter cannot be NULL. + + + An access mask the specifies the platform-specific view of the registry. + + + Value + Meaning + + + 0x0200 + Delete the key from the 32-bit registry view. + + + 0x0100 + Delete the key from the 64-bit registry view. + + + + This parameter is reserved and must be zero. + + If the function succeeds, the return value is . + If the function fails, the return value is a nonzero error code defined in Winerror.h. You can use the function with the flag to get a generic description of the error. + + + + + Enumerates the subkeys of the specified open registry key. The function retrieves information about one subkey each time it is called. + + + A handle to an open registry key. The key must have been opened with the access right. For more information, see Registry Key Security and Access Rights. + This handle is returned by the , , , or function. It can also be one of the following predefined keys: + + + + + + + + + The index of the subkey to retrieve. This parameter should be zero for the first call to the function and then incremented for subsequent calls. + Because subkeys are not ordered, any new subkey will have an arbitrary index. This means that the function may return subkeys in any order. + + + A pointer to a buffer that receives the name of the subkey, including the terminating null character. The function copies only the name of the subkey, not the full key hierarchy, to the buffer. If the function fails, no information is copied to this buffer. + For more information, see Registry Element Size Limits. + + + A pointer to a variable that specifies the size of the buffer specified by the parameter, in characters. This size should include the terminating null character. If the function succeeds, the variable pointed to by contains the number of characters stored in the buffer, not including the terminating null character. + To determine the required buffer size, use the function to determine the size of the largest subkey for the key identified by the parameter. + + This parameter is reserved and must be NULL. + A pointer to a buffer that receives the user-defined class of the enumerated subkey. This parameter can be NULL. + A pointer to a variable that specifies the size of the buffer specified by the parameter, in characters. The size should include the terminating null character. If the function succeeds, contains the number of characters stored in the buffer, not including the terminating null character. This parameter can be NULL only if is NULL. + A pointer to structure that receives the time at which the enumerated subkey was last written. This parameter can be NULL. + + If the function succeeds, the return value is . + If the function fails, the return value is a system error code. If there are no more subkeys available, the function returns . + If the lpName buffer is too small to receive the name of the key, the function returns . + + + + + Retrieves the type and data for the specified registry value. + + + A handle to an open key. The key must have been opened with the access right. For more information, see Key Security and Access Rights. + This handle is returned by the , , , or function. It can also be one of the following predefined keys: + + + + + + + + + + + The name of the registry key. This key must be a subkey of the key specified by the parameter. + Key names are not case sensitive. + + + The name of the registry value. + If this parameter is NULL or an empty string, "", the function retrieves the type and data for the key's unnamed or default value, if any. + For more information, see Registry Element Size Limits. + Keys do not automatically have an unnamed or default value. Unnamed values can be of any type. + + + The flags that restrict the data type of value to be queried. If the data type of the value does not meet this criteria, the function fails. This parameter can be one or more of the following values. + + + Value + Meaning + + + 0x0000ffff + No type restriction. + + + 0x00000018 + Restrict type to 32-bit RRF_RT_REG_BINARY | RRF_RT_REG_DWORD. + + + 0x00000048 + Restrict type to 64-bit RRF_RT_REG_BINARY | RRF_RT_REG_DWORD. + + + 0x00000008 + Restrict type to REG_BINARY. + + + 0x00000010 + Restrict type to REG_DWORD. + + + 0x00000004 + Restrict type to REG_EXPAND_SZ. + + + 0x00000020 + Restrict type to REG_MULTI_SZ. + + + 0x00000001 + Restrict type to REG_NONE. + + + 0x00000040 + Restrict type to REG_QWORD. + + + 0x00000002 + Restrict type to REG_SZ. + + + This parameter can also include one or more of the following values. + + + Value + Meaning + + + + The template has no associated ID. + + + 0x10000000 + Do not automatically expand environment strings if the value is of type . + + + 0x20000000 + If is not NULL, set the contents of the buffer to zeroes on failure. + + + 0x00010000 + + If is not NULL, open the subkey that specifies with the access rights. For information about these access rights, see Registry Key Security and Access Rights. + You cannot specify in combination with . + + + + 0x00020000 + + If is not NULL, open the subkey that specifies with the access rights. For information about these access rights, see Registry Key Security and Access Rights. + You cannot specify in combination with . + + + + + A pointer to a variable that receives a code indicating the type of data stored in the specified value. For a list of the possible type codes, see Registry Value Types. This parameter can be NULL if the type is not required. + + A pointer to a buffer that receives the value's data. This parameter can be NULL if the data is not required. + If the data is a string, the function checks for a terminating null character. If one is not found, the string is stored with a null terminator if the buffer is large enough to accommodate the extra character. Otherwise, the function fails and returns . + + + A pointer to a variable that specifies the size of the buffer pointed to by the parameter, in bytes. When the function returns, this variable contains the size of the data copied to . + The parameter can be NULL only if is NULL. + If the data has the , or type, this size includes any terminating null character or characters. For more information, see Remarks. + If the buffer specified by parameter is not large enough to hold the data, the function returns and stores the required buffer size in the variable pointed to by . In this case, the contents of the buffer are undefined. + If is NULL, and is non-NULL, the function returns and stores the size of the data, in bytes, in the variable pointed to by . This enables an application to determine the best way to allocate a buffer for the value's data. + If specifies and the buffer is not large enough to contain all of the returned data, the function returns and the value returned through the parameter is undefined. This is because the size of the performance data can change from one call to the next. In this case, you must increase the buffer size and call again passing the updated buffer size in the parameter. Repeat this until the function succeeds. You need to maintain a separate variable to keep track of the buffer size, because the value returned by is unpredictable. + + + If the function succeeds, the return value is . + If the function fails, the return value is a system error code. + If the buffer is too small to receive the value, the function returns . + If specifies a combination of both and , the function returns . + + + + + Retrieves the type and data for the specified registry value. + + + A handle to an open key. The key must have been opened with the access right. For more information, see Key Security and Access Rights. + This handle is returned by the , , , or function. It can also be one of the following predefined keys: + + + + + + + + + + + The name of the registry key. This key must be a subkey of the key specified by the parameter. + Key names are not case sensitive. + + + The name of the registry value. + If this parameter is NULL or an empty string, "", the function retrieves the type and data for the key's unnamed or default value, if any. + For more information, see Registry Element Size Limits. + Keys do not automatically have an unnamed or default value. Unnamed values can be of any type. + + + The flags that restrict the data type of value to be queried. If the data type of the value does not meet this criteria, the function fails. This parameter can be one or more of the following values. + + + Value + Meaning + + + 0x0000ffff + No type restriction. + + + 0x00000018 + Restrict type to 32-bit RRF_RT_REG_BINARY | RRF_RT_REG_DWORD. + + + 0x00000048 + Restrict type to 64-bit RRF_RT_REG_BINARY | RRF_RT_REG_DWORD. + + + 0x00000008 + Restrict type to REG_BINARY. + + + 0x00000010 + Restrict type to REG_DWORD. + + + 0x00000004 + Restrict type to REG_EXPAND_SZ. + + + 0x00000020 + Restrict type to REG_MULTI_SZ. + + + 0x00000001 + Restrict type to REG_NONE. + + + 0x00000040 + Restrict type to REG_QWORD. + + + 0x00000002 + Restrict type to REG_SZ. + + + This parameter can also include one or more of the following values. + + + Value + Meaning + + + + The template has no associated ID. + + + 0x10000000 + Do not automatically expand environment strings if the value is of type . + + + 0x20000000 + If is not NULL, set the contents of the buffer to zeroes on failure. + + + 0x00010000 + + If is not NULL, open the subkey that specifies with the access rights. For information about these access rights, see Registry Key Security and Access Rights. + You cannot specify in combination with . + + + + 0x00020000 + + If is not NULL, open the subkey that specifies with the access rights. For information about these access rights, see Registry Key Security and Access Rights. + You cannot specify in combination with . + + + + + A pointer to a variable that receives a code indicating the type of data stored in the specified value. For a list of the possible type codes, see Registry Value Types. This parameter can be NULL if the type is not required. + + A pointer to a buffer that receives the value's data. This parameter can be NULL if the data is not required. + If the data is a string, the function checks for a terminating null character. If one is not found, the string is stored with a null terminator if the buffer is large enough to accommodate the extra character. Otherwise, the function fails and returns . + + + A pointer to a variable that specifies the size of the buffer pointed to by the parameter, in bytes. When the function returns, this variable contains the size of the data copied to . + The parameter can be NULL only if is NULL. + If the data has the , or type, this size includes any terminating null character or characters. For more information, see Remarks. + If the buffer specified by parameter is not large enough to hold the data, the function returns and stores the required buffer size in the variable pointed to by . In this case, the contents of the buffer are undefined. + If is NULL, and is non-NULL, the function returns and stores the size of the data, in bytes, in the variable pointed to by . This enables an application to determine the best way to allocate a buffer for the value's data. + If specifies and the buffer is not large enough to contain all of the returned data, the function returns and the value returned through the parameter is undefined. This is because the size of the performance data can change from one call to the next. In this case, you must increase the buffer size and call again passing the updated buffer size in the parameter. Repeat this until the function succeeds. You need to maintain a separate variable to keep track of the buffer size, because the value returned by is unpredictable. + + + If the function succeeds, the return value is . + If the function fails, the return value is a system error code. + If the buffer is too small to receive the value, the function returns . + If specifies a combination of both and , the function returns . + + + + + Opens the specified registry key. Note that key names are not case sensitive. + To perform transacted registry operations on a key, call the function. + + + A handle to an open registry key. This handle is returned by the or function, or it can be one of the following predefined keys: + + + + + + + + The name of the registry subkey to be opened. + Key names are not case sensitive. + The parameter can be a pointer to an empty string. If is a pointer to an empty string and is , receives the same handle passed into the function. Otherwise, receives a new handle to the key specified by . + The parameter can be NULL only if hKey is one of the predefined keys. If is NULL and is , receives a new handle to the key specified by . Otherwise, receives the same handle passed in to the function. + For more information, see Registry Element Size Limits. + + + Specifies the option to apply when opening the key. Set this parameter to zero or the following: + + + Value + Meaning + + + + The key is a symbolic link. Registry symbolic links should only be used when absolutely necessary. + + + + A mask that specifies the desired access rights to the key to be opened. The function fails if the security descriptor of the key does not permit the requested access for the calling process. For more information, see Registry Key Security and Access Rights. + A pointer to a variable that receives a handle to the opened key. If the key is not one of the predefined registry keys, call the function after you have finished using the handle. + + If the function succeeds, the return value is . + If the function fails, the return value is a nonzero error code defined in Winerror.h. You can use the function with the flag to get a generic description of the error. + + + + + Sets the data and type of a specified value under a registry key. + + + A handle to an open registry key. The key must have been opened with the access right. For more information, see Registry Key Security and Access Rights. + This handle is returned by the , , , or function. It can also be one of the following predefined keys: + + + + + + The Unicode version of this function supports the following additional predefined keys: + + + + + + + + + + + The name of the value to be set. If a value with this name is not already present in the key, the function adds it to the key. + If is NULL or an empty string, "", the function sets the type and data for the key's unnamed or default value. + For more information, see Registry Element Size Limits. + Registry keys do not have default values, but they can have one unnamed value, which can be of any type. + + This parameter is reserved and must be zero. + The type of data pointed to by the lpData parameter. For a list of the possible types, see Registry Value Types. + + The data to be stored. + For string-based types, such as , the string must be null-terminated. With the data type, the string must be terminated with two null characters. String-literal values must be formatted using a backslash preceded by another backslash as an escape character. For example, specify "C:\\mydir\\myfile" to store the string "C:\mydir\myfile". + Note lpData indicating a null value is valid, however, if this is the case, cbData must be set to '0'. + + The size of the information pointed to by the lpData parameter, in bytes. If the data is of type , , or , cbData must include the size of the terminating null character or characters. + + If the function succeeds, the return value is . + If the function fails, the return value is a nonzero error code defined in Winerror.h. You can use the function with the flag to get a generic description of the error. + + + + + The routine fills a block of memory with zeros, given a pointer to the block and the length, in bytes, to be filled. + + A pointer to the memory block to be filled with zeros. + The number of bytes to fill with zeros. + + + + Acquires window focus. + + + If the function succeeds, it returns . If the function fails, it returns an HRESULT value that indicates the error. Possible values include, but are not limited to, those in the following table. For a list of common error codes, see Common HRESULT Values. + + + Return code + Description + + + + The calling process must be running under the Local System account. + + + + + + + Asynchronously enumerates all attached biometric units that match the input factor type. For a synchronous version of this function, see . + + Handle to the framework session opened by calling . + A bitmask of flags that specifies the biometric unit types to be enumerated. Only is currently supported. + + The function returns an HRESULT indicating success or failure. Note that success indicates only that the arguments were valid. Failures encountered during the execution of the operation will be returned asynchronously to a structure using the notification method specified in the call to . + + + Return code + Description + + + + You must set the argument. + + + + The bitmask contained in the parameter contains one or more an invalid type bits. + + + + There was insufficient memory to complete the request. + + + + Current administrative policy prohibits use of the Windows Biometric Framework API. + + + + The argument must represent an asynchronous framework session. + + + + The session handle has been marked for closure. + + + + + + + Asynchronously enumerates all registered databases that match a specified type. For a synchronous version of this function, see . + + Handle to the framework session opened by calling . + A bitmask of flags that specifies the biometric database types to be enumerated. Only is currently supported. + + The function returns an HRESULT indicating success or failure. Note that success indicates only that the arguments were valid. Failures encountered during the execution of the operation will be returned asynchronously to a WINBIO_ASYNC_RESULT structure using the notification method specified in the call to WinBioAsyncOpenFramework. + + + Return code + Description + + + + You must set the argument. + + + + The bitmask contained in the parameter contains one or more an invalid type bits. + + + + There was insufficient memory to complete the request. + + + + The argument must represent an asynchronous framework session. + + + + + + + Asynchronously returns information about installed biometric service providers. For a synchronous version of this function, see . + + Handle to the framework session opened by calling . + A bitmask of flags that specifies the biometric service provider types to be enumerated. For Windows 8, only is supported. + + The function returns an HRESULT indicating success or failure. Note that success indicates only that the arguments were valid. Failures encountered during the execution of the operation will be returned asynchronously to a WINBIO_ASYNC_RESULT structure using the notification method specified in the call to WinBioAsyncOpenFramework. + + + Return code + Description + + + + You must set the argument. + + + + The bitmask contained in the parameter contains one or more an invalid type bits. + + + + There was insufficient memory to complete the request. + + + + The argument must represent an asynchronous framework session. + + + + + + + Starts an asynchronous monitor of changes to the biometric framework. Currently, the only monitored changes that are supported occur when a biometric unit is attached to or detached from the computer. + + Handle to the framework session opened by calling . + + A bitmask of type flags that indicates the types of events that should generate asynchronous notifications. Beginning with Windows 8, the following flag is available: + + + Value + Meaning + + + + A biometric unit has been attached to or detached from the computer. + + + + + The function returns an HRESULT indicating success or failure. Note that success indicates only that the arguments were valid. Failures encountered during the execution of the operation will be returned asynchronously to a WINBIO_ASYNC_RESULT structure using the notification method specified in the call to WinBioAsyncOpenFramework. + + + Return code + Description + + + + You must set the argument. + + + + The bitmask contained in the parameter contains one or more an invalid type bits. Currently, the only available value is . + + + + The argument must represent an asynchronous framework session. + + + + + + + Opens a handle to the biometric framework. You can use this handle to asynchronously enumerate biometric units, databases, and service providers and to receive asynchronous notification when biometric units are attached to the computer or removed. + + + Specifies how completion notifications for asynchronous operations in this framework session are to be delivered to the client application. This must be one of the following values. + + + Value + Meaning + + + + The framework invokes the callback function defined by the application. + + + + The framework posts a window message to the application's message queue. + + + + Handle of the window that will receive the completion notices. This value is ignored unless the parameter is set to WINBIO_ASYNC_NOTIFY_MESSAGE. + + Window message code the framework must send to signify completion notices. This value is ignored unless the parameter is set to WINBIO_ASYNC_NOTIFY_MESSAGE. The value must be within the range WM_APP(0x8000) to 0xBFFF. + The Windows Biometric Framework sets the LPARAM value of the message to the address of the WINBIO_ASYNC_RESULT structure that contains the results of the operation. You must call WinBioFree to release the structure after you have finished using it. + + Address of the callback routine to be invoked for completion notices. This value is ignored unless the parameter is set to WINBIO_ASYNC_NOTIFY_CALLBACK. + Address of a buffer supplied by the caller. The buffer is not modified by the framework or the biometric unit. It is returned in the WINBIO_ASYNC_RESULT structure. Your application can use the data to help it determine what actions to perform upon receipt of the completion notice or to maintain additional information about the requested operation. + + Specifies whether to block until the framework session has been opened. Specifying FALSE causes the process to block. Specifying TRUE causes the session to be opened asynchronously. + If you specify FALSE to open the framework session synchronously, success or failure is returned to the caller directly by this function in the HRESULT return value. If the session is opened successfully, the first asynchronous completion event your application receives will be for an asynchronous operation requested after the framework has been open. + If you specify TRUE to open the framework session asynchronously, the first asynchronous completion notice received will be for opening the framework. If the parameter is set to WINBIO_ASYNC_NOTIFY_CALLBACK, operation results are delivered to the WINBIO_ASYNC_RESULT structure in the callback function specified by the parameter. If the parameter is set to WINBIO_ASYNC_NOTIFY_MESSAGE, operation results are delivered to the WINBIO_ASYNC_RESULT structure pointed to by the LPARAM field of the window message. + + + If the function does not succeed, this parameter will be NULL. + If the session is opened synchronously and successfully, this parameter will contain a pointer to the session handle. + If you specify that the session be opened asynchronously, this method returns immediately, the session handle will be NULL, and you must examine the WINBIO_ASYNC_RESULT structure to determine whether the session was successfully opened. + + + If the function succeeds, it returns . If the function fails, it returns an HRESULT value that indicates the error. Possible values include, but are not limited to, those in the following table. For a list of common error codes, see Common HRESULT Values. + + + Return code + Description + + + + There is not enough memory available to create the framework session. + + + + If you set the notification method to , the parameter cannot be NULL or HWND_BROADCAST and the parameter cannot be zero (0). + + + + + The parameter and the parameter must be set. + If you set the notification method to , you must also specify the address of a callback function in the parameter. + + + + + + + + Asynchronously connects to a biometric service provider and one or more biometric units. If successful, the function returns a biometric session handle. Every operation performed by using this handle will be completed asynchronously, including , and the results will be returned to the client application by using the method specified in the parameter. + For a synchronous version of this function, see . + + A bitmask of that specifies the biometric unit types to be enumerated. Only is currently supported. + + A ULONG value that specifies the type of the biometric units that will be used in the session. This can be one of the following values: + + + Value + Meaning + + + + The session connects to a shared collection of biometric units managed by the service provider. + + + + The session connects to a collection of biometric units that are managed by the caller. + + + + + A ULONG value that specifies biometric unit configuration and access characteristics for the new session. Configuration specify the general configuration of units in the session. Access specify how the application will use the biometric units. You must specify one configuration flag but you can combine that flag with any access flag. + + + Value + Meaning + + + + + Group: configuration + The biometric units operate in the manner specified during installation. You must use this value when the parameter is . + + + + + + Group: configuration + The biometric units operate only as basic capture devices. All processing, matching, and storage operations is performed by software plug-ins. + + + + + + Group: configuration + The biometric units use internal processing and storage capabilities. + + + + + + Group: access + The client application captures raw biometric data using . + + + + + + Group: access + The client performs vendor-defined control operations on a biometric unit by calling . + + + + + Pointer to an array of biometric unit identifiers to be included in the session. You can call to enumerate the biometric units. Set this value to NULL if the parameter is . + A value that specifies the number of elements in the array pointed to by the parameter. Set this value to zero if the parameter is . + + A value that specifies the database(s) to be used by the session. If the parameter is , you must specify the GUID of an installed database. If the parameter is not , you can specify one of the following common values. + + + Value + Meaning + + + + Each biometric unit in the sensor pool uses the default database specified in the default biometric unit configuration. You must specify this value if the parameter is . You cannot use this value if the parameter is + + + + You can specify this value to be used for scenarios prior to starting Windows. Typically, the database is part of the sensor chip or is part of the BIOS and can only be used for template enrollment and deletion. + + + + The database is on the sensor chip and is available for enrollment and matching. + + + + + Specifies how completion notifications for asynchronous operations in this biometric session are to be delivered to the client application. This must be one of the following values. + + + Value + Meaning + + + + The session invokes the callback function defined by the application. + + + + The session posts a window message to the application's message queue. + + + + Handle of the window that will receive the completion notices. This value is ignored unless the parameter is set to . + + Window message code the framework must send to signify completion notices. This value is ignored unless the parameter is set to . The value must be within the range (0x8000) to 0xBFFF. + The Windows Biometric Framework sets the LPARAM value of the message to the address of the structure that contains the results of the operation. You must call to release the structure after you have finished using it. + + + Address of callback routine to be invoked when the operation started by using the session handle completes. This value is ignored unless the parameter is set to . + + Address of a buffer supplied by the caller. The buffer is not modified by the framework or the biometric unit. It is returned in the structure. Your application can use the data to help it determine what actions to perform upon receipt of the completion notice or to maintain additional information about the requested operation. + + Specifies whether to block until the framework session has been opened. Specifying FALSE causes the process to block. Specifying TRUE causes the session to be opened asynchronously. + If you specify FALSE to open the framework session synchronously, success or failure is returned to the caller directly by this function in the HRESULT return value. If the session is opened successfully, the first asynchronous completion event your application receives will be for an asynchronous operation requested after the framework has been open. + If you specify TRUE to open the framework session asynchronously, the first asynchronous completion notice received will be for opening the framework. If the parameter is set to , operation results are delivered to the structure in the callback function specified by the parameter. If the parameter is set to , operation results are delivered to the structure pointed to by the LPARAM field of the window message. + + + If the function does not succeed, this parameter will be NULL. + If the session is opened synchronously and successfully, this parameter will contain a pointer to the session handle. + If you specify that the session be opened asynchronously, this method returns immediately, the session handle will be NULL, and you must examine the structure to determine whether the session was successfully opened. + + + If the function succeeds, it returns . If the function fails, it returns an HRESULT value that indicates the error. Possible values include, but are not limited to, those in the following table. For a list of common error codes, see Common HRESULT Values. + + + Return code + Description + + + + There is not enough memory available to create the biometric session. + + + + If you set the notification method to WINBIO_ASYNC_NOTIFY_MESSAGE, the parameter cannot be NULL or HWND_BROADCAST and the parameter cannot be zero (0). + + + + The parameter and the parameter must be set. + If you set the notification method to , you must also specify the address of a callback function in the parameter. + + + + The parameter contains the or the flag and the caller has not been granted either access permission. + + + + One or more of the biometric unit numbers specified in the parameter is not valid. + + + + The client application is running on a remote desktop client and is attempting to open a system pool session. + + + + The parameter is set to and one or more of the requested sensors in that pool is not available. + + + + Current administrative policy prohibits use of the Windows Biometric Framework API. + + + + + + + Cancels all pending biometric operations for a specified session. + + A value that identifies an open biometric session. Open a synchronous session handle by calling . Open an asynchronous session handle by calling . + + If the function succeeds, it returns . If the function fails, it returns an HRESULT value that indicates the error. Possible values include, but are not limited to, those in the following table. For a list of common error codes, see Common HRESULT Values. + + + Return code + Description + + + + The session handle is not valid. + + + + + + + Captures a biometric sample and fills a biometric information record (BIR) with the raw or processed data. + + A value that identifies an open biometric session. Open a synchronous session handle by calling . Open an asynchronous session handle by calling . + + A bitmask that specifies the intended use of the sample. This can be a bitwise OR of the following values: + + + + + + + + + + + + + + + + + + + + A value that specifies the type of processing to be applied to the captured sample. This can be a bitwise OR of the following security and processing level flags: + (Encrypt the sample.) + (Sign the sample or protect it by using a message authentication code (MAC).) + (If this flag and the WINBIO_DATA_FLAG_INTEGRITY flag are set, sign the sample. If this flag is not set but the WINBIO_DATA_FLAG_INTEGRITY flag is set, compute a MAC.) + (Return the sample exactly as it was captured by the sensor.) + (Return the sample after it has been cleaned and filtered.) + (Return the sample after it is ready to be used for the purpose specified by the Purpose parameter.) + + A pointer to a value that contains the ID of the biometric unit that generated the sample. + Address of a variable that receives a pointer to a structure that contains the sample. When you have finished using the structure, you must pass the pointer to to release the memory allocated for the sample. + A pointer to a SIZE_T value that contains the size, in bytes, of the structure returned in the Sample parameter. + + A pointer to a value that contains additional information about the failure to capture a biometric sample. If the capture succeeded, this parameter is set to zero. The following values are defined for fingerprint capture: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + If the function succeeds, it returns . If the function fails, it returns an HRESULT value that indicates the error. Possible values include, but are not limited to, those in the following table. For a list of common error codes, see Common HRESULT Values. + + + Return code + Description + + + + The caller does not have permission to capture raw samples, or the session was not opened by using the flag. + + + + The session handle is not valid. + + + + The biometric unit does not support the requested operation. + + + + The , , , and pointers cannot be NULL. + + + + The operation could not be completed because the biometric unit is currently being used for an enrollment transaction (system pool only). + + + + + + + Captures a biometric sample asynchronously and returns the raw or processed data in a biometric information record (BIR). The function returns immediately to the caller, captures the sample on a separate thread, and calls into an application-defined callback function to update operation status. + Important We recommend that, beginning with Windows 8, you no longer use this function to start an asynchronous operation. Instead, do the following: + + + Implement a function to receive notice when the operation completes. + + + Call the function. Pass the address of your callback in the parameter. Pass in the parameter. Retrieve an asynchronous session handle. + + + Use the asynchronous session handle to call . When the operation finishes, the Windows Biometric Framework will allocate and initialize a structure with the results and invoke your callback with a pointer to the results structure. + + + Call from your callback implementation to release the structure after you have finished using it. + + + + A value that identifies an open biometric session. + + A bitmask that specifies the intended use of the sample. This can be a bitwise OR of the following values: + + + + + + + + + + + + + + + + + + + + A value that specifies the type of processing to be applied to the captured sample. This can be a bitwise OR of the following security and processing level flags: + (Encrypt the sample.) + (Sign the sample or protect it by using a message authentication code (MAC).) + (If this flag and the WINBIO_DATA_FLAG_INTEGRITY flag are set, sign the sample. If this flag is not set but the WINBIO_DATA_FLAG_INTEGRITY flag is set, compute a MAC.) + (Return the sample exactly as it was captured by the sensor.) + (Return the sample after it has been cleaned and filtered.) + (Return the sample after it is ready to be used for the purpose specified by the Purpose parameter.) + + Address of a callback function that will be called by the function when the capture operation succeeds or fails. You must create the callback. + Address of an application-defined data structure that is passed to the callback function in its parameter. This structure can contain any data that the custom callback function is designed to handle. + + If the function succeeds, it returns . If the function fails, it returns an HRESULT value that indicates the error. Possible values include, but are not limited to, those in the following table. For a list of common error codes, see Common HRESULT Values. + + + Return code + Description + + + + The caller does not have permission to capture raw samples, or the session was not opened by using the flag. + + + + The session handle is not valid. + + + + The biometric unit does not support the requested operation. + + + + The , , , and pointers cannot be NULL. + + + + The operation could not be completed because the biometric unit is currently being used for an enrollment transaction (system pool only). + + + + + + + Closes a framework handle previously opened with . + + Handle to the framework session that will be closed. + If the function succeeds, it returns . If the function fails, it returns an HRESULT value that indicates the error. + + + + Closes a biometric session and releases associated resources. + + A value that identifies an open biometric session. Open a synchronous session handle by calling . Open an asynchronous session handle by calling . + + If the function succeeds, it returns . If the function fails, it returns an HRESULT value that indicates the error. Possible values include, but are not limited to, those in the following table. For a list of common error codes, see Common HRESULT Values. + + + Return code + Description + + + + The session handle is not valid. + + + + + + + + + Deletes a biometric template from the template store. + + A value that identifies an open biometric session. Open a synchronous session handle by calling . Open an asynchronous session handle by calling . + A value that identifies the biometric unit where the template is located. + Pointer to a structure that contains the GUID or SID of the template to be deleted. If the Type member of the structure is , templates matching the parameter will be deleted for all identities. Only administrators can perform wildcard identity deletion. + A value that provides additional information about the template to be deleted. If you specify , all templates for the biometric unit specified by the parameter are deleted. + + If the function succeeds, it returns . If the function fails, it returns an HRESULT value that indicates the error. Possible values include, but are not limited to, those in the following table. For a list of common error codes, see Common HRESULT Values. + + + Return code + Description + + + + The session handle is not valid. + + + + The parameter contains zero or the SubFactor contains . + + + + The pointer specified in the parameter cannot be NULL. + + + + The operation could not be completed because the biometric unit is currently being used for an enrollment transaction. + + + + + + + Asynchronously captures a biometric sample and adds it to a template. The function returns immediately to the caller, performs enrollment on a separate thread, and calls into an application-defined callback function to update operation status. + Important We recommend that, beginning with Windows 8, you no longer use this function to start an asynchronous operation. Instead, do the following: + + + Implement a function to receive notice when the operation completes. + + + Call the function. Pass the address of your callback in the CallbackRoutine parameter. Pass in the NotificationMethod parameter. Retrieve an asynchronous session handle. + + + Use the asynchronous session handle to call . When the operation finishes, the Windows Biometric Framework will allocate and initialize a structure with the results and invoke your callback with a pointer to the results structure. + + + Call from your callback implementation to release the structure after you have finished using it. + + + + A value that identifies an open biometric session. + Address of a callback function that will be called by the function when the capture operation succeeds or fails. You must create the callback. + Pointer to an optional application-defined structure that is passed to the parameter of the callback function. This structure can contain any data that the custom callback function is designed to handle. + + If the function succeeds, it returns . If the function fails, it returns an HRESULT value that indicates the error. Possible values include, but are not limited to, those in the following table. For a list of common error codes, see Common HRESULT Values. + + + Return code + Description + + + + The calling account is not allowed to perform enrollment. + + + + The session handle is not valid. + + + + The pointer specified by the parameter cannot be NULL. + + + + + + + Initiates a biometric enrollment sequence and creates an empty biometric template. + + A value that identifies an open biometric session. Open a synchronous session handle by calling . Open an asynchronous session handle by calling . + + A value that provides additional information about the enrollment. This must be one of the following values: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A value that identifies the biometric unit. This value cannot be zero. You can find a unit ID by calling the or functions. + + If the function succeeds, it returns . If the function fails, it returns an HRESULT value that indicates the error. Possible values include, but are not limited to, those in the following table. For a list of common error codes, see Common HRESULT Values. + + + Return code + Description + + + + The caller does not have permission to enroll. + + + + The session handle is not valid. + + + + The SubFactor parameter cannot equal or , and the parameter cannot equal zero. + + + + An enrollment operation is already in progress, and only one enrollment can occur at a given time. + + + + The biometric unit is in use and is locked. + + + + + + + Captures a biometric sample and adds it to a template. + + A value that identifies an open biometric session. Open a synchronous session handle by calling . Open an asynchronous session handle by calling . + + A pointer to a ULONG value that contains additional information the failure to capture a biometric sample. If the capture succeeded, this parameter is set to zero. The following values are defined for fingerprint capture: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + If the function succeeds, it returns . If the function fails, it returns an HRESULT value that indicates the error. Possible values include, but are not limited to, those in the following table. For a list of common error codes, see Common HRESULT Values. + + + Return code + Description + + + + The calling account is not allowed to perform enrollment. + + + + The session handle is not valid. + + + + The pointer specified by the parameter cannot be NULL. + + + + The sample could not be captured. Use the value for more information. + + + + The biometric unit is in use and is locked. + + + + The matching engine requires one or more additional samples to generate a reliable template. You should update instructions to the user to submit more samples and call again. + + + + + + + Finalizes a pending biometric template and saves it to the database associated with the biometric unit used for enrollment. + + A value that identifies an open biometric session. Open a synchronous session handle by calling . Open an asynchronous session handle by calling . + Pointer to a structure that receives the identifier (GUID or SID) of the template. + Pointer to a Boolean value that specifies whether the template being added to the database is new. + + If the function succeeds, it returns . If the function fails, it returns an HRESULT value that indicates the error. Possible values include, but are not limited to, those in the following table. For a list of common error codes, see Common HRESULT Values. + + + Return code + Description + + + + The session handle is not valid. + + + + The pointers specified by the and parameters cannot be NULL. + + + + There is no space available in the database for the template. + + + + The template matches one already saved in the database with a different identity or sub-factor (system pool only). + + + + The biometric unit is in use and is locked. + + + + + + + Ends the enrollment sequence and discards a pending biometric template. + + A value that identifies an open biometric session. Open a synchronous session handle by calling . Open an asynchronous session handle by calling . + + If the function succeeds, it returns . If the function fails, it returns an HRESULT value that indicates the error. Possible values include, but are not limited to, those in the following table. For a list of common error codes, see Common HRESULT Values. + + + Return code + Description + + + + The caller does not have permission to enroll. + + + + The session handle is not valid. + + + + The biometric unit is in use and is locked. + + + + + + + Specifies the individual that you want to enroll when data that represents multiple individuals is present in the sample buffer. Starting with Windows 10, build 1607, this function is available to use with a mobile image. + + + A value that identifies an open biometric session. Open a synchronous session handle by calling . Open an asynchronous session handle by calling . + For enrollment in facial recognition, use with the PoolType parameter set to to get the handle. + + A value that identifies that individual that you want to select for enrollment. + If the function succeeds, it returns S_OK. If the function fails, it returns an HRESULT value that indicates the error. Possible values include, but are not limited to, those in the following table. For a list of common error codes, see Common HRESULT Values. + + + + Enumerates all attached biometric units that match the input type. + + A bitmask of flags that specifies the biometric unit types to be enumerated. Only is currently supported. + Address of a variable that receives a pointer to an array of structures that contain information about each enumerated biometric unit. If the function does not succeed, the pointer is set to NULL. If the function succeeds, you must pass the pointer to to release memory allocated internally for the array. + Pointer to a value that specifies the number of structures pointed to by the parameter. + + If the function succeeds, it returns . If the function fails, it returns an HRESULT value that indicates the error. Possible values include, but are not limited to, those in the following table. For a list of common error codes, see Common HRESULT Values. + + + Return code + Description + + + + The bitmask contained in the parameter contains one or more an invalid type bits. + + + + There was insufficient memory to complete the request. + + + + The and parameters cannot be NULL. + + + + Current administrative policy prohibits use of the Windows Biometric Framework API. + + + + + + + Enumerates all registered databases that match a specified type. + + A bitmask of flags that specifies the biometric unit types to be enumerated. Only is currently supported. + Address of a variable that receives a pointer to an array of structures that contain information about each database. If the function does not succeed, the pointer is set to NULL. If the function succeeds, you must pass the pointer to to release memory allocated internally for the array. + Pointer to a value that specifies the number of structures pointed to by the parameter. + + If the function succeeds, it returns . If the function fails, it returns an HRESULT value that indicates the error. Possible values include, but are not limited to, those in the following table. For a list of common error codes, see Common HRESULT Values. + + + Return code + Description + + + + The bitmask contained in the Factor parameter contains one or more an invalid type bits. + + + + There was insufficient memory to complete the request. + + + + The and parameters cannot be NULL. + + + + + + + Retrieves the biometric sub-factors enrolled for a specified identity and biometric unit. + + A value that identifies an open biometric session. Open a synchronous session handle by calling . Open an asynchronous session handle by calling . + A value that specifies the biometric unit. + Pointer to a structure that contains the GUID or SID of the template from which the sub-factors are to be retrieved. + Address of a variable that receives a pointer to an array of sub-factors. If the function does not succeed, the pointer is set to NULL. If the function succeeds, you must pass the pointer to to release memory allocated internally for the array. + Pointer to a value that specifies the number of elements in the array pointed to by the parameter. If the function does not succeed, this value is set to zero. + + If the function succeeds, it returns . If the function fails, it returns an HRESULT value that indicates the error. Possible values include, but are not limited to, those in the following table. For a list of common error codes, see Common HRESULT Values. + + + Return code + Description + + + + The session handle is not valid. + + + + The parameter cannot be zero. + + + + The , , and parameters cannot be NULL. + + + + The operation could not be completed because the biometric unit specified by the parameter is currently being used for an enrollment transaction. + + + + The GUID or SID specified by the Identity parameter cannot be found. + + + + + + + Retrieves information about installed biometric service providers. + + A bitmask of flags that specifies the biometric unit types to be enumerated. Only is currently supported. + Address of a variable that receives a pointer to an array of structures that contain information about each of the available service providers. If the function does not succeed, the pointer is set to NULL. If the function succeeds, you must pass the pointer to to release memory allocated internally for the array. + Pointer to a value that specifies the number of structures pointed to by the parameter. + + If the function succeeds, it returns . If the function fails, it returns an HRESULT value that indicates the error. Possible values include, but are not limited to, those in the following table. For a list of common error codes, see Common HRESULT Values. + + + Return code + Description + + + + The bitmask contained in the Factor parameter contains one or more an invalid type bits. + + + + There was insufficient memory to complete the request. + + + + The and parameters cannot be NULL. + + + + + + + Releases memory allocated for the client application by an earlier call to a Windows Biometric Framework API function. + + Address of the memory block to delete. + + If the function succeeds, it returns . If the function fails, it returns an HRESULT value that indicates the error. Possible values include, but are not limited to, those in the following table. For a list of common error codes, see Common HRESULT Values. + + + Return code + Description + + + + The parameter cannot be NULL. + + + + + + + Retrieves a value that specifies whether credentials have been set for the specified user. + + A structure that contains the SID of the user account for which the credential is being queried. + + A value that specifies the credential type. This can be one of the following values: + + + Value + Meaning + + + + The password-based credential is checked. + + + + + Pointer to a enumeration value that specifies whether user credentials have been set. This can be one of the following values: + + + Value + Meaning + + + + A credential has not been specified. + + + + A credential has been specified. + + + + + If the function succeeds, it returns . If the function fails, it returns an HRESULT value that indicates the error. Possible values include, but are not limited to, those in the following table. For a list of common error codes, see Common HRESULT Values. + + + Return code + Description + + + + The caller does not have permission to retrieve the credential state. + + + + The specified identity does not exist. + + + + Current administrative policy prohibits use of the credential provider. + + + + + + + Captures a biometric sample and determines whether it matches an existing biometric template. + + A value that identifies an open biometric session. Open a synchronous session handle by calling . Open an asynchronous session handle by calling . + A pointer to a ULONG value that specifies the biometric unit used to perform the identification. + Pointer to a structure that receives the GUID or SID of the user providing the biometric sample. + Pointer to a value that receives the sub-factor associated with the biometric sample. See the Remarks section for more details. + + A pointer to a value that contains additional information about the failure to capture a biometric sample. If the capture succeeded, this parameter is set to zero. The following values are defined for fingerprint capture: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + If the function succeeds, it returns . If the function fails, it returns an HRESULT value that indicates the error. Possible values include, but are not limited to, those in the following table. For a list of common error codes, see Common HRESULT Values. + + + Return code + Description + + + + The session handle is not valid. + + + + The pointer specified by the , , , or parameters cannot be NULL. + + + + The sample could not be captured. Use the value for more information. + + + + The operation could not be completed because the biometric unit is currently being used for an enrollment transaction (system pool only). + + + + The biometric sample does not match any saved in the database. + + + + + + + Asynchronously captures a biometric sample and determines whether it matches an existing biometric template. The function returns immediately to the caller, performs capture and identification on a separate thread, and calls into an application-defined callback function to update operation status. + Important We recommend that, beginning with Windows 8, you no longer use this function to start an asynchronous operation. Instead, do the following: + + + Implement a function to receive notice when the operation completes. + + + Call the function. Pass the address of your callback in the CallbackRoutine parameter. Pass in the NotificationMethod parameter. Retrieve an asynchronous session handle. + + + Use the asynchronous session handle to call . When the operation finishes, the Windows Biometric Framework will allocate and initialize a structure with the results and invoke your callback with a pointer to the results structure. + + + Call from your callback implementation to release the structure after you have finished using it. + + + + A value that identifies an open biometric session. + Address of a callback function that will be called by the function when identification succeeds or fails. You must create the callback. + Pointer to an application-defined data structure that is passed to the callback function in its parameter. This structure can contain any data that the custom callback function is designed to handle. + + If the function succeeds, it returns . If the function fails, it returns an HRESULT value that indicates the error. Possible values include, but are not limited to, those in the following table. For a list of common error codes, see Common HRESULT Values. + + + Return code + Description + + + + The session handle is not valid. + + + + The SessionHandle and IdentifyCallback parameter + + + + + + + Retrieves a value that specifies whether users can log on to a domain by using biometric information. + + Pointer to a Boolean value that specifies whether biometric domain logons are enabled. + + Pointer to a WINBIO_SETTING_SOURCE_TYPE value that specifies the setting source. This can be one of the following values: + + + Value + Meaning + + + + The setting is not valid. + + + + The setting originated from built-in policy. + + + + The setting originated in the local computer registry. + + + + The setting was created by Group Policy. + + + + If the function succeeds, it returns . If the function fails, it returns an HRESULT value that indicates the error. For a list of common error codes, see Common HRESULT Values. + + + + Retrieves a value that specifies whether the Windows Biometric Framework is currently enabled. + + Pointer to a Boolean value that specifies whether the Windows Biometric Framework is currently enabled. + + Pointer to a WINBIO_SETTING_SOURCE_TYPE value that specifics the setting source. This can be one of the following values: + + + Value + Meaning + + + + The setting is not valid. + + + + The setting originated from built-in policy. + + + + The setting originated in the local computer registry. + + + + The setting was created by Group Policy. + + + + If the function succeeds, it returns . If the function fails, it returns an HRESULT value that indicates the error. For a list of common error codes, see Common HRESULT Values. + + + + Gets information about the biometric enrollments that the specified user has on the computer. Biometric enrollments include enrollments for facial recognition, fingerprint scanning, iris scanning, and so on. + + + + A set of flags that indicate the biometric enrollments that the specified user has on the computer. A value of 0 indicates that the user has no biometric enrollments. + These enrollments represent system pool enrollments only, such as enrollments that you can use to authenticate a user for sign-in, unlock, and so on.This value does not include private pool enrollments. + If you specify the wildcard identity type for the structure that you use for the AccountOwner parameter, this set of flags represents the combined set of enrollments for all users with accounts on the computer. + + If the function succeeds, it returns . If the function fails, it returns an HRESULT value that indicates the error. For a list of common error codes, see Common HRESULT Values. + + + + Retrieves a value that indicates whether users can log on by using biometric information. + + Pointer to a Boolean value that specifies whether biometric logons are enabled. + + Pointer to a WINBIO_SETTING_SOURCE_TYPE value that specifics the setting source. This can be one of the following values: + + + Value + Meaning + + + + The setting is not valid. + + + + The setting originated from built-in policy. + + + + The setting originated in the local computer registry. + + + + The setting was created by Group Policy. + + + + If the function succeeds, it returns . If the function fails, it returns an HRESULT value that indicates the error. For a list of common error codes, see Common HRESULT Values. + + + + Retrieves a session, unit, or template property. + + A value that identifies an open biometric session. Open a synchronous session handle by calling . Open an asynchronous session handle by calling . + A value that specifies the source of the property information. Currently this must be . + A value that specifies the property to be queried. Currently this must be . + A value that identifies the biometric unit. This value cannot be zero. You can find a unit ID by calling the or functions. + Reserved. This must be NULL. + Reserved. This must be . + Address of a pointer to a buffer that receives the property value. + Pointer to a variable that receives the size, in bytes, of the buffer pointed to by the parameter. + + If the function succeeds, it returns . If the function fails, it returns an HRESULT value that indicates the error. Possible values include, but are not limited to, those in the following table. For a list of common error codes, see Common HRESULT Values. + + + Return code + Description + + + + The session handle specified by the parameter is not valid. + + + + The , , or arguments cannot be NULL. + + + + The , , or arguments are incorrect. + + + + The value of the argument is incorrect. + + + + The value of the argument is incorrect. + + + + The caller attempted to query a property that resides inside of a locked region. + + + + The object being queried does not support the specified property. + + + + The operation could not be completed because the specified biometric unit is currently being used for an enrollment transaction (system pool only). + + + + + + + Retrieves the ID number of a biometric unit selected interactively by a user. + + A value that identifies an open biometric session. Open a synchronous session handle by calling . Open an asynchronous session handle by calling . + A pointer to a ULONG value that specifies the biometric unit. + + If the function succeeds, it returns . If the function fails, it returns an HRESULT value that indicates the error. Possible values include, but are not limited to, those in the following table. For a list of common error codes, see Common HRESULT Values. + + + Return code + Description + + + + The session handle is not valid. + + + + The pointer specified by the UnitId parameter cannot be NULL. + + + + The operation could not be completed because the biometric unit is currently being used for an enrollment transaction (system pool only). + + + + + + + Asynchronously retrieves the ID number of the biometric unit selected interactively by a user. The function returns immediately to the caller, processes on a separate thread, and reports the selected biometric unit by calling an application-defined callback function. + Important We recommend that, beginning with Windows 8, you no longer use this function to start an asynchronous operation. Instead, do the following: + + + Implement a function to receive notice when the operation completes. + + + Call the function. Pass the address of your callback in the CallbackRoutine parameter. Pass in the NotificationMethod parameter. Retrieve an asynchronous session handle. + + + Use the asynchronous session handle to call . When the operation finishes, the Windows Biometric Framework will allocate and initialize a structure with the results and invoke your callback with a pointer to the results structure. + + + Call from your callback implementation to release the structure after you have finished using it. + + + + A value that identifies an open biometric session. + Address of a callback function that will be called by the WinBioLocateSensorWithCallback function when sensor location succeeds or fails. You must create the callback. + Address of an application-defined data structure that is passed to the callback function in its LocateCallbackContext parameter. This structure can contain any data that the custom callback function is designed to handle. + + If the function succeeds, it returns . If the function fails, it returns an HRESULT value that indicates the error. Possible values include, but are not limited to, those in the following table. For a list of common error codes, see Common HRESULT Values. + + + Return code + Description + + + + The session handle is not valid. + + + + The address specified by the Locate + + + + + + + Locks a biometric unit for exclusive use by a single session. + + A WINBIO_SESSION_HANDLE value that identifies an open biometric session. Open a synchronous session handle by calling . Open an asynchronous session handle by calling . + A WINBIO_UNIT_ID value that specifies the biometric unit to be locked. + + If the function succeeds, it returns . If the function fails, it returns an HRESULT value that indicates the error. Possible values include, but are not limited to, those in the following table. For a list of common error codes, see Common HRESULT Values. + + + Return code + Description + + + + The session handle is not valid. + + + + The parameter cannot contain zero. + + + + The operation could not be completed because the specified biometric unit is currently being used for an enrollment transaction (system pool only). + + + + The biometric unit cannot be locked because the specified session already has another unit locked. + + + + + + + Connects to a biometric service provider and one or more biometric units. + + A bitmask of WINBIO_BIOMETRIC_TYPE flags that specifies the biometric unit types to be enumerated. Only is currently supported. + + A ULONG value that specifies the type of the biometric units that will be used in the session. This can be one of the following values: + + + Value + Meaning + + + + The session connects to a shared collection of biometric units managed by the service provider. + + + + The session connects to a collection of biometric units that are managed by the caller. + + + + + A ULONG value that specifies biometric unit configuration and access characteristics for the new session. Configuration flags specify the general configuration of units in the session. Access flags specify how the application will use the biometric units. You must specify one configuration flag but you can combine that flag with any access flag. + + + Group: configurationThe biometric units operate in the manner specified during installation. You must use this value when the parameter is . + + + + Group: configurationThe biometric units operate only as basic capture devices. All processing, matching, and storage operations is performed by software plug-ins. + + + + Group: configurationThe biometric units use internal processing and storage capabilities. + + + + Group: accessThe client application captures raw biometric data using . + + + + Group: accessThe client performs vendor-defined control operations on a biometric unit by calling . + + + Pointer to an array of biometric unit identifiers to be included in the session. You can call to enumerate the biometric units. Set this value to NULL if the parameter is . + A value that specifies the number of elements in the array pointed to by the parameter. Set this value to zero if the parameter is . + + A value that specifies the database(s) to be used by the session. If the parameter is , you must specify the of an installed database. If the parameter is not , you can specify one of the following common values. + + + Each biometric unit in the sensor pool uses the default database specified in the default biometric unit configuration. You must specify this value if the parameter is . You cannot use this value if the parameter is + + + + You can specify this value to be used for scenarios prior to starting Windows. Typically, the database is part of the sensor chip or is part of the BIOS and can only be used for template enrollment and deletion. + + + + The database is on the sensor chip and is available for enrollment and matching. + + + Pointer to the new session handle. If the function does not succeed, the handle is set to zero. + + If the function succeeds, it returns . If the function fails, it returns an HRESULT value that indicates the error. Possible values include, but are not limited to, those in the following table. For a list of common error codes, see Common HRESULT Values. + + + Return code + Description + + + + One or more arguments have incorrect values or are incompatible with other arguments. + + + + The session handle pointer in the parameter cannot be NULL. + + + + The parameter contains the or the flag and the caller has not been granted either access permission. + + + + One or more of the biometric unit numbers specified in the parameter is not valid. + + + + The client application is running on a remote desktop client and is attempting to open a system pool session. + + + + The parameter is set to and one or more of the requested sensors in that pool is not available. + + + + Current administrative policy prohibits use of the Windows Biometric Framework API. + + + + + + + The function causes a fast user switch to the account associated with the last successful identification operation performed by the biometric session. + + + + If the function succeeds, it returns . If the function fails, it returns an HRESULT value that indicates the error. Possible values include, but are not limited to, those in the following table. For a list of common error codes, see Common HRESULT Values. + + + Return code + Description + + + + The caller does not have permission to switch users or the biometric session is out of date. + + + + The session handle is not valid. + + + + The user identified by the parameter is the same as the current user. + + + + The user could not be logged on. + + + + Current administrative policy prohibits use of the credential provider. + + + + Fast user switching is not enabled. + + + + Fast user switching cannot be performed because secure logon (CTRL+ALT+DELETE) is currently enabled. + + + + + + + Turns on the face-recognition or iris-monitoring mechanism for the specified biometric unit. Starting with Windows 10, build 1607, this function is available to use with a mobile image. + + An asynchronous handle for the biometric session that you obtained by calling the function with the PoolType parameter set to . + he identifier of the biometric unit for which you want to turn on the face-recognition or iris-monitoring mechanism. + + + + + The function Registers a callback function to receive event notifications from the service provider associated with an open session. + + A WINBIO_SESSION_HANDLE value that identifies the open biometric session. Open the session handle by calling . + + A value that specifies the types of events to monitor. Only the fingerprint provider is currently supported. You must specify one of the following flags. + (The sensor detected a finger swipe that was not requested by the application, or the requesting application does not have window focus. The Windows Biometric Framework calls into your callback function to indicate that a finger swipe has occurred but does not try to identify the fingerprint.) + (The sensor detected a finger swipe that was not requested by the application, or the requesting application does not have window focus. The Windows Biometric Framework attempts to identify the fingerprint and passes the result of that process to your callback function.) + + Address of a callback function that receives the event notifications sent by the Windows Biometric Framework. You must define this function. + An optional application-defined value that is returned in the pvContext parameter of the callback function. This value can contain any data that the custom callback function is designed to handle. + + If the function succeeds, it returns . If the function fails, it returns an HRESULT value that indicates the error. Possible values include, but are not limited to, those in the following table. For a list of common error codes, see Common HRESULT Values. + + + Return code + Description + + + + The session handle is not valid. + + + + The address of the callback function specified by the EventCallback parameter cannot be NULL. + + + + The parameter cannot be zero and you cannot specify both and at the same time. + + + + An active event monitor has already been registered. + + + + The service provider does not support event notification. + + + + + + + Releases window focus. + + + If the function succeeds, it returns . If the function fails, it returns an HRESULT value that indicates the error. Possible values include, but are not limited to, those in the following table. For a list of common error codes, see Common HRESULT Values. + + + Return code + Description + + + + The calling process must be running under the Local System account. + + + + + + + Removes all credentials from the store. + + If the function succeeds, it returns S_OK. If the function fails, it returns an HRESULT value that indicates the error. For a list of common error codes, see Common HRESULT Values. + + + + Removes all user credentials for the current domain from the store. + + If the function succeeds, it returns S_OK. If the function fails, it returns an HRESULT value that indicates the error. For a list of common error codes, see Common HRESULT Values. + + + + Deletes a biometric logon credential for a specified user. Starting with Windows 10, build 1607, this function is available to use with a mobile image. + + A structure that contains the SID of the user account for which the logon credential will be removed. + + A value that specifies the credential type. This can be one of the following values: + + + Value + Meaning + + + + The password-based credential will be deleted. + + + + All logon credentials for the user will be deleted. + + + + + If the function succeeds, it returns . If the function fails, it returns an HRESULT value that indicates the error. Possible values include, but are not limited to, those in the following table. For a list of common error codes, see Common HRESULT Values. + + + Return code + Description + + + + The caller does not have permission to delete the credential. + + + + The specified identity does not exist or does not have any related records in the credential store. + + + + + + + Saves a biometric logon credential for the current user. + + A value that specifies the credential type. Currently, this can be WINBIO_CREDENTIAL_PASSWORD. + A pointer to a variable length array of bytes that contains the credential. The format depends on the and parameters. + Size, in bytes, of the value specified by the parameter. + + A enumeration value that specifies the format of the credential. If the Type parameter is , this can be one of the following: + + + Value + Meaning + + + + The credential is a plaintext NULL-terminated Unicode string. + + + + The credential was wrapped by using the CredProtect function and packed by using the CredPackAuthenticationBuffer function. This is recommended. + + + + The password credential was wrapped with CredProtect. + + + + + If the function succeeds, it returns . If the function fails, it returns an HRESULT value that indicates the error. Possible values include, but are not limited to, those in the following table. For a list of common error codes, see Common HRESULT Values. + + + Return code + Description + + + + The caller does not have permission to set the credential. + + + + The user has not enrolled a biometric sample. + + + + The credential was not valid for the current user. + + + + Current administrative policy prohibits use of the credential provider. + + + + + + + Sets the value of a standard property associated with a biometric session, unit, template, or account. Starting with Windows 10, build 1607, this function is available to use with a mobile image. + + A value that identifies an open biometric session. Open a synchronous session handle by calling . Open an asynchronous session handle by calling . + A value that specifies the source of the property information. Currently this must be . + A value that specifies the property to be queried. Currently this must be . All other properties are read-only. + A value that identifies the biometric unit. For the property, this value must be 0. + Address of a structure that specifies the account for which you want to set the property. + Reserved. This must be . + A pointer to a structure that specifies the new value for the property. This value cannot be NULL. For setting the property, the structure must be a structure. + The size, in bytes, of the structure to which the parameter points. This value cannot be 0. + + If the function succeeds, it returns . If the function fails, it returns an HRESULT value that indicates the error. Possible values include, but are not limited to, those in the following table. For a list of common error codes, see Common HRESULT Values. + + + + + Releases the session lock on the specified biometric unit. + + A WINBIO_SESSION_HANDLE value that identifies an open biometric session. Open a synchronous session handle by calling . Open an asynchronous session handle by calling . + A WINBIO_UNIT_ID value that specifies the biometric unit to unlock. + + If the function succeeds, it returns . If the function fails, it returns an HRESULT value that indicates the error. Possible values include, but are not limited to, those in the following table. For a list of common error codes, see Common HRESULT Values. + + + Return code + Description + + + + The session handle is not valid. + + + + The parameter cannot contain zero. + + + + The biometric unit specified by the UnitId parameter is not currently locked by the session. + + + + + + + The function cancels event notifications from the service provider associated with an open biometric session. + + A WINBIO_SESSION_HANDLE value that identifies the open biometric session. Open the session handle by calling . + + If the function succeeds, it returns . If the function fails, it returns an HRESULT value that indicates the error. Possible values include, but are not limited to, those in the following table. For a list of common error codes, see Common HRESULT Values. + + + Return code + Description + + + + The session handle is not valid. + + + + + + + Captures a biometric sample and determines whether the sample corresponds to the specified user identity. + + A value that identifies an open biometric session. Open a synchronous session handle by calling . Open an asynchronous session handle by calling . + Pointer to a structure that contains the GUID or SID of the user providing the biometric sample. + + A value that specifies the sub-factor associated with the biometric sample. The Windows Biometric Framework (WBF) currently supports only fingerprint capture and can use the following constants to represent sub-type information. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A pointer to a value that specifies the biometric unit that performed the verification. + Pointer to a Boolean value that specifies whether the captured sample matched the user identity specified by the parameter. + + A pointer to a ULONG value that contains additional information about the failure to capture a biometric sample. If the capture succeeded, this parameter is set to zero. The following values are defined for fingerprint capture: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + If the function succeeds, it returns . If the function fails, it returns an HRESULT value that indicates the error. Possible values include, but are not limited to, those in the following table. For a list of common error codes, see Common HRESULT Values. + + + Return code + Description + + + + The session handle is not valid. + + + + The argument is incorrect. + + + + The pointer specified by the , , , or parameters cannot be NULL. + + + + The biometric sample could not be captured. Use the value for more information. + + + + The operation could not be completed because the specified biometric unit is currently being used for an enrollment transaction (system pool only). + + + + The biometric sample does not correspond to the specified and combination. + + + + + + + Asynchronously captures a biometric sample and determines whether the sample corresponds to the specified user identity. The function returns immediately to the caller, performs capture and verification on a separate thread, and calls into an application-defined callback function to update operation status. + Important We recommend that, beginning with Windows 8, you no longer use this function to start an asynchronous operation. Instead, do the following: + + + Implement a function to receive notice when the operation completes. + + + Call the function. Pass the address of your callback in the CallbackRoutine parameter. Pass in the NotificationMethod parameter. Retrieve an asynchronous session handle. + + + Use the asynchronous session handle to call . When the operation finishes, the Windows Biometric Framework will allocate and initialize a structure with the results and invoke your callback with a pointer to the results structure. + + + Call from your callback implementation to release the structure after you have finished using it. + + + + A value that identifies an open biometric session. + Pointer to a structure that contains the GUID or SID of the user providing the biometric sample. + A value that specifies the sub-factor associated with the biometric sample. See the Remarks section for more details. + Address of a callback function that will be called by the function when verification succeeds or fails. You must create the callback. + An optional application-defined structure that is returned in the parameter of the callback function. This structure can contain any data that the custom callback function is designed to handle. + + If the function succeeds, it returns . If the function fails, it returns an HRESULT value that indicates the error. Possible values include, but are not limited to, those in the following table. For a list of common error codes, see Common HRESULT Values. + + + Return code + Description + + + + The session handle is not valid. + + + + The argument is incorrect. + + + + The pointer specified by the Identity and parameters cannot be NULL. + + + + + + + Blocks caller execution until all pending biometric operations for a session have been completed or canceled. + + A value that identifies an open biometric session. Open a synchronous session handle by calling . Open an asynchronous session handle by calling . + + If the function succeeds, it returns . If the function fails, it returns an HRESULT value that indicates the error. Possible values include, but are not limited to, those in the following table. For a list of common error codes, see Common HRESULT Values. + + + Return code + Description + + + + The session handle is not valid. + + + + + + + GUIDs identify objects such as interfaces, manager entry-point vectors (EPVs), and class objects. A GUID is a 128-bit value consisting of one group of 8 hexadecimal digits, followed by three groups of 4 hexadecimal digits each, followed by one group of 12 hexadecimal digits. The following example GUID shows the groupings of hexadecimal digits in a GUID: 6B29FC40-CA47-1067-B31D-00DD010662DA + The structure stores a GUID. + + + + + Initializes a new instance of the Guid structure by using the specified integers and bytes. + + The first 4 bytes of the GUID. + The next 2 bytes of the GUID. + The next 2 bytes of the GUID. + The next byte of the GUID. + The next byte of the GUID. + The next byte of the GUID. + The next byte of the GUID. + The next byte of the GUID. + The next byte of the GUID. + The next byte of the GUID. + The next byte of the GUID. + + + + Specifies the first 8 hexadecimal digits of the GUID. + + + + + Specifies the first group of 4 hexadecimal digits. + + + + + Specifies the second group of 4 hexadecimal digits. + + + + + Array of 8 bytes. The first 2 bytes contain the third group of 4 hexadecimal digits. The remaining 6 bytes contain the final 12 hexadecimal digits. + + + + + Represents a 64-bit signed integer value. + + + + + An unsigned 64-bit integer. + + + + + The low-order 32 bits. + + + + + The high-order 32 bits. + + + + + The structure contains the security descriptor for an object and specifies whether the handle retrieved by specifying this structure is inheritable. This structure provides security settings for objects created by various functions, such as , , , , or . + + + + + The size, in bytes, of this structure. Set this value to the size of the structure. + + + + + A pointer to a structure that controls access to the object. If the value of this member is NULL, the object is assigned the default security descriptor associated with the access token of the calling process. This is not the same as granting access to everyone by assigning a NULL discretionary access control list (DACL). By default, the default DACL in the access token of a process allows access only to the user represented by the access token. + For information about creating a security descriptor, see Creating a Security Descriptor. + + + + + A Boolean value that specifies whether the returned handle is inherited when a new process is created. If this member is TRUE, the new process inherits the handle. + + + + + The structure represents a security identifier (SID) and its attributes. SIDs are used to uniquely identify users or groups. + + + + + A pointer to a SID structure. + + + + + Specifies attributes of the SID. This value contains up to 32 one-bit flags. Its meaning depends on the definition and use of the SID. + + + + + The structure identifies the user associated with an access token. + + + + + Specifies a structure representing the user associated with the access token. There are currently no attributes defined for user security identifiers (SIDs). + + + + + The structure contains the results of an asynchronous operation. + + + + + Handle of an asynchronous session started by calling the function or the function. + + + + + Type of the asynchronous operation. For more information, see WINBIO_OPERATION_TYPE Constants. + + + + + Sequence number of the asynchronous operation. The integers are assigned sequentially for each operation in a biometric session, starting at one (1). For any session, the open operation is always assigned the first sequence number and the close operation is assigned the last sequence number. If your application queues multiple operations, you can use sequence numbers to perform error handling. For example, you can ignore operation results until a specific sequence number is sent to the application. + + + + + System date and time at which the biometric operation began. For more information, see the function. + + + + + Error code returned by the operation. + + + + + Biometric unit ID number. + + + + + Address of a buffer supplied by the caller. The buffer is not modified by the framework or the biometric unit. Your application can use the data to help it determine what actions to perform upon receipt of the completion notice or to maintain additional information about the requested operation. + + + + + Union that encloses nested structures that contain additional information about the success or failure of asynchronous operations begun by the client application. + + + + + Union that encloses nested structures that contain additional information about the success or failure of asynchronous operations begun by the client application. + + + + + Contains the results of an asynchronous call to . + + + + + Contains the results of an asynchronous call to . + + + + + Contains the results of an asynchronous call to . + + + + + Contains the results of an asynchronous call to . + + + + + Contains the results of an asynchronous call to . + + + + + Contains the results of an asynchronous call to . + + + + + Contains the results of an asynchronous call to . + + + + + Contains the results of an asynchronous call to . + + + + + Contains the results of an asynchronous call to . + + + + + Reserved. + + + + + Contains status information about the event that was raised. + + + + + Contains the results of an asynchronous call to or . + + + + + Contains the results of an asynchronous call to or . + + + + + Contains the results of an asynchronous call to or . + + + + + Contains the results of an asynchronous call to or . + + + + + Contains the results of an asynchronous call to . + + + + + Specifies whether the captured sample matched the user identity. + + + + + Additional information about verification failure. For more information, see Remarks. + + + + + Contains the results of an asynchronous call to . + + + + + GUID or SID of the user providing the biometric sample. + + + + + Sub-factor associated with the biometric sample. For more information, see Remarks. + + + + + Additional information about the failure, if any, to capture and identify a biometric sample. For more information, see Remarks. + + + + + Contains the results of an asynchronous call to . + + + + + Additional information about the enrollment. For more information, see Remarks. + + + + + Contains the results of an asynchronous call to . + + + + + Additional information about the failure to capture a biometric sample. For more information, see Remarks. + + + + + Contains the results of an asynchronous call to . + + + + + GUID or SID of the template to be saved. + + + + + Specifies whether the template being added to the database is new. + + + + + Contains the results of an asynchronous call to . + + + + + GUID or SID of the template from which the sub-factors were retrieved. + + + + + Number of elements in the array pointed to by the member. + + + + + Pointer to an array of sub-factors. For more information, see Remarks. + + + + + Contains the results of an asynchronous call to . + + + + + Pointer to a structure that contains the sample. + + + + + Size, in bytes, of the structure returned in the Sample member. + + + + + Additional information about the failure to capture a biometric sample. For more information, see Remarks. + + + + + Contains the results of an asynchronous call to . + + + + + GUID or SID of the template that was deleted. + + + + + Additional information about the template. + + + + + Contains the results of an asynchronous call to . + + + + + Source of the property information. Currently this will be . + + + + + The property that was queried. Currently this will be . + + + + + This is a reserved value and will be NULL. + + + + + This is reserved and will be WINBIO_SUBTYPE_NO_INFORMATION. + + + + + Size, in bytes, of the property value pointed to by the member. + + + + + Pointer to the property value. + + + + + Reserved. + + + + + Reserved. + + + + + Contains status information about the event that was raised. + + + + + Contains event information. + + + + + Contains the results of an asynchronous call to or . + + + + + The component within the biometric unit that performed the operation. + + + + + Vendor-defined code recognized by the biometric unit specified by the UnitId parameter of the or function and the adapter specified by the Component parameter. + + + + + Vendor-defined status code that specifies the outcome of the control operation. + + + + + Pointer to a buffer that contains the control information sent to the adapter by the component. The format and content of the buffer is vendor-defined. + + + + + Size, in bytes, of the buffer specified by the member. + + + + + Pointer to a buffer that receives information sent by the adapter specified by the member. The format and content of the buffer is vendor-defined. + + + + + Size, in bytes, of the buffer specified by the member. + + + + + Size, in bytes, of the data written to the buffer specified by the member. + + + + + Contains the results of an asynchronous call to or . + + + + + The number of structures pointed to by the member. + + + + + Pointer to an array of structures that contain information about each of the available service providers. + + + + + Contains the results of an asynchronous call to or . + + + + + Number of structures pointed to by the member. + + + + + An array of structures that contain information about each enumerated biometric unit. + + + + + Contains the results of an asynchronous call to or . + + + + + Number of structures pointed to by the member. + + + + + Array of structures that contain information about each database. + + + + + The structure represents a biometric information record (BIR). The information record contains header, data, and signature blocks. + + + + + A structure that contains the size, in bytes, and offset of the BIR header. The header contains information that describes the contents of the information record. + + + + + A structure that contains the size, in bytes, and offset of processed or unprocessed biometric information created by the Windows Biometric Framework (WBF). + + + + + A structure that contains the size, in bytes, and offset of processed or unprocessed biometric information provided by vendor sensors and software. + + + + + An optional structure that contains the size, in bytes, and offset of the digital signature message authentication code (MAC) that can be used to verify the integrity of the BIR. If present, the signature or MAC must cover the header and data blocks. + + + + + The structure specifies the size, in bytes, and the offset of a block of biometric information. This structure is used by the structure to specify where the various parts of a biometric information record are located. + + + + + Size, in bytes, of the biometric information. + + + + + Offset, in bytes from the beginning of the structure, of the biometric information. + + + + + The structure contains the Common Biometric Exchange File Format (CBEFF) Patron Format A information that describes the rest of the BIR. + + + + + A Patron Format A bitmask that indicates which CBEFF optional fields are present in the BIR. For more information about all members of , follow the link in the Remarks section to the NISTIR 6529-A Specification. + + + + + A structure of type WINBIO_BIR_VERSION that specifies the CBEFF header version. + Versions are represented as 8-bit values of the form: 0xNM, where N is the major version and M is the minor version. + typedef UCHAR WINBIO_BIR_VERSION, *PWINBIO_BIR_VERSION; + + + + + A structure of type WINBIO_BIR_VERSION that specifies PATRON_HEADER_VERSION. + + + + + A structure of type that specifies the level of processing expected for a data capture. + + + + + A structure of type that specifies the biometric type. + + + + + A structure of type WINBIO_BIOMETRIC_SENSOR_SUBTYPE that specifies the biometric subtype. + + + + + A structure of type that specifies the intended use of the data. + + + + + A structure of type WINBIO_BIR_QUALITY that specifies the biometric data quality. Quality measurements are represented as signed integers in the range 0-100, except: + -1 Quality measurements are supported by the BIR creator, but no value is set in the BIR. + -2 Quality measurements are not supported by the BIR creator. + typedef CHAR WINBIO_BIR_QUALITY, *PWINBIO_BIR_QUALITY; + + + + + Specifies the creation date and time of this BIR in UTC by using the format YYYYMMDDhhmmss. + + + + + Specifies the validity period of this BIR by using the format described in CreationDate. + + + + + A structure of type WINBIO_REGISTERED_FORMAT that specifies the data format of the StandardDataBlock for this . + + + + + A structure of type WINBIO_REGISTERED_FORMAT that specifies the product identifier for the component that generated the StandardDataBlock for this . + + + + + The IOCTL_BIOMETRIC_RESET and IOCTL_BIOMETRIC_UPDATE_FIRMWARE IOCTLs return the structure as output. + + + + + The total size of the payload. This includes the fixed length structure and any variable data at the end. + + + + + The status detail of the I/O operation. This is where WINBIO error and information codes will be passed. The following table shows possible values. + + + Status value + Description + + + + The operation completed successfully. + + + (STATUS_IO_DEVICE_ERROR) + The driver could not gather the necessary information from the device. + + + + The device is in the middle of a vendor-specific operation. This should only be returned when the device cannot be reset, and the vendor-specific operation cannot be canceled. + + + + + + + The structure describes the capabilities of a biometric service provider. This structure is used by the function. + + + + + The type of biometric measurement used by this device. Currently this must be . + + + + + A value that uniquely identifies this biometric service provider component. + + + + + A NULL-terminated Unicode string that contains a description of the biometric service provider. + + + + + A NULL-terminated Unicode string that contains the name of the vendor supplying the biometric service provider. + + + + + A structure the contains the software version of the biometric service provider component. + + + + + The IOCTL_BIOMETRIC_CALIBRATE IOCTL returns the structure as output. + + + + + The total size of the payload. This includes the fixed length structure and any variable data at the end. + + + + + The status detail of the I/O operation. This is where WINBIO error and information codes will be passed. The following table shows possible values. + + + Status value + Description + + + + The operation completed successfully. + + + (STATUS_IO_DEVICE_ERROR) + The driver could not gather the necessary information from the device. + + + + The device is in the middle of a vendor-specific operation. This should only be returned when the device cannot be reset, and the vendor-specific operation cannot be canceled. + + + + + + + A structure of type that contains calibration data specific to this sensor. This member is optional. + + + + + The IOCTL_BIOMETRIC_CAPTURE_DATA IOCTL returns the structure as output. + + + + + The total size of the payload. This includes the fixed length structure and any variable data at the end. + + + + + The status detail of the I/O operation. This is where WINBIO error and information codes will be passed. The following table shows possible values for this member. + + + Status value + Description + + + + The operation completed successfully. + + + + There is already a data collection IOCTL pending. + + + + The format specified is not supported by this driver and device. + + + + The type of data requested is not supported by this driver and device. + + + + The device could not be put into biometric capture mode. This could be because the device is in another non-data collection mode. + + + (STATUS_IO_DEVICE_ERROR) + The operation was not completed due to device error. + + + + The device is in the middle of a vendor-specific operation. + + + + The operation was canceled either by the caller, or an IOCTL_BIOMETRIC_RESET request. + + + + The capture purpose specified is not supported by the driver. + + + + + + + The status of the sensor after the capture has occurred. + + + + + If the sensor status was , this member contains a value. + + + + + A structure of type that contains data captured by the device, of the format specified. The Data array member of the structure should contain a structure. + + + + + The IOCTL_BIOMETRIC_CAPTURE_DATA IOCTL uses the structure as input. + + + + + The total size of the payload. + + + + + Specifies a reason for the data collection. Some sensors will go into a different mode depending on the reason for the data capture. + + + + + Specifies the format of the data to be returned. + + + + + An optional WINBIO_UUID vendor GUID. This indicates the preferred format of the vendor-specific data in the BIR. + + + + + Specifies the level of processing and other attributes for the data to be returned. If format owner and type are the Windows standard, this must be . + + + + + The structure specifies data in IOCTL payloads. + + + + + Specifies the size, in bytes, of the payload. + + + + + Specifies an array that contains the payload. Frequently this member contains a structure of type . + + + + + The IOCTL_BIOMETRIC_GET_SENSOR_STATUS IOCTL returns the structure as output. + + + + + The total size of the payload. This includes the fixed length structure and any variable data at the end. + + + + + The status detail of the I/O operation. This is where WINBIO error and information codes will be passed. The following table shows possible values. + + + Status value + Description + + + + The operation completed successfully. + + + (STATUS_IO_DEVICE_ERROR) + The driver could not gather the necessary information from the device. + + + + + + + A structure of type that contains the operating status of the biometric sensor. + + + + + An optional structure for vendor-specific additional information. + + + + + The structure contains status information sent to the callback routine when an event notice is raised. + + + + + A value that specifies the types of events to monitor. Only the fingerprint provider is currently supported. You must specify one of the following flags. + (The sensor detected a finger swipe that was not requested by the application, or the requesting application does not have window focus. The Windows Biometric Framework calls into your callback function to indicate that a finger swipe has occurred but does not try to identify the fingerprint.) + (The sensor detected a finger swipe that was not requested by the application, or the requesting application does not have window focus. The Windows Biometric Framework attempts to identify the fingerprint and passes the result of that process to your callback function.) + + + + + Structure returned for biometric sample capture. + + + + + Structure returned for biometric capture and identification. Identification determines whether a sample can be associated with an existing biometric template. + + + + + Structure that identifies the success or failure of the operation being monitored. + + + + + Structure returned for biometric sample capture. + + + + + The biometric unit that generated the sample. + + + + + A ULONG value that contains additional information regarding failure to capture a biometric sample. If a capture succeeded, this parameter is set to zero. The following values are defined for fingerprint capture: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Structure returned for biometric capture and identification. Identification determines whether a sample can be associated with an existing biometric template. + + + + + The biometric unit that generated the sample. + + + + + A structure that contains the GUID or SID of the user providing the biometric sample. + + + + + A WINBIO_BIOMETRIC_SUBTYPE value that specifies the sub-factor associated with a biometric sample. The Windows Biometric Framework (WBF) currently supports only fingerprint capture and uses the following constants to represent sub-type information. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Important + Do not attempt to validate the value supplied for the SubFactor value. The Windows Biometrics Service will validate the supplied value before passing it through to your implementation. If the value is or , then validate where appropriate. + + + + + + Structure that identifies the success or failure of the operation being monitored. + + + + + HRESULT value that contains or an error code that resulted from computations performed by the Windows Biometric Framework. + + + + + The structure is the OUT payload for IOCTL_BIOMETRIC_GET_INDICATOR. + + + + + Specifies the total size of the payload, which includes the fixed length structure and any variable data at the end. + + + + + Specifies an HRESULT that contains the status of the I/O operation. See IOCTL_BIOMETRIC_GET_INDICATOR for possible values. + + + + + Specifies a structure of type , which indicateswhether the indicator light is on or off. + + + + + Contains the results of an asynchronous call to WinBioEnrollCapture. + + + + + Specifies the format of the identity information contained in this structure. This can be one of the following values: + + + Value + Meaning + + + + The template has no associated ID. + + + + The structure matches all template identities. + + + + The structure contains a GUID associated with the template. + + + + The structure contains the account SID associated with the template. + + + + + + + A union that can contain one of the following values: + + + + + A structure that contains an account SID if the Type member is . + + + + + The number of characters in the SID. + + + + + An array of unsigned characters that contain the SID. The current maximum size of the array is 68 characters. + + + + + A union that can contain one of the following values: + + + + + Contains 1 if the Type member is . + + + + + Contains 1 if the Type member is . + + + + + Contains a 128-bit GUID value that identifies the template if the Type member is . + + + + + A structure that contains an account SID if the Type member is . + + + + + The structure specifies a biometric data format. + + + + + Specifies format owner. + + + + + Specifies format type. + + + + + The IOCTL_BIOMETRIC_GET_ATTRIBUTES structure returns the structure as output. + + + + + A DWORD value that indicates the total size of the payload, including the fixed length structure and any variable data at the end. + + + + + An HRESULT value that indicates containing status detail of the I/O operation. The following table includes possible values. + + + Status value + Description + + + + The operation completed successfully. + + + (STATUS_IO_DEVICE_ERROR) + The driver could not gather the necessary information from the device. + + + + + + + A structure of type that contains a WinBio WBDI version that is supported by the driver. To be compatible with the WinBio service, must contain the same major version as the current major version of the WinBio service, in addition to a minor version that is less than or equal to the current minor version of the WinBio service. + + + + + A structure of type that contains a bitmask with type(s) of biometric data that is collected by the sensor. In Windows 7, only is supported. + + + + + A structure of type that contains additional information about the sensor. For example, this member could specify whether the sensor requires the user to simply touch the sensor or swipe a finger over the sensor. + + + + + A structure of type , which indicates which capabilities are supported by the device. + + + + + A structure of type WINBIO_STRING that contains the name of the device manufacturer. + + + + + A structure of type WINBIO_STRING that contains the name of the device model. + + + + + A structure of type WINBIO_STRING that contains the serial number of the device, if one exists. + + + + + A structure of type that contains the version of the firmware that is loaded on the device. + + + + + The number of formats that are supported by the driver and device. There must be at least one, which is the Windows standard format. + + + + + A structure of type that contains a list of the formats supported by the driver and device. + + + + + The structure is the IN payload for IOCTL_BIOMETRIC_SET_INDICATOR. + + + + + Specifies the total size of the payload, which includes the fixed length structure and any variable data at the end. + + + + + Specifies a structure of type that indicates whether the indicator light should be set on or off. + + + + + The structure describes the capabilities of a biometric storage adapter. This structure is used by the function. + + + + + The type of biometric measurement saved in the database. + + + + + A GUID that identifies the database. + + + + + A GUID that identifies the format of the templates in the database. + + + + + Information about the characteristics of the database. This can be a bitwise OR of the following constants. + + + Value + Meaning + + + 0xFFFF0000 + 0xFFFF0000 + + + 0x00020000 + 0x00020000 + + + 0x00010000 + 0x00010000 + + + 0x00000002 + 0x00000002 + + + 0x00000001 + 0x00000001 + + + 0x0000FFFF + 0x0000FFFF + + + 0x00000003 + 0x00000003 + + + 0x00000004 + 0x00000004 + + + + + + + The path and file name of the database if it resides on the computer disk. + + + + + A string value that can be sent to a database server to identify the database. + + + + + The structure is the OUT payload for IOCTL_BIOMETRIC_GET_SUPPORTED_ALGORITHMS. + + + + + Specifies the total size of the payload, which includes the fixed length structure and any variable data at the end. + + + + + Specifies the HRESULT status of the I/O operation. + + + + + Specifies the number of algorithms in the data block. + + + + + Specifies a structure of type WINBIO_DATA that contains NULL-terminated UTF-8 OID strings that represent the algorithms supported by the device. + + + + + The structure describes the capabilities of a biometric unit. It is used by the function. + + + + + A value that identifies the biometric unit. + + + + + A ULONG value that specifies the type of the biometric unit. This can be one of the following values: + + + Value + Meaning + + + + The type is unknown. + + + + The session connects to a shared collection of biometric units managed by the service provider. + + + + The session connects to a collection of biometric units that are managed by the caller. + + + + + + + A value that specifies the type of the biometric unit. Only is currently supported. + + + + + A sensor subtype defined for the biometric type specified by the BiometricFactor member. Only fingerprint types () are currently supported. The following subtypes are currently defined for fingerprints: + + + + + + + + + + + + + + + + A bitmask of the biometric sensor capabilities. This can be a bitwise OR of the following values: + + + + + + + + + + + + + + + + + + + + + + + + + + + + A string value that contains the device ID. The string can contain up to 256 Unicode characters including a terminating NULL character. + + + + + A string value that contains a description of the biometric unit. The string can contain up to 256 Unicode characters including a terminating NULL character. + + + + + A string value that contains the name of the manufacturer. The string can contain up to 256 Unicode characters including a terminating NULL character. + + + + + A string value that contains the model number of the biometric unit. The string can contain up to 256 Unicode characters including a terminating NULL character. + + + + + A NULL-terminated Unicode string that contains the serial number of the biometric unit. The string can contain up to 256 Unicode characters including a terminating NULL character. + + + + + A structure that contains the major and minor version numbers for the biometric unit. + + + + + The structure is the IN payload for IOCTL_BIOMETRIC_UPDATE_FIRMWARE. + + + + + Specifies the total size of the payload, which includes the fixed length structure and any variable data at the end. + + + + + Specifies a structure of type that contains the vendor-specific firmware image. + + + + + The structure contains the software version number of a biometric service provider component. + + + + + A DWORD that contains the major version number. + + + + + A DWORD that contains the minor version number. + + + + diff --git a/sources/WinBiometricDotNet/ErrorEvent.cs b/sources/WinBiometricDotNet/ErrorEvent.cs index ff4f096..f12cf57 100644 --- a/sources/WinBiometricDotNet/ErrorEvent.cs +++ b/sources/WinBiometricDotNet/ErrorEvent.cs @@ -1,7 +1,7 @@ namespace WinBiometricDotNet { - public sealed class ErrorEvent + public sealed class ErrorEvent : EventParameter { #region Constructors diff --git a/sources/WinBiometricDotNet/EventParameter.cs b/sources/WinBiometricDotNet/EventParameter.cs new file mode 100644 index 0000000..7a91982 --- /dev/null +++ b/sources/WinBiometricDotNet/EventParameter.cs @@ -0,0 +1,8 @@ +namespace WinBiometricDotNet +{ + + public abstract class EventParameter + { + } + +} \ No newline at end of file diff --git a/sources/WinBiometricDotNet/EventTypes.cs b/sources/WinBiometricDotNet/EventTypes.cs index bd0bb95..ede65a4 100644 --- a/sources/WinBiometricDotNet/EventTypes.cs +++ b/sources/WinBiometricDotNet/EventTypes.cs @@ -1,8 +1,10 @@ -using WinBiometricDotNet.Interop; +using System; +using WinBiometricDotNet.Interop; namespace WinBiometricDotNet { + [Flags] public enum EventTypes : uint { diff --git a/sources/WinBiometricDotNet/FingerPosition.cs b/sources/WinBiometricDotNet/FingerPosition.cs index fe38170..bb11ea6 100644 --- a/sources/WinBiometricDotNet/FingerPosition.cs +++ b/sources/WinBiometricDotNet/FingerPosition.cs @@ -1,56 +1,59 @@ -namespace WinBiometricDotNet +using WinBiometricDotNet.Interop; +using WINBIO_BIOMETRIC_SUBTYPE = System.Byte; + +namespace WinBiometricDotNet { - public enum FingerPosition + public enum FingerPosition : WINBIO_BIOMETRIC_SUBTYPE { - Unknown = 0, + Unknown = SafeNativeMethods.WINBIO_ANSI_381_POS_UNKNOWN, - RightThumb = 1, + RightThumb = SafeNativeMethods.WINBIO_ANSI_381_POS_RH_THUMB, - RightIndex = 2, + RightIndex = SafeNativeMethods.WINBIO_ANSI_381_POS_RH_INDEX_FINGER, - RightMiddle = 3, + RightMiddle = SafeNativeMethods.WINBIO_ANSI_381_POS_RH_MIDDLE_FINGER, - RightRing = 4, + RightRing = SafeNativeMethods.WINBIO_ANSI_381_POS_RH_RING_FINGER, - RightLittle = 5, + RightLittle = SafeNativeMethods.WINBIO_ANSI_381_POS_RH_LITTLE_FINGER, - LeftThumb = 6, + LeftThumb = SafeNativeMethods.WINBIO_ANSI_381_POS_LH_THUMB, - LeftIndex = 7, + LeftIndex = SafeNativeMethods.WINBIO_ANSI_381_POS_LH_INDEX_FINGER, - LeftMiddle = 8, + LeftMiddle = SafeNativeMethods.WINBIO_ANSI_381_POS_LH_MIDDLE_FINGER, - LeftRing = 9, + LeftRing = SafeNativeMethods.WINBIO_ANSI_381_POS_LH_RING_FINGER, - LeftLittle = 10, + LeftLittle = SafeNativeMethods.WINBIO_ANSI_381_POS_LH_LITTLE_FINGER, - RightSlap = 13, + RightSlap = SafeNativeMethods.WINBIO_ANSI_381_POS_RH_FOUR_FINGERS, - LeftSlap = 14, + LeftSlap = SafeNativeMethods.WINBIO_ANSI_381_POS_LH_FOUR_FINGERS, - TwoThumbs = 15, + TwoThumbs = SafeNativeMethods.WINBIO_ANSI_381_POS_TWO_THUMBS, - UnspecifiedPosition01 = 0xF5, + UnspecifiedPosition01 = SafeNativeMethods.WINBIO_FINGER_UNSPECIFIED_POS_01, - UnspecifiedPosition02 = 0xF6, + UnspecifiedPosition02 = SafeNativeMethods.WINBIO_FINGER_UNSPECIFIED_POS_02, - UnspecifiedPosition03 = 0xF7, + UnspecifiedPosition03 = SafeNativeMethods.WINBIO_FINGER_UNSPECIFIED_POS_03, - UnspecifiedPosition04 = 0xF8, + UnspecifiedPosition04 = SafeNativeMethods.WINBIO_FINGER_UNSPECIFIED_POS_04, - UnspecifiedPosition05 = 0xF9, + UnspecifiedPosition05 = SafeNativeMethods.WINBIO_FINGER_UNSPECIFIED_POS_05, - UnspecifiedPosition06 = 0xFA, + UnspecifiedPosition06 = SafeNativeMethods.WINBIO_FINGER_UNSPECIFIED_POS_06, - UnspecifiedPosition07 = 0xFB, + UnspecifiedPosition07 = SafeNativeMethods.WINBIO_FINGER_UNSPECIFIED_POS_07, - UnspecifiedPosition08 = 0xFC, + UnspecifiedPosition08 = SafeNativeMethods.WINBIO_FINGER_UNSPECIFIED_POS_08, - UnspecifiedPosition09 = 0xFD, + UnspecifiedPosition09 = SafeNativeMethods.WINBIO_FINGER_UNSPECIFIED_POS_09, - UnspecifiedPosition10 = 0xFE + UnspecifiedPosition10 = SafeNativeMethods.WINBIO_FINGER_UNSPECIFIED_POS_10 } diff --git a/sources/WinBiometricDotNet/IdentifyResult.cs b/sources/WinBiometricDotNet/IdentifyResult.cs index b07ddbf..0659b18 100644 --- a/sources/WinBiometricDotNet/IdentifyResult.cs +++ b/sources/WinBiometricDotNet/IdentifyResult.cs @@ -6,7 +6,7 @@ public sealed class IdentifyResult #region Constructors - internal IdentifyResult(uint unitId, OperationStatus operationStatus, BiometricIdentity identity, FingerPosition fingerPosition, RejectDetails rejectDetail) + internal IdentifyResult(uint unitId, OperationStatus operationStatus, BiometricIdentity identity, FingerPosition fingerPosition, RejectDetail rejectDetail) { this.UnitId = unitId; this.OperationStatus = operationStatus; @@ -29,7 +29,7 @@ public BiometricIdentity Identity get; } - public RejectDetails RejectDetail + public RejectDetail RejectDetail { get; } diff --git a/sources/WinBiometricDotNet/IdentityType.cs b/sources/WinBiometricDotNet/IdentityType.cs new file mode 100644 index 0000000..9f4622e --- /dev/null +++ b/sources/WinBiometricDotNet/IdentityType.cs @@ -0,0 +1,20 @@ +using WinBiometricDotNet.Interop; +using WINBIO_IDENTITY_TYPE = System.UInt32; + +namespace WinBiometricDotNet +{ + + public enum IdentityType : WINBIO_IDENTITY_TYPE + { + + Null = SafeNativeMethods.WINBIO_ID_TYPE_NULL, + + WildCard = SafeNativeMethods.WINBIO_ID_TYPE_WILDCARD, + + Guid = SafeNativeMethods.WINBIO_ID_TYPE_GUID, + + Sid = SafeNativeMethods.WINBIO_ID_TYPE_SID + + } + +} \ No newline at end of file diff --git a/sources/WinBiometricDotNet/IdentityTypes.cs b/sources/WinBiometricDotNet/IdentityTypes.cs deleted file mode 100644 index b62d8d2..0000000 --- a/sources/WinBiometricDotNet/IdentityTypes.cs +++ /dev/null @@ -1,17 +0,0 @@ -namespace WinBiometricDotNet -{ - - public enum IdentityTypes - { - - Null = 0, - - WildCard, - - Guid, - - Sid - - } - -} \ No newline at end of file diff --git a/sources/WinBiometricDotNet/Interop/SafeNativeMethods.cs b/sources/WinBiometricDotNet/Interop/SafeNativeMethods.cs index 7cb5181..a4a17e1 100644 --- a/sources/WinBiometricDotNet/Interop/SafeNativeMethods.cs +++ b/sources/WinBiometricDotNet/Interop/SafeNativeMethods.cs @@ -1688,6 +1688,26 @@ internal static class SafeNativeMethods /// public const WINBIO_CAPABILITIES WINBIO_CAPABILITY_INDICATOR = (0x00000040); + /// + /// The sensor adapter manages its own connection to the biometric hardware. + /// + public const WINBIO_CAPABILITIES WINBIO_CAPABILITY_VIRTUAL_SENSOR = ((WINBIO_CAPABILITIES)0x00000080); + + /// + /// The device supports security methods available in the WinBio engine adapter interface version 4.0 or later. + /// + public const WINBIO_CAPABILITIES WINBIO_CAPABILITY_SECURE_SENSOR = ((WINBIO_CAPABILITIES)0x00000100); + + /// + /// Secure Connection Protocol (SCP) V1 + /// + public const WINBIO_CAPABILITIES WINBIO_CAPABILITY_SCP_V1 = ((WINBIO_CAPABILITIES)0x00000200); + + /// + /// Modern standby support + /// + public const WINBIO_CAPABILITIES WINBIO_CAPABILITY_WAKE = ((WINBIO_CAPABILITIES)0x00000400); + #endregion #region WINBIO_COMPONENT Constants @@ -2111,20 +2131,25 @@ public unsafe static Guid* WINBIO_DB_ONCHIP #region WINBIO_PROPERTY_TYPE Constants /// - /// A biometric session. + /// The property applies to a specific biometric session. /// public const WINBIO_PROPERTY_TYPE WINBIO_PROPERTY_TYPE_SESSION = 1; /// - /// A biometric unit. + /// The property applies to a specific biometric unit. /// public const WINBIO_PROPERTY_TYPE WINBIO_PROPERTY_TYPE_UNIT = 2; /// - /// A biometric template. + /// The property applies to a specific biometric template. /// public const WINBIO_PROPERTY_TYPE WINBIO_PROPERTY_TYPE_TEMPLATE = 3; + /// + /// The property applies to a specific user account that has a biometric enrollment. + /// + public const WINBIO_PROPERTY_TYPE WINBIO_PROPERTY_TYPE_ACCOUNT = 4; + #endregion #region WINBIO_REJECT_DETAIL Constants @@ -6406,9 +6431,34 @@ public struct WINBIO_ASYNC_RESULT_SETPROPERTY { /// - /// Reserved. + /// Source of the property information. Currently this will be . + /// + public WINBIO_PROPERTY_TYPE PropertyType; + + /// + /// The property that was queried. Currently this will be . /// - public ULONG None; + public WINBIO_PROPERTY_ID PropertyId; + + /// + /// This is a reserved value and will be NULL. + /// + public WINBIO_IDENTITY Identity; + + /// + /// This is reserved and will be WINBIO_SUBTYPE_NO_INFORMATION. + /// + public WINBIO_BIOMETRIC_SUBTYPE SubFactor; + + /// + /// Size, in bytes, of the property value pointed to by the member. + /// + public SIZE_T PropertyBufferSize; + + /// + /// Pointer to the property value. + /// + public PVOID PropertyBuffer; } diff --git a/sources/WinBiometricDotNet/OperationTypes.cs b/sources/WinBiometricDotNet/OperationType.cs similarity index 95% rename from sources/WinBiometricDotNet/OperationTypes.cs rename to sources/WinBiometricDotNet/OperationType.cs index 1efe4b1..0fafbec 100644 --- a/sources/WinBiometricDotNet/OperationTypes.cs +++ b/sources/WinBiometricDotNet/OperationType.cs @@ -3,7 +3,7 @@ namespace WinBiometricDotNet { - public enum OperationTypes : uint + public enum OperationType : uint { None = SafeNativeMethods.WINBIO_OPERATION_NONE, diff --git a/sources/WinBiometricDotNet/PropertyType.cs b/sources/WinBiometricDotNet/PropertyType.cs new file mode 100644 index 0000000..c862f59 --- /dev/null +++ b/sources/WinBiometricDotNet/PropertyType.cs @@ -0,0 +1,20 @@ +using WinBiometricDotNet.Interop; +using WINBIO_PROPERTY_TYPE = System.UInt32; + +namespace WinBiometricDotNet +{ + + public enum PropertyType : WINBIO_PROPERTY_TYPE + { + + Session = SafeNativeMethods.WINBIO_PROPERTY_TYPE_SESSION, + + Unit = SafeNativeMethods.WINBIO_PROPERTY_TYPE_UNIT, + + Template = SafeNativeMethods.WINBIO_PROPERTY_TYPE_TEMPLATE, + + Account = SafeNativeMethods.WINBIO_PROPERTY_TYPE_ACCOUNT, + + } + +} \ No newline at end of file diff --git a/sources/WinBiometricDotNet/PropertyTypes.cs b/sources/WinBiometricDotNet/PropertyTypes.cs deleted file mode 100644 index 58956b0..0000000 --- a/sources/WinBiometricDotNet/PropertyTypes.cs +++ /dev/null @@ -1,17 +0,0 @@ -namespace WinBiometricDotNet -{ - - public enum PropertyTypes - { - - Session = 1, - - Unit = 2, - - Template = 3, - - Account = 4, - - } - -} \ No newline at end of file diff --git a/sources/WinBiometricDotNet/RejectDetail.cs b/sources/WinBiometricDotNet/RejectDetail.cs new file mode 100644 index 0000000..4b0e21e --- /dev/null +++ b/sources/WinBiometricDotNet/RejectDetail.cs @@ -0,0 +1,32 @@ +using WinBiometricDotNet.Interop; +using WINBIO_REJECT_DETAIL = System.UInt32; + +namespace WinBiometricDotNet +{ + + public enum RejectDetail : WINBIO_REJECT_DETAIL + { + + TooHigh = SafeNativeMethods.WINBIO_FP_TOO_HIGH, + + TooLow = SafeNativeMethods.WINBIO_FP_TOO_LOW, + + TooLeft = SafeNativeMethods.WINBIO_FP_TOO_LEFT, + + TooRight = SafeNativeMethods.WINBIO_FP_TOO_RIGHT, + + TooFast = SafeNativeMethods.WINBIO_FP_TOO_FAST, + + TooSlow = SafeNativeMethods.WINBIO_FP_TOO_SLOW, + + PoorQuality = SafeNativeMethods.WINBIO_FP_POOR_QUALITY, + + TooSkewed = SafeNativeMethods.WINBIO_FP_TOO_SKEWED, + + TooShort = SafeNativeMethods.WINBIO_FP_TOO_SHORT, + + MergeFailure = SafeNativeMethods.WINBIO_FP_MERGE_FAILURE + + } + +} \ No newline at end of file diff --git a/sources/WinBiometricDotNet/RejectDetails.cs b/sources/WinBiometricDotNet/RejectDetails.cs deleted file mode 100644 index 3c2911b..0000000 --- a/sources/WinBiometricDotNet/RejectDetails.cs +++ /dev/null @@ -1,29 +0,0 @@ -namespace WinBiometricDotNet -{ - - public enum RejectDetails - { - - TooHigh = 1, - - TooLow = 2, - - TooLeft = 3, - - TooRight = 4, - - TooFast = 5, - - TooSlow = 6, - - PoorQuality = 7, - - TooSkewed = 8, - - TooShort = 9, - - MergeFailure = 10 - - } - -} \ No newline at end of file diff --git a/sources/WinBiometricDotNet/SensorStatus.cs b/sources/WinBiometricDotNet/SensorStatus.cs index c2f2439..f4319e3 100644 --- a/sources/WinBiometricDotNet/SensorStatus.cs +++ b/sources/WinBiometricDotNet/SensorStatus.cs @@ -1,10 +1,11 @@ using System; using WinBiometricDotNet.Interop; +using WINBIO_SENSOR_STATUS = System.UInt32; namespace WinBiometricDotNet { - public enum SensorStatus : UInt32 + public enum SensorStatus : WINBIO_SENSOR_STATUS { StatusUnknown = SafeNativeMethods.WINBIO_SENSOR_STATUS_UNKNOWN, diff --git a/sources/WinBiometricDotNet/Session.cs b/sources/WinBiometricDotNet/Session.cs index ab9cdde..73924e8 100644 --- a/sources/WinBiometricDotNet/Session.cs +++ b/sources/WinBiometricDotNet/Session.cs @@ -8,9 +8,10 @@ public sealed class Session #region Constructors - internal Session(WINBIO_SESSION_HANDLE handle) + internal Session(WINBIO_SESSION_HANDLE handle, bool asynchronous) { this.Handle = handle; + this.IsAsynchronous = asynchronous; } #endregion @@ -22,6 +23,11 @@ public WINBIO_SESSION_HANDLE Handle get; } + public bool IsAsynchronous + { + get; + } + #endregion } diff --git a/sources/WinBiometricDotNet/SettingSourceType.cs b/sources/WinBiometricDotNet/SettingSourceType.cs new file mode 100644 index 0000000..989493c --- /dev/null +++ b/sources/WinBiometricDotNet/SettingSourceType.cs @@ -0,0 +1,20 @@ +using WinBiometricDotNet.Interop; +using WINBIO_SETTING_SOURCE_TYPE = System.UInt32; + +namespace WinBiometricDotNet +{ + + public enum SettingSourceType : WINBIO_SETTING_SOURCE_TYPE + { + + Invalid = SafeNativeMethods.WINBIO_SETTING_SOURCE_INVALID, + + Default = SafeNativeMethods.WINBIO_SETTING_SOURCE_DEFAULT, + + Policy = SafeNativeMethods.WINBIO_SETTING_SOURCE_POLICY, + + Local = SafeNativeMethods.WINBIO_SETTING_SOURCE_LOCAL + + } + +} \ No newline at end of file diff --git a/sources/WinBiometricDotNet/SettingSourceTypes.cs b/sources/WinBiometricDotNet/SettingSourceTypes.cs deleted file mode 100644 index 9591193..0000000 --- a/sources/WinBiometricDotNet/SettingSourceTypes.cs +++ /dev/null @@ -1,17 +0,0 @@ -namespace WinBiometricDotNet -{ - - public enum SettingSourceTypes - { - - Invalid = 0, - - Default = 1, - - Policy = 2, - - Local = 3 - - } - -} \ No newline at end of file diff --git a/sources/WinBiometricDotNet/UnclaimedEvent.cs b/sources/WinBiometricDotNet/UnclaimedEvent.cs index f7675a2..7cc10ff 100644 --- a/sources/WinBiometricDotNet/UnclaimedEvent.cs +++ b/sources/WinBiometricDotNet/UnclaimedEvent.cs @@ -1,12 +1,12 @@ namespace WinBiometricDotNet { - public sealed class UnclaimedEvent + public sealed class UnclaimedEvent : EventParameter { #region Constructors - internal UnclaimedEvent(uint unidId, RejectDetails rejectDetail) + internal UnclaimedEvent(uint unidId, RejectDetail rejectDetail) { this.UnidId = unidId; this.RejectDetail = rejectDetail; @@ -17,7 +17,7 @@ internal UnclaimedEvent(uint unidId, RejectDetails rejectDetail) #region Properties - public RejectDetails RejectDetail + public RejectDetail RejectDetail { get; } diff --git a/sources/WinBiometricDotNet/UnclaimedIdentifyEvent.cs b/sources/WinBiometricDotNet/UnclaimedIdentifyEvent.cs index edd7ef4..e03d8ad 100644 --- a/sources/WinBiometricDotNet/UnclaimedIdentifyEvent.cs +++ b/sources/WinBiometricDotNet/UnclaimedIdentifyEvent.cs @@ -1,18 +1,17 @@ namespace WinBiometricDotNet { - public sealed class UnclaimedIdentifyEvent + public sealed class UnclaimedIdentifyEvent : EventParameter { #region Constructors - internal UnclaimedIdentifyEvent(uint unidId, FingerPosition fingerPosition, BiometricIdentity identity, RejectDetails rejectDetail) + internal UnclaimedIdentifyEvent(uint unidId, FingerPosition fingerPosition, BiometricIdentity identity, RejectDetail rejectDetail) { this.UnidId = unidId; this.FingerPosition = fingerPosition; this.Identity = identity; this.RejectDetail = rejectDetail; - } #endregion @@ -29,7 +28,7 @@ public BiometricIdentity Identity get; } - public RejectDetails RejectDetail + public RejectDetail RejectDetail { get; } diff --git a/sources/WinBiometricDotNet/VerifyResult.cs b/sources/WinBiometricDotNet/VerifyResult.cs index 4d00f21..fde0eb5 100644 --- a/sources/WinBiometricDotNet/VerifyResult.cs +++ b/sources/WinBiometricDotNet/VerifyResult.cs @@ -6,7 +6,7 @@ public sealed class VerifyResult #region Constructors - internal VerifyResult(bool match, uint unitId, OperationStatus operationStatus, RejectDetails rejectDetail) + internal VerifyResult(bool match, uint unitId, OperationStatus operationStatus, RejectDetail rejectDetail) { this.IsMatch = match; this.UnitId = unitId; @@ -28,7 +28,7 @@ public OperationStatus OperationStatus get; } - public RejectDetails RejectDetail + public RejectDetail RejectDetail { get; } diff --git a/sources/WinBiometricDotNet/WinBiometric.cs b/sources/WinBiometricDotNet/WinBiometric.cs index cc00045..33c087d 100644 --- a/sources/WinBiometricDotNet/WinBiometric.cs +++ b/sources/WinBiometricDotNet/WinBiometric.cs @@ -252,7 +252,7 @@ public static CaptureEnrollResult CaptureEnroll(Session session) break; } - return new CaptureEnrollResult(status, (RejectDetails)rejectDetail, status == OperationStatus.MoreData); + return new CaptureEnrollResult(status, (RejectDetail)rejectDetail, status == OperationStatus.MoreData); } public static void CaptureEnrollWithCallback(Session session) @@ -331,13 +331,16 @@ public static BiometricIdentity CommitEnroll(Session session) if (session == null) throw new ArgumentNullException(nameof(session)); - var hr = SafeNativeMethods.WinBioEnrollCommit(session.Handle, - out var identity, - out _); + unsafe + { + var hr = SafeNativeMethods.WinBioEnrollCommit(session.Handle, + out var identity, + out _); - ThrowWinBiometricException(hr); + ThrowWinBiometricException(hr); - return new BiometricIdentity(identity); + return new BiometricIdentity(&identity); + } } public static void ControlUnit(Session session, @@ -585,7 +588,7 @@ public static IEnumerable EnumServiceProviders(Biometr yield return new BiometricServiceProvider(schema); } - public static CredentialStates GetCredentialState(BiometricIdentity identity, CredentialTypes credentialType) + public static CredentialState GetCredentialState(BiometricIdentity identity, CredentialTypes credentialType) { if (identity == null) throw new ArgumentNullException(nameof(identity)); @@ -596,25 +599,25 @@ public static CredentialStates GetCredentialState(BiometricIdentity identity, Cr ThrowWinBiometricException(hr); - return (CredentialStates)state; + return (CredentialState)state; } - public static void GetDomainLogonSetting(out bool value, out SettingSourceTypes source) + public static void GetDomainLogonSetting(out bool value, out SettingSourceType source) { var hr = SafeNativeMethods.WinBioGetDomainLogonSetting(out value, out var tmp); ThrowWinBiometricException(hr); - source = (SettingSourceTypes)tmp; + source = (SettingSourceType)tmp; } - public static void GetEnabledSetting(out bool value, out SettingSourceTypes source) + public static void GetEnabledSetting(out bool value, out SettingSourceType source) { var hr = SafeNativeMethods.WinBioGetEnabledSetting(out value, out var tmp); ThrowWinBiometricException(hr); - source = (SettingSourceTypes)tmp; + source = (SettingSourceType)tmp; } public static BiometricTypes GetEnrolledFactors(BiometricIdentity accountOwner) @@ -635,17 +638,17 @@ public static BiometricTypes GetEnrolledFactors(BiometricIdentity accountOwner) } } - public static void GetLogonSetting(out bool value, out SettingSourceTypes source) + public static void GetLogonSetting(out bool value, out SettingSourceType source) { var hr = SafeNativeMethods.WinBioGetLogonSetting(out value, out var tmp); ThrowWinBiometricException(hr); - source = (SettingSourceTypes)tmp; + source = (SettingSourceType)tmp; } public static AntiSpoofPolicy GetAntiSpoofPolicyProperty(Session session, - PropertyTypes propertyType, + PropertyType propertyType, BiometricIdentity identity) { if (session == null) @@ -683,7 +686,7 @@ public static AntiSpoofPolicy GetAntiSpoofPolicyProperty(Session session, } public static ULONG GetSampleHintProperty(Session session, - PropertyTypes propertyType, + PropertyType propertyType, uint unitId) { if (session == null) @@ -716,7 +719,7 @@ public static ULONG GetSampleHintProperty(Session session, } public static void GetProperty(Session session, - PropertyTypes propertyType, + PropertyType propertyType, PropertyId propertyId, uint unitId, BiometricIdentity identity, @@ -787,19 +790,22 @@ public static IdentifyResult Identify(Session session) if (session == null) throw new ArgumentNullException(nameof(session)); - var hr = SafeNativeMethods.WinBioIdentify(session.Handle, - out var unitId, - out var identity, - out var subFactor, - out var rejectDetail); + unsafe + { + var hr = SafeNativeMethods.WinBioIdentify(session.Handle, + out var unitId, + out var identity, + out var subFactor, + out var rejectDetail); - ThrowWinBiometricException(hr); + ThrowWinBiometricException(hr); - return new IdentifyResult(unitId, - OperationStatus.OK, - new BiometricIdentity(identity), - (FingerPosition)subFactor, - (RejectDetails)rejectDetail); + return new IdentifyResult(unitId, + OperationStatus.OK, + new BiometricIdentity(&identity), + (FingerPosition)subFactor, + (RejectDetail)rejectDetail); + } } public static void IdentifyWithCallback(Session session) @@ -924,7 +930,7 @@ out var sessionHandle ThrowWinBiometricException(hr); - return new Session(sessionHandle); + return new Session(sessionHandle, false); } } @@ -949,7 +955,7 @@ public static Session OpenSession(PVOID userData) ThrowWinBiometricException(hr); - return new Session(sessionHandle); + return new Session(sessionHandle, true); } } @@ -974,7 +980,7 @@ public static Session OpenSession(IntPtr targetWindow, UINT messageCode) ThrowWinBiometricException(hr); - return new Session(sessionHandle); + return new Session(sessionHandle, true); } } @@ -1077,7 +1083,7 @@ public static void SelectEnroll(Session session, ULONGLONG selectorValue) } public static void SetAntiSpoofPolicyProperty(Session session, - PropertyTypes propertyType, + PropertyType propertyType, BiometricIdentity identity, AntiSpoofPolicy antiSpoofPolicy) { @@ -1196,7 +1202,7 @@ public static VerifyResult Verify(Session session, BiometricUnit unit, FingerPos break; } - return new VerifyResult(match, unitId, status, (RejectDetails)rejectDetail); + return new VerifyResult(match, unitId, status, (RejectDetail)rejectDetail); } public static void VerifyWithCallback(Session session, BiometricUnit unit, FingerPosition position) @@ -1315,7 +1321,7 @@ private static unsafe CaptureSampleResult CreateCaptureSampleResult(WINBIO_UNIT_ IntPtr sampleSize, WINBIO_REJECT_DETAIL rejectDetail) { - var result = new CaptureSampleResult(unitId, status, (RejectDetails)rejectDetail, (uint)sampleSize); + var result = new CaptureSampleResult(unitId, status, (RejectDetail)rejectDetail, (uint)sampleSize); if (sample != null) { var tmp = (UIntPtr)((ulong)sample + sample->StandardDataBlock.Offset); @@ -1634,12 +1640,13 @@ private static HRESULT GetCurrentUserIdentity(out SafeNativeMethods.WINBIO_IDENT IntPtr.Zero, tokenInfLength, out tokenInfLength); - if (hr == 0) - { - var win32Status = Marshal.GetLastWin32Error(); - hr = SafeNativeMethods.Macros.HRESULT_FROM_WIN32((uint)win32Status); - return hr; - } + // NOT CHECK RETURN VALUE!! + //if (hr == 0) + //{ + // var win32Status = Marshal.GetLastWin32Error(); + // hr = SafeNativeMethods.Macros.HRESULT_FROM_WIN32((uint)win32Status); + // return hr; + //} var tokenInformation = Marshal.AllocHGlobal((int)tokenInfLength); hr = SafeNativeMethods.GetTokenInformation(tokenHandle, @@ -2174,7 +2181,7 @@ private static void CaptureEnrollCallback(IntPtr enrollCallbackContext, var @event = EnrollCaptured; if (@event != null) { - var result = new CaptureEnrollResult(status, (RejectDetails)rejectDetail, status == OperationStatus.MoreData); + var result = new CaptureEnrollResult(status, (RejectDetail)rejectDetail, status == OperationStatus.MoreData); var args = new EnrollCapturedEventArgs(result); @event.Invoke(null, args); } @@ -2229,7 +2236,7 @@ private static unsafe void EventMonitorCallback(IntPtr eventCallbackContext, case SafeNativeMethods.WINBIO_EVENT_FP_UNCLAIMED: var winbioEventUnclaimed = @event->Parameters.Unclaimed; var unclaimed = new UnclaimedEvent(winbioEventUnclaimed.UnitId, - (RejectDetails)winbioEventUnclaimed.RejectDetail); + (RejectDetail)winbioEventUnclaimed.RejectDetail); args = new EventMonitoredEventArgs(EventTypes.Unclaimed, status, @@ -2241,8 +2248,8 @@ private static unsafe void EventMonitorCallback(IntPtr eventCallbackContext, var winbioEventUnclaimedidentity = @event->Parameters.UnclaimedIdentify; var unclaimedIdentify = new UnclaimedIdentifyEvent(winbioEventUnclaimedidentity.UnitId, (FingerPosition)winbioEventUnclaimedidentity.SubFactor, - new BiometricIdentity(winbioEventUnclaimedidentity.Identity), - (RejectDetails)winbioEventUnclaimedidentity.RejectDetail); + new BiometricIdentity(&winbioEventUnclaimedidentity.Identity), + (RejectDetail)winbioEventUnclaimedidentity.RejectDetail); args = new EventMonitoredEventArgs(EventTypes.UnclaimedIdentify, status, @@ -2287,9 +2294,9 @@ private static unsafe void IdentifyCallback(IntPtr identifyCallbackContext, if (@event != null) { var result = new IdentifyResult(unitId, status, - new BiometricIdentity(*identity), + new BiometricIdentity(identity), (FingerPosition)subFactor, - (RejectDetails)rejectDetail); + (RejectDetail)rejectDetail); var args = new IdentifiedEventArgs(result); @event.Invoke(null, args); @@ -2321,7 +2328,7 @@ private static void VerifyCallback(IntPtr verifyCallbackContext, var @event = Verified; if (@event != null) { - var args = new VerifyEventArgs(new VerifyResult(match, unitId, status, (RejectDetails)rejectDetail)); + var args = new VerifyEventArgs(new VerifyResult(match, unitId, status, (RejectDetail)rejectDetail)); @event.Invoke(null, args); } } diff --git a/sources/WinBiometricDotNet/WinBiometricDotNet.csproj b/sources/WinBiometricDotNet/WinBiometricDotNet.csproj index 153ec2c..f2280fb 100644 --- a/sources/WinBiometricDotNet/WinBiometricDotNet.csproj +++ b/sources/WinBiometricDotNet/WinBiometricDotNet.csproj @@ -5,7 +5,7 @@ Takuya Takeuchi © Takuya Takeuchi 2018 Windows Bitometric Framework .NET wrapper - 0.7.0 + 0.8.0 true https://github.com/takuya-takeuchi/WinBiometricDotNet https://opensource.org/licenses/MIT @@ -21,10 +21,15 @@ true + bin\Release\netstandard2.0\WinBiometricDotNet.xml + + + +