namespace Vanara.PInvoke; /// Items from the WinBio.dll public static partial class WinBio { /// The winbio anti spoof turn side to side public const WINBIO_REJECT_DETAIL WINBIO_ANTI_SPOOF_TURN_SIDE_TO_SIDE = (WINBIO_REJECT_DETAIL)0x01000000; /// Represents a mask for all of the _FLAG_ bits. public const WINBIO_DATABASE WINBIO_DATABASE_FLAG_MASK = (WINBIO_DATABASE)0xFFFF0000; /// Represents a mask for all of the _TYPE_ bits. public const WINBIO_DATABASE WINBIO_DATABASE_TYPE_MASK = (WINBIO_DATABASE)0x0000FFFF; /// /// This mask covers the upper 8 bits of the reject detail value where the proof-of-liveness behaviors are located. This value is /// supported starting in Windows 10. /// public const WINBIO_REJECT_DETAIL WINBIO_REJECT_DETAIL_ANTI_SPOOF_MASK = (WINBIO_REJECT_DETAIL)0xFF000000; /// This mask covers the range of bits devoted to position errors. This value is supported starting in Windows 10. public const WINBIO_REJECT_DETAIL WINBIO_REJECT_DETAIL_POSITION_MASK = (WINBIO_REJECT_DETAIL)0x00FF0000; /// /// This mask covers the lower 16 bits where the enumerated reason for the rejection is located. This value is supported starting in /// Windows 10. /// public const WINBIO_REJECT_DETAIL WINBIO_REJECT_DETAIL_REASON_MASK = (WINBIO_REJECT_DETAIL)0x0000FFFF; /// Bitmask that specifies the supported set of biometric factors. public const WINBIO_BIOMETRIC_TYPE WINBIO_STANDARD_TYPE_MASK = (WINBIO_BIOMETRIC_TYPE)0x00FFFFFF; /// The following constants are reserved for future use. [PInvokeData("winbio_types.h")] [Flags] public enum BIO_UNIT : ushort { /// Reserved for future use. BIO_UNIT_RAW = 0x0001, /// Reserved for future use. BIO_UNIT_MAINTENANCE = 0x0002, /// Reserved for future use. BIO_UNIT_OPEN_SESSION = 0x0004, /// Reserved for future use. BIO_UNIT_EXTENDED_ACCESS = 0x0008, /// Reserved for future use. BIO_UNIT_ENROLL = 0x0010, /// Reserved for future use. BIO_UNIT_DELETE_TEMPLATE = 0x0020, /// Reserved for future use. BIO_UNIT_CONTROL_UNIT = 0x0040, } /// The following values can be used in the WINBIO_REGISTERED_FORMAT structure. [PInvokeData("winbio_types.h")] public enum WINBIO_ANSI_381_FORMAT : ushort { /// InterNational Committee for Information Technology Standards (INCITS) technical committee M1 (biometrics). WINBIO_ANSI_381_FORMAT_OWNER = 0x001B, /// ANSI INCITS 381 finger image based data interchange format. WINBIO_ANSI_381_FORMAT_TYPE = 0x0401, } /// The following constants can be used to specify the type of image compression used by a sensor: [PInvokeData("winbio_types.h")] public enum WINBIO_ANSI_381_IMG : byte { /// WINBIO_ANSI_381_IMG_UNCOMPRESSED = 0, /// WINBIO_ANSI_381_IMG_BIT_PACKED = 1, /// WINBIO_ANSI_381_IMG_COMPRESSED_WSQ = 2, /// WINBIO_ANSI_381_IMG_COMPRESSED_JPEG = 3, /// WINBIO_ANSI_381_IMG_COMPRESSED_JPEG2000 = 4, /// WINBIO_ANSI_381_IMG_COMPRESSED_PNG = 5, } /// The following constants can be used to specify image acquisition levels: [PInvokeData("winbio_types.h")] public enum WINBIO_ANSI_381_IMG_ACQ : byte { /// WINBIO_ANSI_381_IMG_ACQ_LEVEL_10 = 10, /// WINBIO_ANSI_381_IMG_ACQ_LEVEL_20 = 20, /// WINBIO_ANSI_381_IMG_ACQ_LEVEL_30 = 30, /// WINBIO_ANSI_381_IMG_ACQ_LEVEL_31 = 31, /// WINBIO_ANSI_381_IMG_ACQ_LEVEL_40 = 40, /// WINBIO_ANSI_381_IMG_ACQ_LEVEL_41 = 41, } /// The following constants can be used to specify finger and palm impression types: [PInvokeData("winbio_types.h")] public enum WINBIO_ANSI_381_IMP_TYPE : byte { /// WINBIO_ANSI_381_IMP_TYPE_LIVE_SCAN_PLAIN = 0, /// WINBIO_ANSI_381_IMP_TYPE_LIVE_SCAN_ROLLED = 1, /// WINBIO_ANSI_381_IMP_TYPE_NONLIVE_SCAN_PLAIN = 2, /// WINBIO_ANSI_381_IMP_TYPE_NONLIVE_SCAN_ROLLED = 3, /// WINBIO_ANSI_381_IMP_TYPE_LATENT = 7, /// WINBIO_ANSI_381_IMP_TYPE_SWIPE = 8, /// WINBIO_ANSI_381_IMP_TYPE_LIVE_SCAN_CONTACTLESS = 9, } /// The following constants can be used to specify scale units: [PInvokeData("winbio_types.h")] public enum WINBIO_ANSI_381_PIXELS : byte { /// WINBIO_ANSI_381_PIXELS_PER_INCH = 0x01, /// WINBIO_ANSI_381_PIXELS_PER_CM = 0x02, } /// The following constants can be used to specify the fingers scanned by a sensor: [PInvokeData("winbio_types.h")] public enum WINBIO_ANSI_381_POS_FINGER : byte { /// WINBIO_ANSI_381_POS_UNKNOWN = 0, /// WINBIO_ANSI_381_POS_RH_THUMB = 1, /// WINBIO_ANSI_381_POS_RH_INDEX_FINGER = 2, /// WINBIO_ANSI_381_POS_RH_MIDDLE_FINGER = 3, /// WINBIO_ANSI_381_POS_RH_RING_FINGER = 4, /// WINBIO_ANSI_381_POS_RH_LITTLE_FINGER = 5, /// WINBIO_ANSI_381_POS_LH_THUMB = 6, /// WINBIO_ANSI_381_POS_LH_INDEX_FINGER = 7, /// WINBIO_ANSI_381_POS_LH_MIDDLE_FINGER = 8, /// WINBIO_ANSI_381_POS_LH_RING_FINGER = 9, /// WINBIO_ANSI_381_POS_LH_LITTLE_FINGER = 10, /// WINBIO_ANSI_381_POS_RH_FOUR_FINGERS = 13, /// WINBIO_ANSI_381_POS_LH_FOUR_FINGERS = 14, /// WINBIO_ANSI_381_POS_TWO_THUMBS = 15, /// WINBIO_FINGER_UNSPECIFIED_POS_01 = 0xF5, /// WINBIO_FINGER_UNSPECIFIED_POS_02 = 0xF6, /// WINBIO_FINGER_UNSPECIFIED_POS_03 = 0xF7, /// WINBIO_FINGER_UNSPECIFIED_POS_04 = 0xF8, /// WINBIO_FINGER_UNSPECIFIED_POS_05 = 0xF9, /// WINBIO_FINGER_UNSPECIFIED_POS_06 = 0xFA, /// WINBIO_FINGER_UNSPECIFIED_POS_07 = 0xFB, /// WINBIO_FINGER_UNSPECIFIED_POS_08 = 0xFC, /// WINBIO_FINGER_UNSPECIFIED_POS_09 = 0xFD, /// WINBIO_FINGER_UNSPECIFIED_POS_10 = 0xFE, } /// The following constants can be used to specify the palm and palm areas scanned by a sensor: [PInvokeData("winbio_types.h")] public enum WINBIO_ANSI_381_POS_PALM : byte { /// WINBIO_ANSI_381_POS_UNKNOWN_PALM = 20, /// WINBIO_ANSI_381_POS_RH_FULL_PALM = 21, /// WINBIO_ANSI_381_POS_RH_WRITERS_PALM = 22, /// WINBIO_ANSI_381_POS_LH_FULL_PALM = 23, /// WINBIO_ANSI_381_POS_LH_WRITERS_PALM = 24, /// WINBIO_ANSI_381_POS_RH_LOWER_PALM = 25, /// WINBIO_ANSI_381_POS_RH_UPPER_PALM = 26, /// WINBIO_ANSI_381_POS_LH_LOWER_PALM = 27, /// WINBIO_ANSI_381_POS_LH_UPPER_PALM = 28, /// WINBIO_ANSI_381_POS_RH_OTHER = 29, /// WINBIO_ANSI_381_POS_LH_OTHER = 30, /// WINBIO_ANSI_381_POS_RH_INTERDIGITAL = 31, /// WINBIO_ANSI_381_POS_RH_THENAR = 32, /// WINBIO_ANSI_381_POS_RH_HYPOTHENAR = 33, /// WINBIO_ANSI_381_POS_LH_INTERDIGITAL = 34, /// WINBIO_ANSI_381_POS_LH_THENAR = 35, /// WINBIO_ANSI_381_POS_LH_HYPOTHENAR = 36, } /// /// The following constants are WINBIO_BIOMETRIC_SUBTYPE values that can be used to specify the two types of frontal face images as /// defined by ANSI INCITS 385-2004: "Face Recognition Format for Data Interchange": full resolution and low resolution. In /// practice, the biometric framework will use only full resolution images for facial recognition. /// [PInvokeData("winbio_types.h")] public enum WINBIO_ANSI_385_FACE : byte { /// The frontal face image type is unknown. WINBIO_ANSI_385_FACE_TYPE_UNKNOWN = 0, /// The frontal face image type is full resolution. WINBIO_ANSI_385_FACE_FRONTAL_FULL = 1, /// The frontal face image type is low resolution. WINBIO_ANSI_385_FACE_FRONTAL_TOKEN = 2, } /// Specifies the types of actions you take for the antispoofing policy of a user. // https://docs.microsoft.com/en-us/windows/win32/secbiomet/winbio-anti-spoof-policy-action typedef enum // _WINBIO_ANTI_SPOOF_POLICY_ACTION { WINBIO_ANTI_SPOOF_DISABLE = 0x00000000, WINBIO_ANTI_SPOOF_ENABLE = 0x00000001, // WINBIO_ANTI_SPOOF_REMOVE = 0x00000002 } WINBIO_ANTI_SPOOF_POLICY_ACTION, *PWINBIO_ANTI_SPOOF_POLICY; [PInvokeData("winbio_types.h")] public enum WINBIO_ANTI_SPOOF_POLICY_ACTION { /// Turns off the detection of spoofing for a biometric factor. WINBIO_ANTI_SPOOF_DISABLE, /// Turns on the detection of spoofing for a biometric factor. WINBIO_ANTI_SPOOF_ENABLE, /// Removes the entire antispoofing policy for the biometric factor from the account. WINBIO_ANTI_SPOOF_REMOVE, } /// /// The following constants can be used as a bitmask for the Capabilities parameter of the WINBIO_UNIT_SCHEMA structure. These refer /// to the onboard sensor capabilities. /// [PInvokeData("winbio_types.h")] [Flags] public enum WINBIO_BIOMETRIC_SENSOR_SUBTYPE : uint { /// The sensor sub types is not known. WINBIO_SENSOR_SUBTYPE_UNKNOWN = 0x00000000, /// The sensor supports fingerprint swipes. WINBIO_FP_SENSOR_SUBTYPE_SWIPE = 0x00000001, /// The sensor supports finger touches. WINBIO_FP_SENSOR_SUBTYPE_TOUCH = 0x00000002, } /// /// WINBIO_BIOMETRIC_SUBTYPE constants are used throughout the Windows Biometric Framework to provide additional information about a /// biometric measurement. The following constants can be used when no subtype is required or when any subtype is required. /// [PInvokeData("winbio_types.h")] public enum WINBIO_BIOMETRIC_SUBTYPE : byte { /// No subtype information. WINBIO_SUBTYPE_NO_INFORMATION = 0x00, /// Any subtype. WINBIO_SUBTYPE_ANY = 0xFF, } /// /// The following constants represent the standard biometric types defined by National Institute of Standards and Technology /// Information (NISTIR) 6529-A, otherwise known as the Common Biometric Exchange Formats Framework (CBEFF) Patron Format A. Only /// WINBIO_TYPE_FINGERPRINT is currently supported. /// [PInvokeData("winbio_types.h")] [Flags] public enum WINBIO_BIOMETRIC_TYPE : uint { /// No biometric type is available. WINBIO_NO_TYPE_AVAILABLE = 0x00000000, /// Multiple types are specified. WINBIO_TYPE_MULTIPLE = 0x00000001, /// Facial features are used to determine the identity of an individual. WINBIO_TYPE_FACIAL_FEATURES = 0x00000002, /// Frequency and volume patterns in the voice of an individual are used to determine the identity of an individual. WINBIO_TYPE_VOICE = 0x00000004, /// Fingerprint patterns are used to determine the identity of an individual. WINBIO_TYPE_FINGERPRINT = 0x00000008, /// /// Iris patterns are used to determine the identity of an individual. This value is supported starting in Windows 10. /// WINBIO_TYPE_IRIS = 0x00000010, /// Vein patterns in the retina are used to determine the identity of an individual. WINBIO_TYPE_RETINA = 0x00000020, /// The shape of a hand of an individual is used to determine the identity of an individual. WINBIO_TYPE_HAND_GEOMETRY = 0x00000040, /// /// The patterns of force that the individual uses when they sign their name are used to determine the identity of an individual. /// WINBIO_TYPE_SIGNATURE_DYNAMICS = 0x00000080, /// The speed and error patterns in typing by an individual are used to determine the identity of an individual. WINBIO_TYPE_KEYSTROKE_DYNAMICS = 0x00000100, /// /// The changes in the lips of an individual that occur when they speak are used to determine the identity of an individual. /// WINBIO_TYPE_LIP_MOVEMENT = 0x00000200, /// The temperature patterns in the face of an individual are used to determine the identity of an individual. WINBIO_TYPE_THERMAL_FACE_IMAGE = 0x00000400, /// The temperature patterns in the hand of an individual are used to determine the identity of an individual. WINBIO_TYPE_THERMAL_HAND_IMAGE = 0x00000800, /// The patterns of movement that occur when the individual walks are used to determine the identity of an individual. WINBIO_TYPE_GAIT = 0x00001000, /// The scent of an individual is used to determine the identity of an individual. WINBIO_TYPE_SCENT = 0x00002000, /// Deoxyribonucleic acid (DNA) sequences are used to determine the identity of an individual. WINBIO_TYPE_DNA = 0x00004000, /// The shape of an ear of the individual is used to determine the identity of an individual. WINBIO_TYPE_EAR_SHAPE = 0x00008000, /// The shapes of the fingers of an individual are used to determine the identity of an individual. WINBIO_TYPE_FINGER_GEOMETRY = 0x00010000, /// The shape of the palm is used to determine the identity of an individual. WINBIO_TYPE_PALM_PRINT = 0x00020000, /// /// Patterns in the veins underneath the skin of the hand of an individual are used to determine the identity of an individual. /// WINBIO_TYPE_VEIN_PATTERN = 0x00040000, /// The shape of the foot is used to determine the identity of an individual. WINBIO_TYPE_FOOT_PRINT = 0x00080000, /// The supported biometric data is not defined by the current constants. WINBIO_TYPE_OTHER = 0x40000000, /// Password data is used to determine the identity of an individual. WINBIO_TYPE_PASSWORD = 0x80000000, /// Any type of data is used to determine the identity of an individual. WINBIO_TYPE_ANY = WINBIO_STANDARD_TYPE_MASK | WINBIO_TYPE_OTHER | WINBIO_TYPE_PASSWORD, } /// The following constants are used by the DataFlags member of the WINBIO_BIR_HEADER structure. [PInvokeData("winbio_types.h")] [Flags] public enum WINBIO_BIR_DATA_FLAGS : byte { /// The data is encrypted. WINBIO_DATA_FLAG_PRIVACY = 0x02, /// The data is digitally signed or is protected by a message authentication code (MAC). WINBIO_DATA_FLAG_INTEGRITY = 0x01, /// /// If this flag and the WINBIO_DATA_FLAG_INTEGRITY flag are set, the data is signed. If this flag is not set but the /// WINBIO_DATA_FLAG_INTEGRITY flag is set, a MAC is computed on the data. /// WINBIO_DATA_FLAG_SIGNED = 0x04, /// The data is in the format with which it was captured. WINBIO_DATA_FLAG_RAW = 0x20, /// The data is not raw but has not been completely processed. WINBIO_DATA_FLAG_INTERMEDIATE = 0x40, /// The data has been processed. WINBIO_DATA_FLAG_PROCESSED = 0x80, /// The flag mask. This value is always one (1). WINBIO_DATA_FLAG_OPTION_MASK_PRESENT = 0x08, } /// /// The following constants are used to create a bitmask for the ValidFields member of the WINBIO_BIR_HEADER structure. /// // https://docs.microsoft.com/en-us/windows/win32/secbiomet/winbio-bir-field-constants [PInvokeData("winbio_types.h")] [Flags] public enum WINBIO_BIR_FIELD : ushort { /// /// Provided for conformity with NISTIR 6529-A, the Common Biometric Exchange Formats Framework (CBEFF) Patron Format A, but not used. /// WINBIO_BIR_FIELD_SUBHEAD_COUNT = 0x0001, /// The ProductId member is valid. WINBIO_BIR_FIELD_PRODUCT_ID = 0x0002, /// Provided for conformity with NISTIR 6529-A, CBEFF Patron Format A, but not used. WINBIO_BIR_FIELD_PATRON_ID = 0x0004, /// Provided for conformity with NISTIR 6529-A, CBEFF Patron Format A, but not used. WINBIO_BIR_FIELD_INDEX = 0x0008, /// The CreationDate member is valid. WINBIO_BIR_FIELD_CREATION_DATE = 0x0010, /// The ValidityPeriod member is valid. WINBIO_BIR_FIELD_VALIDITY_PERIOD = 0x0020, /// The Type member is valid. WINBIO_BIR_FIELD_BIOMETRIC_TYPE = 0x0040, /// The Subtype member is valid. WINBIO_BIR_FIELD_BIOMETRIC_SUBTYPE = 0x0080, /// The HeaderVersion member is valid. WINBIO_BIR_FIELD_CBEFF_HEADER_VERSION = 0x0100, /// The PatronHeaderVersion member is valid. WINBIO_BIR_FIELD_PATRON_HEADER_VERSION = 0x0200, /// The Purpose member is valid. WINBIO_BIR_FIELD_BIOMETRIC_PURPOSE = 0x0400, /// Provided for conformity with NISTIR 6529-A, CBEFF Patron Format A, but not used. WINBIO_BIR_FIELD_BIOMETRIC_CONDITION = 0x0800, /// The DataQuality member is valid. WINBIO_BIR_FIELD_QUALITY = 0x1000, /// Provided for conformity with NISTIR 6529-A, CBEFF Patron Format A, but not used. WINBIO_BIR_FIELD_CREATOR = 0x2000, /// Provided for conformity with NISTIR 6529-A, CBEFF Patron Format A, but not used. WINBIO_BIR_FIELD_CHALLENGE = 0x4000, /// Provided for conformity with NISTIR 6529-A, CBEFF Patron Format A, but not used. WINBIO_BIR_FIELD_PAYLOAD = 0x8000, } /// /// The following flags are used by the Purpose member of the WINBIO_BIR_HEADER structure to specify the purpose for which the /// biometric information record (BIR) is intended or for which it is suitable. /// [PInvokeData("winbio_types.h")] [Flags] public enum WINBIO_BIR_PURPOSE : byte { /// No purpose is specified. WINBIO_NO_PURPOSE_AVAILABLE = 0x00, /// Verify the identity of a user. WINBIO_PURPOSE_VERIFY = 0x01, /// Identify a user. WINBIO_PURPOSE_IDENTIFY = 0x02, /// Enroll a user. WINBIO_PURPOSE_ENROLL = 0x04, /// Capture a biometric sample and determine whether the sample corresponds to the specified user identity. WINBIO_PURPOSE_ENROLL_FOR_VERIFICATION = 0x08, /// Capture a biometric sample and determine whether it matches an existing biometric template. WINBIO_PURPOSE_ENROLL_FOR_IDENTIFICATION = 0x10, /// /// 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. /// WINBIO_PURPOSE_AUDIT = 0x80, } /// /// The following flags are used by the DataQuality member of the WINBIO_BIR_HEADER structure to specify the relative quality of /// biometric data in the BIR if an integer value from 0 to 100 has not been specified. /// [PInvokeData("winbio_types.h")] public enum WINBIO_BIR_QUALITY : sbyte { /// Quality measurements are supported by the BIR creator, but no value is set in the BIR. WINBIO_DATA_QUALITY_NOT_SET = -1, /// Quality measurements are not supported by the BIR creator. WINBIO_DATA_QUALITY_NOT_SUPPORTED = -2, } /// /// The following flags are used by the HeaderVersion and PatronHeaderVersion members of the WINBIO_BIR_HEADER structure to specify /// the version. /// [PInvokeData("winbio_types.h")] public enum WINBIO_BIR_VERSION : byte { /// WINBIO_CBEFF_HEADER_VERSION = 0x11, /// WINBIO_PATRON_HEADER_VERSION = 0x11, } /// /// The following fingerprint sensor sub types are WINBIO_CAPABILITIES values that can be used as a bitmask for the Capabilities /// parameter of the WINBIO_UNIT_SCHEMA structure. These refer to the onboard sensor capabilities. /// [PInvokeData("winbio_types.h")] [Flags] public enum WINBIO_CAPABILITIES : uint { /// The sensor can capture biometric data. WINBIO_CAPABILITY_SENSOR = 0x00000001, /// The sensor can match biometric data to an identity. WINBIO_CAPABILITY_MATCHING = 0x00000002, /// The sensor contains an onboard database. WINBIO_CAPABILITY_DATABASE = 0x00000004, /// The sensor can perform biometric processing. WINBIO_CAPABILITY_PROCESSING = 0x00000008, /// The sensor can encrypt biometric data. WINBIO_CAPABILITY_ENCRYPTION = 0x00000010, /// The sensor can act as a mouse pad. This is currently not supported. WINBIO_CAPABILITY_NAVIGATION = 0x00000020, /// The sensor contains an indicator light. WINBIO_CAPABILITY_INDICATOR = 0x00000040, /// The sensor adapter manages its own connection to the biometric hardware. WINBIO_CAPABILITY_VIRTUAL_SENSOR = 0x00000080, } /// /// The following constants can be used when calling WinBioControlUnit or WinBioControlUnitPrivileged to specify the type of adapter /// being used. /// [PInvokeData("winbio_types.h")] public enum WINBIO_COMPONENT { /// Specifies a sensor adapter. WINBIO_COMPONENT_SENSOR = 1, /// Specifies a engine adapter. WINBIO_COMPONENT_ENGINE = 2, /// Specifies a storage adapter. WINBIO_COMPONENT_STORAGE = 3, } /// /// Defines flags that can be used to specify the end-user credential format. This enumeration is used by the /// WinBioSetCredential function. /// // https://docs.microsoft.com/en-us/windows/win32/secbiomet/winbio-credential-format typedef enum _WINBIO_CREDENTIAL_FORMAT { // WINBIO_PASSWORD_GENERIC = 0x00000001, WINBIO_PASSWORD_PACKED = 0x00000002, WINBIO_PASSWORD_PROTECTED = 0x00000003 } WINBIO_CREDENTIAL_FORMAT; [PInvokeData("winbio_types.h")] public enum WINBIO_CREDENTIAL_FORMAT { /// The password is in a generic format. WINBIO_PASSWORD_GENERIC = 1, /// The password is in a compressed format. WINBIO_PASSWORD_PACKED, /// The password credential was wrapped with CredProtect. WINBIO_PASSWORD_PROTECTED, } /// /// Defines values that specify whether a credential has been associated with the biometric data for an end user. This enumeration /// is used by the WinBioGetCredentialState function. /// // https://docs.microsoft.com/en-us/windows/win32/secbiomet/winbio-credential-state typedef enum _WINBIO_CREDENTIAL_STATE { // WINBIO_CREDENTIAL_NOT_SET = 0x00000001, WINBIO_CREDENTIAL_SET = 0x00000002 } WINBIO_CREDENTIAL_STATE, *PWINBIO_CREDENTIAL_STATE; [PInvokeData("winbio_types.h")] [Flags] public enum WINBIO_CREDENTIAL_STATE : uint { /// A credential has been associated with the end user. WINBIO_CREDENTIAL_NOT_SET = 0x00000001, /// A credential has not been associated with the end user. WINBIO_CREDENTIAL_SET = 0x00000002, } /// /// Defines flags that can be used to filter on the credential type. This enumeration is used by the WinBioSetCredential, /// WinBioRemoveCredential, and WinBioGetCredentialState functions. /// // https://docs.microsoft.com/en-us/windows/win32/secbiomet/winbio-credential-type typedef enum _WINBIO_CREDENTIAL_TYPE { // WINBIO_CREDENTIAL_PASSWORD = 0x00000001, WINBIO_CREDENTIAL_ALL = 0xffffffff } WINBIO_CREDENTIAL_TYPE; [PInvokeData("winbio_types.h")] [Flags] public enum WINBIO_CREDENTIAL_TYPE : uint { /// Filters password credentials. WINBIO_CREDENTIAL_PASSWORD = 0x01, /// Filters all credentials. WINBIO_CREDENTIAL_ALL = 0xffffffff, } /// The following flags can be used for the Attributes member of the WINBIO_STORAGE_SCHEMA structure. [PInvokeData("winbio_types.h")] [Flags] public enum WINBIO_DATABASE : uint { /// The database is contained in a file. WINBIO_DATABASE_TYPE_FILE = 0x00000001, /// The database is managed by an external database management system (DBMS) component, such as Microsoft SQL Server. WINBIO_DATABASE_TYPE_DBMS = 0x00000002, /// The database resides on the biometric sensor. WINBIO_DATABASE_TYPE_ONCHIP = 0x00000003, /// The database resides on a smart card. WINBIO_DATABASE_TYPE_SMARTCARD = 0x00000004, /// The storage medium containing the database can be physically removed from the computer. WINBIO_DATABASE_FLAG_REMOVABLE = 0x00010000, /// The database resides on a remote computer. WINBIO_DATABASE_FLAG_REMOTE = 0x00020000, } /// /// The following constants are WINBIO_CAPABILITIES values that can be used to specify generic capabilities of the engine component /// that is connected to a specific biometric unit. You specify these capabilities in GenericEngineCapabilities member of the /// WINBIO_EXTENDED_ENGINE_INFO structure. /// [PInvokeData("winbio_types.h")] [Flags] public enum WINBIO_ENG_CAP : uint { /// The biometric engine component can perform iterative improvement. WINBIO_ENG_CAP_ITERATIVE_IMPROVEMENT = 0x00000001, /// The biometric engine component can perform spoof detection. WINBIO_ENG_CAP_SPOOF_DETECTION = 0x00000002, } /// /// The following constants can be used in the WinBioRegisterEventMonitor function to specify the types of service provider event /// notifications to monitor. /// [PInvokeData("winbio_types.h")] [Flags] public enum WINBIO_EVENT_TYPE { /// /// 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. /// WINBIO_EVENT_FP_UNCLAIMED = 0x00000001, /// /// 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. /// WINBIO_EVENT_FP_UNCLAIMED_IDENTIFY = 0x00000002, } /// /// The following constants can be used in the WinBioAsyncMonitorFrameworkChanges function to identify the type of change that /// occurred in the framework. /// [PInvokeData("winbio_types.h")] [Flags] public enum WINBIO_FRAMEWORK_CHANGE_TYPE : uint { /// A biometric unit was attached to or detached from the computer. WINBIO_FRAMEWORK_CHANGE_UNIT = 0x00000001, /// WINBIO_FRAMEWORK_CHANGE_UNIT_STATUS = 0x00000002, } /// /// The following WINBIO_IDENTITY_TYPE constants can be used to specify the format of the identity information contained in the /// WINBIO_IDENTITY structure. /// [PInvokeData("winbio_types.h")] public enum WINBIO_IDENTITY_TYPE { /// The template has no associated ID. WINBIO_ID_TYPE_NULL = 0, /// The structure matches all template identities. WINBIO_ID_TYPE_WILDCARD = 1, /// A GUID identifies the template. WINBIO_ID_TYPE_GUID = 2, /// An account SID identifies the template. WINBIO_ID_TYPE_SID = 3, /// WINBIO_ID_TYPE_SECURE_ID = 4, } /// /// /// The following values can be used to set an indicator light. By default, sensors will not have a light on, but applications can /// use these values to enable or disable indicator lights. The WINBIO_SENSOR_STATUS value provides more detail about the /// status of an indicator light that is on. For more information, see the following functions: /// /// /// /// SensorAdapterSetIndicatorStatus /// /// /// SensorAdapterGetIndicatorStatus /// /// /// SensorAdapterQueryStatus /// /// /// // https://docs.microsoft.com/en-us/windows/win32/secbiomet/winbio-indicator-status-constants [PInvokeData("winbio_types.h")] public enum WINBIO_INDICATOR_STATUS { /// The sensor indicator light is on. WINBIO_INDICATOR_ON = 1, /// The sensor indicator light is off. WINBIO_INDICATOR_OFF = 2, } /// /// The following WINBIO_IDENTITY_TYPE constants can be used to specify the format of the identity information contained in the /// WINBIO_IDENTITY structure. /// [PInvokeData("winbio_types.h")] public enum WINBIO_OPERATION_TYPE { /// No operation has been identified. WINBIO_OPERATION_NONE = 0, /// A biometric session was opened. For more information see WinBioAsyncOpenSession. WINBIO_OPERATION_OPEN = 1, /// A biometric session was closed. For more information, see WinBioCloseSession. WINBIO_OPERATION_CLOSE = 2, /// A biometric sample was verified against a user identity. For more information, see WinBioVerify. WINBIO_OPERATION_VERIFY = 3, /// A biometric sample was captured and compared to an existing template. For more information, see WinBioIdentify. WINBIO_OPERATION_IDENTIFY = 4, /// The ID number of a biometric unit was retrieved. For more information, see WinBioLocateSensor. WINBIO_OPERATION_LOCATE_SENSOR = 5, /// A biometric enrollment sequence was initiated. For more information, see WinBioEnrollBegin. WINBIO_OPERATION_ENROLL_BEGIN = 6, /// A biometric sample was captured and added to the template. For more information, see WinBioEnrollCapture. WINBIO_OPERATION_ENROLL_CAPTURE = 7, /// A pending biometric template was finalized. For more information, see WinBioEnrollCommit. WINBIO_OPERATION_ENROLL_COMMIT = 8, /// A pending biometric template was discarded. For more information, see WinBioEnrollDiscard. WINBIO_OPERATION_ENROLL_DISCARD = 9, /// The sub-factors for a given template were enumerated. For more information, see WinBioEnumEnrollments. WINBIO_OPERATION_ENUM_ENROLLMENTS = 10, /// A biometric template was deleted from the store. For more information, see WinBioDeleteTemplate. WINBIO_OPERATION_DELETE_TEMPLATE = 11, /// A biometric sample was captured. For more information, see WinBioCaptureSample. WINBIO_OPERATION_CAPTURE_SAMPLE = 12, /// A biometric session, unit, or template property was retrieved. For more information, see WinBioGetProperty. WINBIO_OPERATION_GET_PROPERTY = 13, /// A biometric session, unit, template, or account property was set. For more information, see WinBioSetProperty. WINBIO_OPERATION_SET_PROPERTY = 14, /// Not used. WINBIO_OPERATION_GET_EVENT = 15, /// A biometric unit was locked for exclusive use by a session. For more information, see WinBioLockUnit. WINBIO_OPERATION_LOCK_UNIT = 16, /// The session lock on a biometric unit was released. For more information, see WinBioUnlockUnit. WINBIO_OPERATION_UNLOCK_UNIT = 17, /// Vendor defined operations were performed on a control unit. For more information, see WinBioControlUnit. WINBIO_OPERATION_CONTROL_UNIT = 18, /// Privileged vendor defined operations were performed on a control unit. For more information, see WinBioControlUnitPrivileged. WINBIO_OPERATION_CONTROL_UNIT_PRIVILEGED = 19, /// A handle to the biometric framework was opened. WINBIO_OPERATION_OPEN_FRAMEWORK = 20, /// A handle to the biometric framework was closed. For more information, see WinBioCloseFramework. WINBIO_OPERATION_CLOSE_FRAMEWORK = 21, /// The installed biometric service providers were enumerated. For more information, see WinBioEnumServiceProviders. WINBIO_OPERATION_ENUM_SERVICE_PROVIDERS = 22, /// The attached biometric units were enumerated. For more information, see WinBioAsyncEnumBiometricUnits. WINBIO_OPERATION_ENUM_BIOMETRIC_UNITS = 23, /// The registered databases were enumerated. For more information, see WinBioEnumDatabases. WINBIO_OPERATION_ENUM_DATABASES = 24, /// A biometric unit was created. For more information, see WinBioAsyncMonitorFrameworkChanges. WINBIO_OPERATION_UNIT_ARRIVAL = 25, /// A biometric unit was deleted. For more information, see WinBioAsyncMonitorFrameworkChanges. WINBIO_OPERATION_UNIT_REMOVAL = 26, /// Reserved. This value is supported starting in Windows 10. WINBIO_OPERATION_IDENTIFY_AND_RELEASE_TICKET = 27, /// Reserved. This value is supported starting in Windows 10. WINBIO_OPERATION_VERIFY_AND_RELEASE_TICKET = 28, /// /// The facial recognition or iris monitoring mechanism was turned on. For more information, see WinBioMonitorPresence. This /// value is supported starting in Windows 10. /// WINBIO_OPERATION_MONITOR_PRESENCE = 29, /// /// An individual from a group of individuals that are represented by data in the sample buffer was specified as the individual /// to enroll. For more information, see WinBioEnrollSelect. This value is supported starting in Windows 10. /// WINBIO_OPERATION_ENROLL_SELECT = 30, } /// The following constants specify the possible camera orientations that the sensor component specifies as mandatory. [PInvokeData("winbio_types.h")] public enum WINBIO_ORIENTATION { /// A mandatory orientation for the camera is not specified. WINBIO_ORIENTATION_UNSPECIFIED = 0, /// The landscape orientation is required for the camera. WINBIO_ORIENTATION_LANDSCAPE = 1, /// The portrait orientation is required for the camera. WINBIO_ORIENTATION_PORTRAIT = 2, /// Any orientation is permitted for the camera. WINBIO_ORIENTATION_ANY = 3, } /// Lists the possible sources of policy information for the detection of spoofing for biometric factors. // https://docs.microsoft.com/en-us/windows/win32/secbiomet/winbio-policy-source typedef enum _WINBIO_POLICY_SOURCE { // WINBIO_POLICY_UNKNOWN = 0x00000000, WINBIO_POLICY_DEFAULT = 0x00000001, WINBIO_POLICY_LOCAL = 0x00000002, WINBIO_POLICY_ADMIN = // 0x00000003 } WINBIO_POLICY_SOURCE, *PWINBIO_POLICY_SOURCE; [PInvokeData("winbio_types.h")] public enum WINBIO_POLICY_SOURCE { /// The source of the policy is unknown. WINBIO_POLICY_UNKNOWN, /// The policy is the default policy that the Windows Biometric Framework provides. WINBIO_POLICY_DEFAULT, /// /// The policy that the individual user set for their account by using the Settings app. This policy overrides the /// default policy. /// WINBIO_POLICY_LOCAL, /// A group policy that the IT administrator set for the enterprise. Individual users cannot override this policy. WINBIO_POLICY_ADMIN, } /// /// The following constants can be used in the WinBioOpenSession function to specify the type of biometric unit pool to be used in /// the session. /// [PInvokeData("winbio_types.h")] public enum WINBIO_POOL_TYPE { /// The pool type is unknown. WINBIO_POOL_UNKNOWN = 0, /// Specifies a shared collection of biometric units managed by the service provider. WINBIO_POOL_SYSTEM = 1, /// Specifies a collection of biometric units that are managed by the caller. WINBIO_POOL_PRIVATE = 2, /// Reserved for Microsoft - do not use. WINBIO_POOL_UNASSIGNED = 3, } /// Describes the types of changes that can occur when the Windows Biometric Framework monitors the presence of individuals. [PInvokeData("winbio_types.h")] public enum WINBIO_PRESENCE_CHANGE { /// The type of event is unknown. This value is used for the uninitialized structure. WINBIO_PRESENCE_CHANGE_TYPE_UNKNOWN = 0, /// Provides information about all of the faces current in the camera frame. WINBIO_PRESENCE_CHANGE_TYPE_UPDATE_ALL = 1, /// A new face entered the camera frame. WINBIO_PRESENCE_CHANGE_TYPE_ARRIVE = 2, /// A face was matched to an enrolled user. WINBIO_PRESENCE_CHANGE_TYPE_RECOGNIZE = 3, /// A previously detected face has been out of the camera frame for a period of time. WINBIO_PRESENCE_CHANGE_TYPE_DEPART = 4, /// /// Provides updates information about the bounding box and reject detail values for a subset of the faces that are currently in /// the camera frame. /// WINBIO_PRESENCE_CHANGE_TYPE_TRACK = 5, } /// /// The following constants are WINBIO_PROPERTY_ID values that can be used to specify the property to be queried in the PropertyId /// parameter of the WinBioGetProperty function. Some properties can also be set using the same parameter in the WinBioSetProperty /// function. The results of the query are returned or specified in the PropertyBuffer parameter of those functions, and the type /// and size of the result vary depending on what property is queried. /// [PInvokeData("winbio_types.h")] public enum WINBIO_PROPERTY_ID { /// /// This read-only biometric property estimates the maximum number of good biometric samples that are required to complete an /// enrollment template. The result of the property query is returned as a ULONG value that contains the hint. /// /// When this property is queried, the passed SessionHandle and UnitId parameters must be valid, the Identity parameter must be /// NULL, and the SubFactor parameter must be WINBIO_SUBTYPE_NO_INFORMATION. /// /// WINBIO_PROPERTY_SAMPLE_HINT = 1, /// /// This read-only biometric property contains extended information about the capabilities and attributes of the sensor /// component that is connected to a specific biometric unit. The result of the property query is returned as a /// WINBIO_EXTENDED_SENSOR_INFO structure. /// /// When this property is queried, the passed SessionHandle and UnitId parameters must be valid, the Identity parameter must be /// NULL, and the SubFactor parameter must be WINBIO_SUBTYPE_NO_INFORMATION. /// /// WINBIO_PROPERTY_EXTENDED_SENSOR_INFO = 2, /// /// This read-only biometric property contains extended information about the capabilities and attributes of the engine /// component that is connected to a specific biometric unit. The result of the property query is returned as a /// WINBIO_EXTENDED_ENGINE_INFO structure. /// /// When this property is queried, the passed SessionHandle and UnitId parameters must be valid, the Identity parameter must be /// NULL, and the SubFactor parameter must be WINBIO_SUBTYPE_NO_INFORMATION. /// /// WINBIO_PROPERTY_EXTENDED_ENGINE_INFO = 3, /// /// This read-only biometric property contains extended information about the capabilities and attributes of the storage /// component that is connected to a specific biometric unit. The result of the property query is returned as a /// WINBIO_EXTENDED_STORAGE_INFO structure. /// /// When this property is queried, the passed SessionHandle and UnitId parameters must be valid, the Identity parameter must be /// NULL, and the SubFactor parameter must be WINBIO_SUBTYPE_NO_INFORMATION. /// /// WINBIO_PROPERTY_EXTENDED_STORAGE_INFO = 4, /// /// This read-only biometric property contains extended information about the status of an in-progress enrollment on a specific /// biometric unit. The result of the property query is returned as a WINBIO_EXTENDED_STORAGE_INFO structure. If no enrollment /// is in progress on the BU, the TemplateStatus member of the returned structure has a value of WINBIO_E_INVALID_OPERATION. /// /// When this property is queried, the passed SessionHandle and UnitId parameters must be valid, the Identity parameter must be /// NULL, and the SubFactor parameter must be WINBIO_SUBTYPE_NO_INFORMATION. /// /// WINBIO_PROPERTY_EXTENDED_ENROLLMENT_STATUS = 5, /// /// This read-write biometric property contains the values of the antispoofing policy for a specific user account. The property /// operation is specified or returned as a WINBIO_ANTI_SPOOF_POLICY structure. /// /// When this property is queried, the passed SessionHandle parameter must be valid, the UnitId parameter must be zero, the /// Identity parameter must be the account security identifier (SID) value to be queried or changed (to use the SID value /// associated with SessionHandle, specify NULL), and the SubFactor parameter must be WINBIO_SUBTYPE_NO_INFORMATION. /// /// /// If this property is queried using the wildcard identity, the system default value of this policy is returned. Nonprivileged /// users can only modify their own policy setting. If a nonprivileged user attempts to call the WinBioSetProperty function with /// an Identity parameter that represents another user account or contains a wildcard identifier value, the property write /// attempt will fail. /// /// WINBIO_PROPERTY_ANTI_SPOOF_POLICY = 1, } /// /// The following WINBIO_PROPERTY_TYPE constants can be used to specify the source of the property information in the /// WinBioGetProperty function. /// [PInvokeData("winbio_types.h")] public enum WINBIO_PROPERTY_TYPE { /// WINBIO_PROPERTY_TYPE_SESSION = 1, /// WINBIO_PROPERTY_TYPE_UNIT = 2, /// WINBIO_PROPERTY_TYPE_TEMPLATE = 3, /// WINBIO_PROPERTY_TYPE_ACCOUNT = 4, } /// /// The following constants can be used to specify the reason a biometric fingerprint capture or identification procedure did not succeed. /// [PInvokeData("winbio_types.h")] public enum WINBIO_REJECT_DETAIL : uint { /// The finger scan began too high on the finger. WINBIO_FP_TOO_HIGH = 1, /// The finger scan began too low on the finger. WINBIO_FP_TOO_LOW = 2, /// The finger was too far left during scanning. WINBIO_FP_TOO_LEFT = 3, /// The finger was too far right during scanning. WINBIO_FP_TOO_RIGHT = 4, /// The finger was swiped too quickly on the sensor. WINBIO_FP_TOO_FAST = 5, /// The finger was swiped too slowly on the sensor. WINBIO_FP_TOO_SLOW = 6, /// The scan quality was too poor. WINBIO_FP_POOR_QUALITY = 7, /// The finger did not pass straight across the sensor. WINBIO_FP_TOO_SKEWED = 8, /// Not enough of the finger was scanned. WINBIO_FP_TOO_SHORT = 9, /// The fingerprint captures could not be combined. WINBIO_FP_MERGE_FAILURE = 10, /// /// The conditions caused the camera to capture a poor image. Instruct the user to clean the sensor and scan again. This value /// is supported starting in Windows 10. /// WINBIO_IRIS_POOR_QUALITY = 1, /// /// The image includes too much ambient light to get a good match. Instruct the user to ensure that they are no facing another /// bright light source. This value is supported starting in Windows 10. /// WINBIO_IRIS_TOO_BRIGHT = 2, /// /// The image is too dark to get a good match. Instruct the user to ensure that their iris is not obscured by items such as a /// veil, dark glasses, or colored contacts. This value is supported starting in Windows 10. /// WINBIO_IRIS_TOO_DARK = 3, /// /// The recognition component believes that the iris is not live, but is coming from a replayed video feed, a photo, or a 3-D /// sculpture. This value is supported starting in Windows 10. /// WINBIO_IRIS_SPOOF_DETECTED = 4, /// /// The user is not looking directly at the camera. Instruct the user to look directly at the camera and scan again. This value /// is supported starting in Windows 10. /// WINBIO_IRIS_TOO_SKEWED = 5, /// /// The user's eyelids are obscuring the iris. Instruct the user to open their eyes a little more and scan again. This value is /// supported starting in Windows 10. /// WINBIO_IRIS_TOO_CLOSED = 6, /// /// The image includes lens glare. Instruct the user to remove their glasses and scan again. This value is supported starting in /// Windows 10. /// WINBIO_IRIS_GLARE = 7, /// /// The camera lens was dirty. Instruct the user to clean the lens and scan again. This value is supported starting in Windows 10. /// WINBIO_IRIS_DIRTY_LENS = 8, /// This iris is out of focus. This value is supported starting in Windows 10. WINBIO_IRIS_POOR_FOCUS = 9, /// /// The camera orientation does not match the mandatory orientation that the WINBIO_EXTENDED_SENSOR_INFO structure specifies. /// Instruct the user to change the camera orientation and scan again. This value is supported starting in Windows 10. /// WINBIO_IRIS_WRONG_ORIENTATION = 10, /// /// The iris is facing up. Instruct the user to look down a little bit and scan again. This value is supported starting in /// Windows 10. /// WINBIO_IRIS_TOO_HIGH = 0x00010000, /// /// The iris is facing down. Instruct the user to look up a little bit and scan again. This value is supported starting in /// Windows 10. /// WINBIO_IRIS_TOO_LOW = 0x00020000, /// /// The iris is too far to the left. Instruct the user to look a little more to the right and scan again. This value is /// supported starting in Windows 10. /// WINBIO_IRIS_TOO_LEFT = 0x00040000, /// /// The iris is too far to the right. Instruct the user to look a little more to the left and scan again. This value is /// supported starting in Windows 10. /// WINBIO_IRIS_TOO_RIGHT = 0x00080000, /// /// The iris is too close to the camera. Instruct the user to move a little further away and scan again. This value is supported /// starting in Windows 10. /// WINBIO_IRIS_TOO_NEAR = 0x00100000, /// /// The iris is too far from the camera. Instruct the user to move a little closer and scan again. This value is supported /// starting in Windows 10. /// WINBIO_IRIS_TOO_FAR = 0x00200000, /// /// The conditions caused the camera to capture a poor image. Instruct the user to clean the sensor and scan again. This value /// is supported starting in Windows 10. /// WINBIO_FACE_POOR_QUALITY = 1, /// /// The image includes too much ambient light to get a good match. Instruct the user to ensure that they are no facing another /// bright light source. This value is supported starting in Windows 10. /// WINBIO_FACE_TOO_BRIGHT = 2, /// The image is too dark to get a good match. This value is supported starting in Windows 10. WINBIO_FACE_TOO_DARK = 3, /// /// The recognition component believes that the face is not live, but is coming from a replayed video feed, a photo, or a 3-D /// sculpture. This value is supported starting in Windows 10. /// WINBIO_FACE_SPOOF_DETECTED = 4, /// Two or more faces are overlapping in camera frame. This value is supported starting in Windows 10. WINBIO_FACE_AMBIGUOUS_TARGET = 5, /// /// The user's eyes are occluded. Instruct the user to ensure that their eyes are not obscured by items such as a veil, dark /// glasses, or colored contacts. This value is supported starting in Windows 10. /// WINBIO_FACE_EYES_OCCLUDED = 6, /// /// The camera orientation does not match the mandatory orientation that the WINBIO_EXTENDED_SENSOR_INFO structure specifies. /// Instruct the user to change the camera orientation and scan again. This value is supported starting in Windows 10. /// WINBIO_FACE_WRONG_ORIENTATION = 7, /// /// The face is facing up. Instruct the user to look down a little bit and scan again. This value is supported starting in /// Windows 10. /// WINBIO_FACE_TOO_HIGH = 0x00010000, /// /// The face is facing down. Instruct the user to look up a little bit and scan again. This value is supported starting in /// Windows 10. /// WINBIO_FACE_TOO_LOW = 0x00020000, /// /// The face is too far to the left. Instruct the user to move a little more to the right and scan again. This value is /// supported starting in Windows 10. /// WINBIO_FACE_TOO_LEFT = 0x00040000, /// /// The face is too far to the right. Instruct the user to move a little more to the left and scan again. This value is /// supported starting in Windows 10. /// WINBIO_FACE_TOO_RIGHT = 0x00080000, /// /// The face is too close to the camera. Instruct the user to move a little further away and scan again. This value is supported /// starting in Windows 10. /// WINBIO_FACE_TOO_NEAR = 0x00100000, /// /// The face is too far from the camera. Instruct the user to move a little closer and scan again. This value is supported /// starting in Windows 10. /// WINBIO_FACE_TOO_FAR = 0x00200000, /// WINBIO_VOICE_POOR_QUALITY = 1, /// WINBIO_VOICE_TOO_SLOW = 2, /// WINBIO_VOICE_TOO_FAST = 3, /// WINBIO_VOICE_NO_KEYWORD = 4, /// WINBIO_VOICE_PROCESSING_ERROR = 5, } /// The following values are used in the SensorAdapterSetMode function to set the sensor adapter mode. [PInvokeData("winbio_types.h")] public enum WINBIO_SENSOR_MODE : uint { /// The operating mode is not known. WINBIO_SENSOR_UNKNOWN_MODE = 0, /// /// 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. /// WINBIO_SENSOR_BASIC_MODE = 1, /// Operate the sensor in advanced mode. The sensor can capture samples and perform matching and storage functions. WINBIO_SENSOR_ADVANCED_MODE = 2, /// Operate the sensor as a mouse pad. This is not currently supported. WINBIO_SENSOR_NAVIGATION_MODE = 3, /// Operate the sensor in sleep mode. WINBIO_SENSOR_SLEEP_MODE = 4, } /// /// The WINBIO_SENSOR_STATUS status of the sensor after the capture has occurred. It specifies the operating status of the sensor. /// [PInvokeData("winbio_types.h")] public enum WINBIO_SENSOR_STATUS { /// WINBIO_SENSOR_STATUS_UNKNOWN = 0, /// /// The sensor just successfully completed a capture operation. This should only be returned immediately after a capture /// operation. The sensor will then return to WINBIO_SENSOR_READY or WINBIO_SENSOR_BUSY. /// WINBIO_SENSOR_ACCEPT = 1, /// /// The sensor rejected the previous capture operation. This should only be returned immediately following a capture operation. /// The sensor will then return to WINBIO_SENSOR_READY or WINBIO_SENSOR_BUSY. /// WINBIO_SENSOR_REJECT = 2, /// /// The sensor is ready to capture data. If there is a pending data capture IOCTL, the sensor is ready to accept data. /// WINBIO_SENSOR_READY = 3, /// /// The sensor is busy or in a state where it cannot capture data. For example, the device could still be initializing after it /// has been turned on. /// WINBIO_SENSOR_BUSY = 4, /// The sensor must be calibrated before it is put into data collection mode. WINBIO_SENSOR_NOT_CALIBRATED = 5, /// The sensor device failed. WINBIO_SENSOR_FAILURE = 6, /// WINBIO_SENSOR_AVAILABLE = 7, /// WINBIO_SENSOR_UNAVAILABLE = 8, } /// /// The following constants can be used in the WinBioOpenSession function to specify biometric unit configuration and access /// characteristics for the new session. /// [PInvokeData("winbio_types.h")] [Flags] public enum WINBIO_SESSION_FLAGS : uint { /// Sensor configuration flag. The biometric units operate in the manner specified during installation. WINBIO_FLAG_DEFAULT = 0x00000000, /// Sensor configuration flag. The biometric units operate only as basic capture devices. WINBIO_FLAG_BASIC = ((WINBIO_SENSOR_MODE.WINBIO_SENSOR_BASIC_MODE & 0xFFFF) << 16), /// Sensor configuration flag. The biometric units use internal processing and storage capabilities. WINBIO_FLAG_ADVANCED = ((WINBIO_SENSOR_MODE.WINBIO_SENSOR_ADVANCED_MODE & 0xFFFF) << 16), /// Desired access flag. The client application captures raw biometric data using WinBioCaptureSample. WINBIO_FLAG_RAW = BIO_UNIT.BIO_UNIT_RAW, /// Desired access flag. The client performs vendor-defined control operations on a biometric unit by calling WinBioControlUnitPrivileged. WINBIO_FLAG_MAINTENANCE = BIO_UNIT.BIO_UNIT_MAINTENANCE, } /// /// The following constants are used by the WinBioGetEnabledSetting function to determine whether the Windows Biometric Framework is /// currently enabled. The constants specify where the setting originated. /// [PInvokeData("winbio_types.h")] public enum WINBIO_SETTING_SOURCE_TYPE { /// The setting is not valid. WINBIO_SETTING_SOURCE_INVALID = 0, /// The setting originated from built-in policy. WINBIO_SETTING_SOURCE_DEFAULT = 1, /// The setting originated in the local computer registry. WINBIO_SETTING_SOURCE_POLICY = 2, /// The setting was created by Group Policy WINBIO_SETTING_SOURCE_LOCAL = 3, } /// Represents the antispoofing policy for a user. // https://docs.microsoft.com/en-us/windows/win32/secbiomet/winbio-anti-spoof-policy typedef struct _WINBIO_ANTI_SPOOF_POLICY { // WINBIO_ANTI_SPOOF_POLICY_ACTION Action; WINBIO_POLICY_SOURCE Source; } WINBIO_ANTI_SPOOF_POLICY, *PWINBIO_ANTI_SPOOF_POLICY; [PInvokeData("winbio_types.h")] [StructLayout(LayoutKind.Sequential)] public struct WINBIO_ANTI_SPOOF_POLICY { /// The type of action to take for the antispoofing policy. public WINBIO_ANTI_SPOOF_POLICY_ACTION Action; /// The source for the antispoofing policy. public WINBIO_POLICY_SOURCE Source; } /// The WINBIO_BDB_ANSI_381_HEADER structure specifies information about a series of fingerprint or palm samples. // https://docs.microsoft.com/en-us/windows/win32/secbiomet/winbio-bdb-ansi-381-header typedef struct _WINBIO_BDB_ANSI_381_HEADER { // ULONG64 RecordLength; ULONG FormatIdentifier; ULONG VersionNumber; WINBIO_REGISTERED_FORMAT ProductId; USHORT CaptureDeviceId; // USHORT ImageAcquisitionLevel; USHORT HorizontalScanResolution; USHORT VerticalScanResolution; USHORT HorizontalImageResolution; // USHORT VerticalImageResolution; UCHAR ElementCount; UCHAR ScaleUnits; UCHAR PixelDepth; UCHAR ImageCompressionAlg; USHORT // Reserved; } WINBIO_BDB_ANSI_381_HEADER; [PInvokeData("winbio_types.h")] [StructLayout(LayoutKind.Sequential)] public struct WINBIO_BDB_ANSI_381_HEADER { /// /// The size, in bytes, of this structure plus the size of all WINBIO_BDB_ANSI_381_RECORD structures for the fingerprint /// or palm samples captured from an end user. Only the low six bytes are valid. /// public ulong RecordLength; /// Specifies the format. Currently, this must be 0x46495200. public uint FormatIdentifier; /// Specifies the version number. Currently this must be 0x30313000 which corresponds internally to 0.1.0.0. public uint VersionNumber; /// A WINBIO_REGISTERED_FORMAT structure that contains the registered data format as an owner/type pair. public WINBIO_REGISTERED_FORMAT ProductId; /// Contains the unit ID of the device used to capture the sample. public ushort CaptureDeviceId; /// Specifies the resolution level at which the sample is captured. public ushort ImageAcquisitionLevel; /// Specifies the horizontal resolution of the scan. public ushort HorizontalScanResolution; /// Specifies the vertical resolution of the scan. public ushort VerticalScanResolution; /// Specifies the horizontal resolution of the captured fingerprint or palm image. public ushort HorizontalImageResolution; /// Specifies the vertical resolution of the captured fingerprint or palm image. public ushort VerticalImageResolution; /// Number of finger or palm records in this structure. public byte ElementCount; /// Contains the unit of measure, 1 for inches and 2 for centimeters. public byte ScaleUnits; /// Specifies the number of bits in a pixel. This can be 1 to 16 bits per pixel for color. public byte PixelDepth; /// Specifies the algorithm used to compress the finger or palm image. public byte ImageCompressionAlg; /// public ushort Reserved; } /// /// The WINBIO_BDB_ANSI_381_RECORD structure contains information about a single fingerprint or palm sample from an end user. /// A collection of these structures is included in each WINBIO_BDB_ANSI_381_HEADER structure. /// /// /// /// The Position member specifies the area of the hand or palm used to make the biometric sample. The Windows Biometric Framework /// (WBF) currently supports only fingerprint capture and uses the following constants to represent position information. /// /// /// /// WINBIO_ANSI_381_POS_UNKNOWN /// /// /// WINBIO_ANSI_381_POS_RH_THUMB /// /// /// WINBIO_ANSI_381_POS_RH_INDEX_FINGER /// /// /// WINBIO_ANSI_381_POS_RH_MIDDLE_FINGER /// /// /// WINBIO_ANSI_381_POS_RH_RING_FINGER /// /// /// WINBIO_ANSI_381_POS_RH_LITTLE_FINGER /// /// /// WINBIO_ANSI_381_POS_LH_THUMB /// /// /// WINBIO_ANSI_381_POS_LH_INDEX_FINGER /// /// /// WINBIO_ANSI_381_POS_LH_MIDDLE_FINGER /// /// /// WINBIO_ANSI_381_POS_LH_RING_FINGER /// /// /// WINBIO_ANSI_381_POS_LH_LITTLE_FINGER /// /// /// WINBIO_ANSI_381_POS_RH_FOUR_FINGERS /// /// /// WINBIO_ANSI_381_POS_LH_FOUR_FINGERS /// /// /// WINBIO_ANSI_381_POS_TWO_THUMBS /// /// /// /// Important /// /// Do not attempt to validate the value supplied for the Position value. The Windows Biometrics Service will validate the supplied /// value before passing it through to your implementation. If the value is WINBIO_SUBTYPE_NO_INFORMATION or /// WINBIO_SUBTYPE_ANY, then validate where appropriate. /// /// /// // https://docs.microsoft.com/en-us/windows/win32/secbiomet/winbio-bdb-ansi-381-record typedef struct _WINBIO_BDB_ANSI_381_RECORD { // ULONG BlockLength; USHORT HorizontalLineLength; USHORT VerticalLineLength; WINBIO_BIOMETRIC_SUBTYPE Position; UCHAR CountOfViews; // UCHAR ViewNumber; UCHAR ImageQuality; UCHAR ImpressionType; UCHAR Reserved; } WINBIO_BDB_ANSI_381_RECORD; [PInvokeData("winbio_types.h")] [StructLayout(LayoutKind.Sequential)] public struct WINBIO_BDB_ANSI_381_RECORD { /// Contains the number of bytes in this structure plus the number of bytes of sample image data. public uint BlockLength; /// Specifies the number of pixels in a horizontal line of the sample. public ushort HorizontalLineLength; /// Specifies the number of pixels in a vertical line of the sample. public ushort VerticalLineLength; /// /// A WINBIO_BIOMETRIC_SUBTYPE value that specifies the finger or palm used to generate the biometric sample. For more /// information, see Remarks. /// public WINBIO_BIOMETRIC_SUBTYPE Position; /// This must be set to one (1); public byte CountOfViews; /// This must be set to one (1); public byte ViewNumber; /// Reserved. This must be 254 (0xFE). public byte ImageQuality; /// Reserved. public byte ImpressionType; /// Reserved. Must be set to zero (0). public byte Reserved; } /// /// The WINBIO_BIR structure represents a biometric information record (BIR). The information record contains header, data, /// and signature blocks. /// /// /// /// The use of offsets rather than pointers allows for easy serialization of the BIR and for less complicated translation between 32 /// and 64-bit environments or between user and kernel mode. /// /// The BIR is compatible with the Common Biometric Exchange Format Framework (CBEFF) defined by NIST 6529-A. /// /// If this structure contains a StandardDataBlock value, the Type parameter of the header specified by the HeaderBlock parameter /// must be set to WINBIO_ANSI_381_FORMAT_TYPE. This is the only standard data format supported by the current version of the /// Windows Biometric Framework. /// /// // https://docs.microsoft.com/en-us/windows/win32/secbiomet/winbio-bir typedef struct _WINBIO_BIR { WINBIO_BIR_DATA HeaderBlock; // WINBIO_BIR_DATA StandardDataBlock; WINBIO_BIR_DATA VendorDataBlock; WINBIO_BIR_DATA SignatureBlock; } WINBIO_BIR; [PInvokeData("winbio_types.h")] [StructLayout(LayoutKind.Sequential)] public struct WINBIO_BIR { /// /// A WINBIO_BIR_DATA 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. /// public WINBIO_BIR_DATA HeaderBlock; /// /// A WINBIO_BIR_DATA structure that contains the size, in bytes, and offset of processed or unprocessed biometric /// information created by the Windows Biometric Framework (WBF). /// public WINBIO_BIR_DATA StandardDataBlock; /// /// A WINBIO_BIR_DATA structure that contains the size, in bytes, and offset of processed or unprocessed biometric /// information provided by vendor sensors and software. /// public WINBIO_BIR_DATA VendorDataBlock; /// /// An optional WINBIO_BIR_DATA 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. /// public WINBIO_BIR_DATA SignatureBlock; } /// /// The WINBIO_BIR_DATA structure specifies the size, in bytes, and the offset of a block of biometric information. This /// structure is used by the WINBIO_BIR structure to specify where the various parts of a biometric information record are located. /// /// /// The use of offsets rather than pointers allows for easy serialization of the BIR and for less complicated translation between 32 /// and 64-bit environments or between user and kernel mode. /// // https://docs.microsoft.com/en-us/windows/win32/secbiomet/winbio-bir-data typedef struct _WINBIO_BIR_DATA { ULONG Size; ULONG // Offset; } WINBIO_BIR_DATA; [PInvokeData("winbio_types.h")] [StructLayout(LayoutKind.Sequential)] public struct WINBIO_BIR_DATA { /// Size, in bytes, of the biometric information. public uint Size; /// Offset, in bytes from the beginning of the WINBIO_BIR structure, of the biometric information. public uint Offset; } /// The WINBIO_BIR_HEADER structure contains the header of a biometric information record (BIR). /// /// /// The Subtype parameter specifies the sub-factor associated with the biometric data. Currently, the Windows Biometric Framework /// (WBF) supports only fingerprint capture and uses the following constants to represent sub-type information: /// /// /// /// WINBIO_ANSI_381_POS_UNKNOWN /// /// /// WINBIO_ANSI_381_POS_RH_THUMB /// /// /// WINBIO_ANSI_381_POS_RH_INDEX_FINGER /// /// /// WINBIO_ANSI_381_POS_RH_MIDDLE_FINGER /// /// /// WINBIO_ANSI_381_POS_RH_RING_FINGER /// /// /// WINBIO_ANSI_381_POS_RH_LITTLE_FINGER /// /// /// WINBIO_ANSI_381_POS_LH_THUMB /// /// /// WINBIO_ANSI_381_POS_LH_INDEX_FINGER /// /// /// WINBIO_ANSI_381_POS_LH_MIDDLE_FINGER /// /// /// WINBIO_ANSI_381_POS_LH_RING_FINGER /// /// /// WINBIO_ANSI_381_POS_LH_LITTLE_FINGER /// /// /// WINBIO_ANSI_381_POS_RH_FOUR_FINGERS /// /// /// WINBIO_ANSI_381_POS_LH_FOUR_FINGERS /// /// /// WINBIO_ANSI_381_POS_TWO_THUMBS /// /// /// /// Important /// /// Do not attempt to validate the value supplied for the Subtype parameter value. The Windows Biometrics Service will validate the /// supplied value before passing it through to your implementation. If the value is WINBIO_SUBTYPE_NO_INFORMATION or /// WINBIO_SUBTYPE_ANY, then validate where appropriate. /// /// /// If any of the following bits are asserted, the WINBIO_BIR_HEADER structure is not correctly formed. /// /// #define WINBIO_BIR_FIELD_NEVER_VALID (WINBIO_BIR_FIELD_SUBHEAD_COUNT | \ WINBIO_BIR_FIELD_PATRON_ID | \ WINBIO_BIR_FIELD_INDEX | \ WINBIO_BIR_FIELD_CHALLENGE | \ WINBIO_BIR_FIELD_PAYLOAD ) /// /// // https://docs.microsoft.com/en-us/windows/win32/secbiomet/winbio-bir-header typedef struct _WINBIO_BIR_HEADER { USHORT // ValidFields; WINBIO_BIR_VERSION HeaderVersion; WINBIO_BIR_VERSION PatronHeaderVersion; WINBIO_BIR_DATA_FLAGS DataFlags; // WINBIO_BIOMETRIC_TYPE Type; WINBIO_BIOMETRIC_SUBTYPE Subtype; WINBIO_BIR_PURPOSE Purpose; WINBIO_BIR_QUALITY DataQuality; // LARGE_INTEGER CreationDate; struct { LARGE_INTEGER BeginDate; LARGE_INTEGER EndDate; } ValidityPeriod; WINBIO_REGISTERED_FORMAT // BiometricDataFormat; WINBIO_REGISTERED_FORMAT ProductId; } WINBIO_BIR_HEADER; [PInvokeData("winbio_types.h")] [StructLayout(LayoutKind.Sequential)] public struct WINBIO_BIR_HEADER { /// /// Bitmask that specifies which fields in this structure are valid. For more information, see WINBIO_BIR_FIELD Constants. /// public WINBIO_BIR_FIELD ValidFields; /// /// A WINBIO_BIR_VERSION constant that specifies the header version. Version numbers are 8-bit values where the upper /// four bits specify the major number and the low four bits specify the minor version number. Currently this must be /// WINBIO_CBEFF_HEADER_VERSION (0x11). /// public WINBIO_BIR_VERSION HeaderVersion; /// /// A WINBIO_BIR_VERSION constant that specifies the header version. Version numbers are 8-bit values where the upper /// four bits specify the major number and the low four bits specify the minor version number. Currently this must be /// WINBIO_PATRON_HEADER_VERSION (0x11). /// public WINBIO_BIR_VERSION PatronHeaderVersion; /// /// /// A value that specifies the format of the header data. This can be a bitwise OR of the following security and /// processing level flags. For more information, see WINBIO_BIR_DATA_FLAGS Constants. /// /// /// /// Value /// Meaning /// /// /// WINBIO_DATA_FLAG_PRIVACY ((UCHAR)0x02) /// The data is encrypted. /// /// /// WINBIO_DATA_FLAG_INTEGRITY ((UCHAR)0x01) /// The data is digitally signed or protected by a message authentication code (MAC). /// /// /// WINBIO_DATA_FLAG_SIGNED ((UCHAR)0x04) /// /// If this flag and the WINBIO_DATA_FLAG_INTEGRITY flag are set, the data is signed. If this flag is not set but the /// WINBIO_DATA_FLAG_INTEGRITY flag is set, a MAC is computed over the data. /// /// /// /// WINBIO_DATA_FLAG_RAW ((UCHAR)0x20) /// The data is in the format with which it was captured. /// /// /// WINBIO_DATA_FLAG_INTERMEDIATE ((UCHAR)0x40) /// The data is not raw but has not been completely processed. /// /// /// WINBIO_DATA_FLAG_PROCESSED ((UCHAR)0x80) /// The data has been processed. /// /// /// WINBIO_DATA_FLAG_OPTION_MASK_PRESENT ((UCHAR)0x08) /// This value is always 1. /// /// /// public WINBIO_BIR_DATA_FLAGS DataFlags; /// /// A WINBIO_BIOMETRIC_TYPE value that specifies the type of biometric data referenced in the biometric information record. /// Currently only WINBIO_TYPE_FINGERPRINT is supported. For more information, see WINBIO_BIOMETRIC_TYPE Constants. /// public WINBIO_BIOMETRIC_TYPE Type; /// /// A WINBIO_BIOMETRIC_SUBTYPE value that specifies the sub-factor associated with the biometric data. For more /// information, see Remarks and WINBIO_BIOMETRIC_SUBTYPE Constants. /// public WINBIO_BIOMETRIC_SUBTYPE Subtype; /// /// /// A WINBIO_BIR_PURPOSE mask that specifies the intended use of the data. This can be a bitwise OR of the /// following values. For more information, see WINBIO_BIR_PURPOSE Constants. /// /// /// /// WINBIO_PURPOSE_VERIFY /// /// /// WINBIO_PURPOSE_IDENTIFY /// /// /// WINBIO_PURPOSE_ENROLL /// /// /// WINBIO_PURPOSE_ENROLL_FOR_VERIFICATION /// /// /// WINBIO_PURPOSE_ENROLL_FOR_IDENTIFICATION /// /// /// WINBIO_PURPOSE_AUDIT /// /// /// public WINBIO_BIR_PURPOSE Purpose; /// /// /// A value that specifies the relative quality of the biometric data in the biometric information record (BIR). This can be an /// integer from 0 to 100 or one of the following values. For more information, see WINBIO_BIR_QUALITY Constants. /// /// /// /// Value /// Meaning /// /// /// WINBIO_DATA_QUALITY_NOT_SET ((WINBIO_BIR_QUALITY)-1) /// Quality measurements are supported by the BIR creator but no value is set in the BIR. /// /// /// WINBIO_DATA_QUALITY_NOT_SUPPORTED ((WINBIO_BIR_QUALITY)-2) /// Quality measurements are not supported by the BIR creator. /// /// /// public WINBIO_BIR_QUALITY DataQuality; /// The date and time, in Coordinated Universal Time (Greenwich Mean Time), that the BIR was created. public long CreationDate; /// /// The period for which the BIR is valid. /// /// /// /// BeginDate /// /// /// EndDate /// /// /// /// public VALIDITYPERIOD ValidityPeriod; /// The period for which the BIR is valid. [StructLayout(LayoutKind.Sequential)] public struct VALIDITYPERIOD { /// The date and time, in Coordinated Universal Time, that the validity period starts. public long BeginDate; /// The date and time, in Coordinated Universal Time, at which the BIR ceases to be valid. public long EndDate; } /// /// /// A WINBIO_REGISTERED_FORMAT structure that specifies the data format of the standard data block in the /// WINBIO_BIR structure. The WINBIO_REGISTERED_FORMAT members cannot be zero. You can use the following constants /// to simplify error checking. /// /// /// /// Value /// Meaning /// /// /// WINBIO_NO_FORMAT_OWNER_AVAILABLE ((USHORT)0) /// No IBIA (International Biometric Industry Association) assigned owner value has been specified. /// /// /// WINBIO_NO_FORMAT_TYPE_AVAILABLE ((USHORT)0) /// No format type has been specified. /// /// /// public WINBIO_REGISTERED_FORMAT BiometricDataFormat; /// /// A WINBIO_REGISTERED_FORMAT structure that specifies the product ID of the component that generated the standard data /// block in the BIR. The WINBIO_REGISTERED_FORMAT members can be zero. /// public WINBIO_REGISTERED_FORMAT ProductId; } /// /// The WINBIO_BSP_SCHEMA structure describes the capabilities of a biometric service provider. This structure is used by the /// WinBioEnumServiceProviders function. /// // https://docs.microsoft.com/en-us/windows/win32/secbiomet/winbio-bsp-schema typedef struct _WINBIO_BSP_SCHEMA { // WINBIO_BIOMETRIC_TYPE BiometricFactor; WINBIO_UUID BspId; WINBIO_STRING Description; WINBIO_STRING Vendor; WINBIO_VERSION // Version; } WINBIO_BSP_SCHEMA, *PWINBIO_BSP_SCHEMA; [PInvokeData("winbio_types.h")] [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] public struct WINBIO_BSP_SCHEMA { /// The type of biometric measurement used by this device. Currently this must be WINBIO_TYPE_FINGERPRINT. public WINBIO_BIOMETRIC_TYPE BiometricFactor; /// A value that uniquely identifies this biometric service provider component. public Guid BspId; /// A NULL-terminated Unicode string that contains a description of the biometric service provider. [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] public string Description; /// /// A NULL-terminated Unicode string that contains the name of the vendor supplying the biometric service provider. /// [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] public string Vendor; /// A WINBIO_VERSION structure the contains the software version of the biometric service provider component. public WINBIO_VERSION Version; } /// /// The WINBIO_EVENT structure contains status information sent to the callback routine when an event notice is raised. /// /// /// Call the WinBioRegisterEventMonitor function to register a callback routine to receive event notifications from the /// Windows Biometric Framework. The callback is a custom function that you must define for your application. /// // https://docs.microsoft.com/en-us/windows/win32/secbiomet/winbio-event typedef struct _WINBIO_EVENT { WINBIO_EVENT_TYPE Type; // union { struct { WINBIO_UNIT_ID UnitId; WINBIO_REJECT_DETAIL RejectDetail; } Unclaimed; struct { WINBIO_UNIT_ID UnitId; // WINBIO_IDENTITY Identity; WINBIO_BIOMETRIC_SUBTYPE SubFactor; WINBIO_REJECT_DETAIL RejectDetail; } UnclaimedIdentify; struct { // HRESULT ErrorCode; } Error; } Parameters; } WINBIO_EVENT, *PWINBIO_EVENT; [PInvokeData("winbio_types.h")] [StructLayout(LayoutKind.Sequential)] public struct WINBIO_EVENT { /// /// /// A value that specifies the type of service provider event notice raised. The only provider currently supported is the /// fingerprint sensor. This sensor supports the following flags. /// /// /// public WINBIO_EVENT_TYPE Type; /// public PARAMETERS Parameters; /// [StructLayout(LayoutKind.Explicit)] public struct PARAMETERS { /// Structure returned for biometric sample capture. [FieldOffset(0)] public UNCLAIMED Unclaimed; /// Structure returned for biometric sample capture. [StructLayout(LayoutKind.Sequential)] public struct UNCLAIMED { /// The biometric unit that generated the sample. public uint UnitId; /// /// A ULONG value that contains additional information regarding failure to capture a biometric sample. If a capture /// succeeded, this parameter is set to zero. /// public WINBIO_REJECT_DETAIL RejectDetail; } /// /// Structure returned for biometric capture and identification. Identification determines whether a sample can be /// associated with an existing biometric template. /// [FieldOffset(0)] public UNCLAIMEDIDENTIFY UnclaimedIdentify; /// /// Structure returned for biometric capture and identification. Identification determines whether a sample can be /// associated with an existing biometric template. /// [StructLayout(LayoutKind.Sequential)] public struct UNCLAIMEDIDENTIFY { /// The biometric unit that generated the sample. public uint UnitId; /// A WINBIO_IDENTITY structure that contains the GUID or SID of the user providing the biometric sample. public WINBIO_IDENTITY Identity; /// /// 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. /// public WINBIO_BIOMETRIC_SUBTYPE SubFactor; /// /// 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. /// public WINBIO_REJECT_DETAIL RejectDetail; } /// Structure that identifies the success or failure of the operation being monitored. [FieldOffset(0)] public ERROR Error; /// Structure that identifies the success or failure of the operation being monitored. [StructLayout(LayoutKind.Sequential)] public struct ERROR { /// /// HRESULT value that contains S_OK or an error code that resulted from computations performed by the Windows Biometric Framework. /// public HRESULT ErrorCode; } } } /// Contains information about the capabilities and enrollment requirements of the engine adapter for a biometric unit. // https://docs.microsoft.com/en-us/windows/win32/secbiomet/winbio-extended-engine-info typedef struct _WINBIO_EXTENDED_ENGINE_INFO // { WINBIO_CAPABILITIES GenericEngineCapabilities; WINBIO_BIOMETRIC_TYPE Factor; union { ULONG32 Null; struct { WINBIO_CAPABILITIES // Capabilities; struct { ULONG32 Null; } EnrollmentRequirements; } FacialFeatures; struct { WINBIO_CAPABILITIES Capabilities; // struct { ULONG GeneralSamples; ULONG Center; ULONG TopEdge; ULONG BottomEdge; ULONG LeftEdge; ULONG RightEdge; } // EnrollmentRequirements; } Fingerprint; struct { WINBIO_CAPABILITIES Capabilities; struct { ULONG32 Null; } // EnrollmentRequirements; } Iris; struct { WINBIO_CAPABILITIES Capabilities; struct { ULONG32 Null; } EnrollmentRequirements; } // Voice; } Specific; } WINBIO_EXTENDED_ENGINE_INFO, *PWINBIO_EXTENDED_ENGINE_INFO; [PInvokeData("winbio_types.h")] [StructLayout(LayoutKind.Sequential)] public struct WINBIO_EXTENDED_ENGINE_INFO { /// The generic capabilities of the engine component that is connected to a specific biometric unit. public WINBIO_CAPABILITIES GenericEngineCapabilities; /// /// The type of biometric unit for which this structure contains information about capabilities and enrollment requirements of /// the engine adapter. For example, if the value of the Factor member is WINBIO_TYPE_FINGERPRINT, the /// WINBIO_EXTENDED_ENGINE_INFO structure applies to a fingerprint reader and contains the relevant information in the /// Specifc.Fingerprint structure. /// public WINBIO_BIOMETRIC_TYPE Factor; /// /// Information about the capabilities and enrollment requirements of the engine adapter for a biometric unit related to a /// specific biometric factor. /// public SPECIFIC Specific; /// /// Information about the capabilities and enrollment requirements of the engine adapter for a biometric unit related to a /// specific biometric factor. /// [StructLayout(LayoutKind.Explicit)] public struct SPECIFIC { /// Reserved. Must be zero. [FieldOffset(0)] public uint Null; /// /// Information about the capabilities and enrollment requirements of the engine adapter for a biometric unit related to /// facial features. /// [FieldOffset(0)] public FACIALFEATURES FacialFeatures; /// /// Information about the capabilities and enrollment requirements of the engine adapter for a biometric unit related to /// facial features. /// [StructLayout(LayoutKind.Sequential)] public struct FACIALFEATURES { /// Reserved. Must be zero. public WINBIO_CAPABILITIES Capabilities; /// The enrollment requirements public ENROLLMENTREQUIREMENTS EnrollmentRequirements; /// [StructLayout(LayoutKind.Sequential)] public struct ENROLLMENTREQUIREMENTS { /// Reserved. Must be zero. public uint Null; } } /// /// Information about the capabilities and enrollment requirements of the engine adapter for a biometric unit related to /// fingerprint patterns. /// [FieldOffset(0)] public FINGERPRINT Fingerprint; /// /// Information about the capabilities and enrollment requirements of the engine adapter for a biometric unit related to /// fingerprint patterns. /// [StructLayout(LayoutKind.Sequential)] public struct FINGERPRINT { /// Reserved. Must be zero. public WINBIO_CAPABILITIES Capabilities; /// The number of good samples required to create a new fingerprint template. public ENROLLMENTREQUIREMENTS EnrollmentRequirements; /// The number of good samples required to create a new fingerprint template. [StructLayout(LayoutKind.Sequential)] public struct ENROLLMENTREQUIREMENTS { /// The total number of good samples required to create a new fingerprint template. public uint GeneralSamples; /// /// The number of good samples for the center of the fingerprint required to create a new fingerprint template. /// public uint Center; /// /// The number of good samples for the top edge of the fingerprint required to create a new fingerprint template. /// public uint TopEdge; /// /// The number of good samples for the bottom edge of the fingerprint required to create a new fingerprint template. /// public uint BottomEdge; /// /// The number of good samples for the left edge of the fingerprint required to create a new fingerprint template. /// public uint LeftEdge; /// /// The number of good samples for the right edge of the fingerprint required to create a new fingerprint template. /// public uint RightEdge; } } /// /// Information about the capabilities and enrollment requirements of the engine adapter for a biometric unit related to /// iris patterns. /// [FieldOffset(0)] public IRIS Iris; /// /// Information about the capabilities and enrollment requirements of the engine adapter for a biometric unit related to /// iris patterns. /// [StructLayout(LayoutKind.Sequential)] public struct IRIS { /// Reserved. Must be zero. public WINBIO_CAPABILITIES Capabilities; /// public ENROLLMENTREQUIREMENTS EnrollmentRequirements; /// [StructLayout(LayoutKind.Sequential)] public struct ENROLLMENTREQUIREMENTS { /// Reserved. Must be zero. public uint Null; } } /// /// Information about the capabilities and enrollment requirements of the engine adapter for a biometric unit related to /// voice patterns. /// [FieldOffset(0)] public VOICE Voice; /// /// Information about the capabilities and enrollment requirements of the engine adapter for a biometric unit related to /// voice patterns. /// [StructLayout(LayoutKind.Sequential)] public struct VOICE { /// Reserved. Must be zero. public WINBIO_CAPABILITIES Capabilities; /// public ENROLLMENTREQUIREMENTS EnrollmentRequirements; /// [StructLayout(LayoutKind.Sequential)] public struct ENROLLMENTREQUIREMENTS { /// Reserved. Must be zero. public uint Null; } } } } /// Contains additional information about the status of an enrollment that is in progress. // https://docs.microsoft.com/en-us/windows/win32/secbiomet/winbio-extended-enrollment-status typedef struct // _WINBIO_EXTENDED_ENROLLMENT_STATUS { HRESULT TemplateStatus; WINBIO_REJECT_DETAIL RejectDetail; ULONG PercentComplete; // WINBIO_BIOMETRIC_TYPE Factor; WINBIO_BIOMETRIC_SUBTYPE SubFactor; union { ULONG32 Null; struct { RECT BoundingBox; LONG Distance; // } FacialFeatures; struct { ULONG GeneralSamples; ULONG Center; ULONG TopEdge; ULONG BottomEdge; ULONG LeftEdge; ULONG RightEdge; // } Fingerprint; struct { RECT EyeBoundingBox_1; RECT EyeBoundingBox_2; POINT PupilCenter_1; POINT PupilCenter_2; LONG Distance; } // Iris; struct { ULONG32 Reserved; } Voice; } Specific; } WINBIO_EXTENDED_ENROLLMENT_STATUS, *PWINBIO_EXTENDED_ENROLLMENT_STATUS; [PInvokeData("winbio_types.h")] [StructLayout(LayoutKind.Sequential)] public struct WINBIO_EXTENDED_ENROLLMENT_STATUS { /// /// The status of sample collection for the enrollment template. The following values are possible for this member. /// /// /// Value /// Meaning /// /// /// S_OK /// The enrollment is ready to be saved. /// /// /// WINBIO_E_INVALID_OPERATION /// No enrollment is in progress. /// /// /// WINBIO_I_MORE_DATA /// More samples are required to complete the template. /// /// /// WINBIO_E_BAD_CAPTURE /// The most recent sample is not usable. /// /// /// public HRESULT TemplateStatus; /// The reason that the most recent sample is unusable, if the value of the TemplateStatus member is WINBIO_E_BAD_CAPTURE. public WINBIO_REJECT_DETAIL RejectDetail; /// /// The best estimate from the engine adapter for the percentage of the template that is complete, as a value from 0 to 100. /// public uint PercentComplete; /// /// The type of biometric unit for which this structure contains information about capabilities and enrollment requirements of /// the engine adapter. For example, if the value of the Factor member is WINBIO_TYPE_FINGERPRINT, the /// WINBIO_EXTENDED_ENGINE_INFO structure applies to a fingerprint reader and contains the relevant information in the /// Specifc.Fingerprint structure. /// public WINBIO_BIOMETRIC_TYPE Factor; /// A WINBIO_BIOMETRIC_SUBTYPE value that provides additional information about the enrollment. public WINBIO_BIOMETRIC_SUBTYPE SubFactor; /// Information about the status of an enrollment that is in progress for a specific biometric factor. public SPECIFIC Specific; /// Information about the status of an enrollment that is in progress for a specific biometric factor. [StructLayout(LayoutKind.Explicit)] public struct SPECIFIC { /// Reserved. Must be zero. [FieldOffset(0)] public uint Null; /// Information about the status of an enrollment that is in progress for facial features. [FieldOffset(0)] public FACIALFEATURES FacialFeatures; /// Information about the status of an enrollment that is in progress for facial features. [StructLayout(LayoutKind.Sequential)] public struct FACIALFEATURES { /// /// The position within the camera frame of the face of the individual to enroll, in pixels. The size of the camera /// frame determines the upper limit on the number of pixels for this position. Get the /// WINBIO_PROPERTY_EXTENDED_SENSOR_INFO property to determine the size of the camera frame. A client that uses the /// presence monitor must perform the scaling operation to map the position to the camera frame. /// public RECT BoundingBox; /// /// The distance between the actual location of the face and the ideal focal distance for the face. This value ranges /// from -100 to 100. 0 indicates the ideal distance, positive values indicate that the actual location of the face is /// too far away, and negative values indicate that the actual location is too close. /// public int Distance; /// public OPAQUEENGINEDATA OpaqueEngineData; /// [StructLayout(LayoutKind.Sequential, Size = 16 + (4 * 77))] public struct OPAQUEENGINEDATA { /// public Guid AdapterId; /// public uint Data; } } /// Information about the status of an enrollment that is in progress for fingerprint patterns. [FieldOffset(0)] public FINGERPRINT Fingerprint; /// Information about the status of an enrollment that is in progress for fingerprint patterns. [StructLayout(LayoutKind.Sequential)] public struct FINGERPRINT { /// The total number of good samples required to create a new fingerprint template. public uint GeneralSamples; /// The number of good samples for the center of the fingerprint required to create a new fingerprint template. public uint Center; /// /// The number of good samples for the top edge of the fingerprint required to create a new fingerprint template. /// public uint TopEdge; /// /// The number of good samples for the bottom edge of the fingerprint required to create a new fingerprint template. /// public uint BottomEdge; /// /// The number of good samples for the left edge of the fingerprint required to create a new fingerprint template. /// public uint LeftEdge; /// /// The number of good samples for the right edge of the fingerprint required to create a new fingerprint template. /// public uint RightEdge; } /// Information about the status of an enrollment that is in progress for iris patterns. [FieldOffset(0)] public IRIS Iris; /// Information about the status of an enrollment that is in progress for iris patterns. [StructLayout(LayoutKind.Sequential)] public struct IRIS { /// /// The position within the camera frame of one of the irises of the individual to enroll, in pixels. If the /// iris-recognition system is only monitoring one eye, this position is of the iris of that eye. If the /// iris-recognition system is monitoring both eyes, but only one eye is in the camera frame, this position is of the /// iris of the eye in the camera frame. If the iris-recognition system is monitoring both eyes, and both eyes are in /// the camera frame, this position is probably of the iris of the right eye of the individual. /// /// The size of the camera frame determines the upper limit on the number of pixels for this position.Get the /// WINBIO_PROPERTY_EXTENDED_SENSOR_INFO property to determine the size of the camera frame.A client that uses the /// presence monitor must perform the scaling operation to map the position to the camera frame. /// /// public RECT EyeBoundingBox_1; /// /// The position within the camera frame of one of the irises of the individual to enroll, in pixels. If the /// iris-recognition system is only monitoring one eye, or if only one eye is in the camera frame, this value is empty. /// If the iris-recognition system is monitoring both eyes, and both eyes are in the camera frame, this position is /// probably of iris of the left eye of the individual. /// /// The size of the camera frame determines the upper limit on the number of pixels for this position.Get the /// WINBIO_PROPERTY_EXTENDED_SENSOR_INFO property to determine the size of the camera frame.A client that uses the /// presence monitor must perform the scaling operation to map the position to the camera frame. /// /// public RECT EyeBoundingBox_2; /// /// The position of the center of one of the pupils of the individual to enroll. If the iris-recognition system is only /// monitoring one eye, this position is of the center of the pupil of that eye. If the iris-recognition system is /// monitoring both eyes, but only one eye is in the camera frame, this position is of the center of the pupil of the /// eye in the camera frame. If the iris-recognition system is monitoring both eyes, and both eyes are in the camera /// frame, this position is probably of the center of the pupil of the right eye of the individual. /// public POINT PupilCenter_1; /// /// The position of the center of one of the pupils of the individual to enroll. If the iris-recognition system is only /// monitoring one eye, or if only one eye is in the camera frame, this value is empty. If the iris-recognition system /// is monitoring both eyes, and both eyes are in the camera frame, this position is probably of the center of the pupil /// of the left eye of the individual. /// public POINT PupilCenter_2; /// /// The distance between the actual location of the iris and the ideal focal distance for the iris. This value ranges /// from -100 to 100. 0 indicates the ideal distance, positive values indicate that the actual location of the iris is /// too far away, and negative values indicate that the actual location is too close. /// public int Distance; /// public uint GridPointCompletionPercent; /// public ushort GridPointIndex; /// public POINT3D Point3D; /// public BOOL StopCaptureAndShowCriticalFeedback; /// [StructLayout(LayoutKind.Sequential)] public struct POINT3D { /// public double X; /// public double Y; /// public double Z; } } /// Information about the status of an enrollment that is in progress for voice patterns. [FieldOffset(0)] public VOICE Voice; /// Information about the status of an enrollment that is in progress for voice patterns. [StructLayout(LayoutKind.Sequential)] public struct VOICE { /// Reserved. Must be zero. public uint Reserved; } } } /// Contains information about the capabilities and enrollment requirements of the sensor adapter for a biometric unit. // https://docs.microsoft.com/en-us/windows/win32/secbiomet/winbio-extended-sensor-info typedef struct _WINBIO_EXTENDED_SENSOR_INFO // { WINBIO_CAPABILITIES GenericSensorCapabilities; WINBIO_BIOMETRIC_TYPE Factor; union { ULONG32 Null; struct { RECT FrameSize; // POINT FrameOffset; WINBIO_ORIENTATION MandatoryOrientation; } FacialFeatures; struct { ULONG32 Reserved; } Fingerprint; struct { // RECT FrameSize; POINT FrameOffset; WINBIO_ORIENTATION MandatoryOrientation; } Iris; struct { ULONG32 Reserved; } Voice; } // Specific; } WINBIO_EXTENDED_SENSOR_INFO, *PWINBIO_EXTENDED_SENSOR_INFO; [PInvokeData("")] [StructLayout(LayoutKind.Sequential)] public struct WINBIO_EXTENDED_SENSOR_INFO { /// The generic capabilities of the sensor component that is connected to a specific biometric unit. public WINBIO_CAPABILITIES GenericSensorCapabilities; /// /// The type of biometric unit for which this structure contains information about capabilities and enrollment requirements of /// the sensor adapter. For example, if the value of the Factor member is WINBIO_TYPE_FINGERPRINT, the /// WINBIO_EXTENDED_SENSOR_INFO structure applies to a fingerprint reader and contains the relevant information in the /// Specifc.Fingerprint structure. /// public WINBIO_BIOMETRIC_TYPE Factor; /// /// Information about the capabilities and enrollment requirements of the sensor adapter for a biometric unit related to a /// specific biometric factor. /// public SPECIFIC Specific; /// /// Information about the capabilities and enrollment requirements of the sensor adapter for a biometric unit related to a /// specific biometric factor. /// [StructLayout(LayoutKind.Explicit)] public struct SPECIFIC { /// Reserved. Must be zero. [FieldOffset(0)] public uint Null; /// /// Information about the capabilities and enrollment requirements of the sensor adapter for a biometric unit related to /// facial features. /// [FieldOffset(0)] public FACIALFEATURES FacialFeatures; /// /// Information about the capabilities and enrollment requirements of the sensor adapter for a biometric unit related to /// facial features. /// [StructLayout(LayoutKind.Sequential)] public struct FACIALFEATURES { /// /// The size of the camera frame, indicated as a length and width in pixels by the right and bottom members of the RECT /// structure. The point (0, 0) represents the top-left corner of the frame. /// public RECT FrameSize; /// /// The offset of the camera frame for the face from the video camera, in pixels. A value of (0, 0) indicates that the /// camera frame for the face and the video camera completely overlap. /// public POINT FrameOffset; /// The preferred orientation for the camera. public WINBIO_ORIENTATION MandatoryOrientation; /// public HARDWAREINFO HardwareInfo; /// [StructLayout(LayoutKind.Sequential, Size = 260 * 2 * 2 + 4)] public struct HARDWAREINFO { private readonly byte first; /// public string? ColorSensorId { get { unsafe { fixed (byte* ptr = &first) { return StringHelper.GetString((IntPtr)(ptr + 0), CharSet.Unicode, 260 * 2); } } } } /// public string? InfraredSensorId { get { unsafe { fixed (byte* ptr = &first) { return StringHelper.GetString((IntPtr)(ptr + 260 * 2), CharSet.Unicode, 260 * 2); } } } } /// public uint InfraredSensorRotationAngle { get { unsafe { fixed (byte* ptr = &first) { return *(uint*)(ptr + 260 * 4); } } } } } } /// /// Information about the capabilities and enrollment requirements of the sensor adapter for a biometric unit related to /// fingerprint patterns. /// [FieldOffset(0)] public FINGERPRINT Fingerprint; /// /// Information about the capabilities and enrollment requirements of the sensor adapter for a biometric unit related to /// fingerprint patterns. /// [StructLayout(LayoutKind.Sequential)] public struct FINGERPRINT { /// Reserved. public uint Reserved; } /// Information about the status of an enrollment that is in progress for iris patterns. [FieldOffset(0)] public IRIS Iris; /// Information about the status of an enrollment that is in progress for iris patterns. [StructLayout(LayoutKind.Sequential)] public struct IRIS { /// /// The size of the camera frame, indicated as a length and width in pixels by the right and bottom members of the RECT /// structure. The point (0, 0) represents the top-left corner of the frame. /// public RECT FrameSize; /// /// The offset of the camera frame for the face from the video camera, in pixels. A value of (0, 0) indicates that the /// camera frame for the face and the video camera completely overlap. /// public POINT FrameOffset; /// The preferred orientation for the camera. public WINBIO_ORIENTATION MandatoryOrientation; } /// Information about the status of an enrollment that is in progress for voice patterns. [FieldOffset(0)] public VOICE Voice; /// Information about the status of an enrollment that is in progress for voice patterns. [StructLayout(LayoutKind.Sequential)] public struct VOICE { /// Reserved. public uint Reserved; } } } /// Contains information about the capabilities and enrollment requirements of the storage adapter for a biometric unit. // https://docs.microsoft.com/en-us/windows/win32/secbiomet/winbio-extended-storage-info typedef struct // _WINBIO_EXTENDED_STORAGE_INFO { WINBIO_CAPABILITIES GenericStorageCapabilities; WINBIO_BIOMETRIC_TYPE Factor; union { ULONG32 // Null; struct { WINBIO_CAPABILITIES Capabilities; } FacialFeatures; struct { WINBIO_CAPABILITIES Capabilities; } Fingerprint; // struct { WINBIO_CAPABILITIES Capabilities; } Iris; struct { WINBIO_CAPABILITIES Capabilities; } Voice; } Specific; } // WINBIO_EXTENDED_STORAGE_INFO, *PWINBIO_EXTENDED_STORAGE_INFO; [PInvokeData("")] [StructLayout(LayoutKind.Sequential)] public struct WINBIO_EXTENDED_STORAGE_INFO { /// The generic capabilities of the storage component that is connected to a specific biometric unit. public WINBIO_CAPABILITIES GenericStorageCapabilities; /// /// The type of biometric unit for which this structure contains information about capabilities and enrollment requirements of /// the storage adapter. For example, if the value of the Factor member is WINBIO_TYPE_FINGERPRINT, the /// WINBIO_EXTENDED_STORAGE_INFO structure applies to a fingerprint reader and contains the relevant information in the /// Specifc.Fingerprint structure. /// public WINBIO_BIOMETRIC_TYPE Factor; /// /// Information about the capabilities and enrollment requirements of the engine adapter for a biometric unit related to a /// specific biometric factor. /// public SPECIFIC Specific; /// /// Information about the capabilities and enrollment requirements of the engine adapter for a biometric unit related to a /// specific biometric factor. /// [StructLayout(LayoutKind.Explicit)] public struct SPECIFIC { /// Reserved. Must be zero. [FieldOffset(0)] public uint Null; /// /// Information about the capabilities and enrollment requirements of the engine adapter for a biometric unit related to /// facial features. /// [FieldOffset(0)] public FACIALFEATURES FacialFeatures; /// /// Information about the capabilities and enrollment requirements of the engine adapter for a biometric unit related to /// facial features. /// [StructLayout(LayoutKind.Sequential)] public struct FACIALFEATURES { /// Reserved. Must be zero. public WINBIO_CAPABILITIES Capabilities; } /// /// Information about the capabilities and enrollment requirements of the engine adapter for a biometric unit related to /// fingerprint patterns. /// [FieldOffset(0)] public FINGERPRINT Fingerprint; /// /// Information about the capabilities and enrollment requirements of the engine adapter for a biometric unit related to /// fingerprint patterns. /// [StructLayout(LayoutKind.Sequential)] public struct FINGERPRINT { /// Reserved. Must be zero. public WINBIO_CAPABILITIES Capabilities; } /// /// Information about the capabilities and enrollment requirements of the engine adapter for a biometric unit related to /// iris patterns. /// [FieldOffset(0)] public IRIS Iris; /// /// Information about the capabilities and enrollment requirements of the engine adapter for a biometric unit related to /// iris patterns. /// [StructLayout(LayoutKind.Sequential)] public struct IRIS { /// Reserved. Must be zero. public WINBIO_CAPABILITIES Capabilities; } /// /// Information about the capabilities and enrollment requirements of the engine adapter for a biometric unit related to /// voice patterns. /// [FieldOffset(0)] public VOICE Voice; /// /// Information about the capabilities and enrollment requirements of the engine adapter for a biometric unit related to /// voice patterns. /// [StructLayout(LayoutKind.Sequential)] public struct VOICE { /// Reserved. Must be zero. public WINBIO_CAPABILITIES Capabilities; } } } /// [PInvokeData("winbio_types.h")] [StructLayout(LayoutKind.Sequential)] public struct WINBIO_EXTENDED_UNIT_STATUS { /// public WINBIO_SENSOR_STATUS Availability; /// public uint ReasonCode; } /// The WINBIO_IDENTITY structure contains an identifying value associated with a biometric template. /// /// This structure is used in the following functions: /// /// /// WinBioDeleteTemplate /// /// /// WinBioEnrollCommit /// /// /// WinBioEnumEnrollments /// /// /// WinBioGetCredentialState /// /// /// WinBioIdentify /// /// /// WinBioRemoveCredential /// /// /// WinBioVerify /// /// /// WinBioVerifyWithCallback /// /// /// // https://docs.microsoft.com/en-us/windows/win32/secbiomet/winbio-identity typedef struct _WINBIO_IDENTITY { WINBIO_IDENTITY_TYPE // Type; union { ULONG Null; ULONG Wildcard; GUID TemplateGuid; struct { ULONG Size; UCHAR Data[SECURITY_MAX_SID_SIZE]; } // AccountSid; } Value; } WINBIO_IDENTITY; [PInvokeData("winbio_types.h")] [StructLayout(LayoutKind.Sequential)] public struct WINBIO_IDENTITY { /// /// Specifies the format of the identity information contained in this structure. This can be one of the following values: /// /// /// Value /// Meaning /// /// /// WINBIO_ID_TYPE_NULL /// The template has no associated ID. /// /// /// WINBIO_ID_TYPE_WILDCARD /// The structure matches all template identities. /// /// /// WINBIO_ID_TYPE_GUID /// The structure contains a GUID associated with the template. /// /// /// WINBIO_ID_TYPE_SID /// The structure contains the account SID associated with the template. /// /// /// public WINBIO_IDENTITY_TYPE Type; /// A union that can contain one of the following values: public VALUE Value; /// A union that can contain one of the following values: [StructLayout(LayoutKind.Explicit)] public struct VALUE { private const int SECURITY_MAX_SID_SIZE = 68; private const int WINBIO_IDENTITY_SECURE_ID_SIZE = 32; /// Contains 1 if the Type member is WINBIO_ID_TYPE_NULL. [FieldOffset(0)] public uint Null; /// Contains 1 if the Type member is WINBIO_ID_TYPE_WILDCARD. [FieldOffset(0)] public uint Wildcard; /// Contains a 128-bit GUID value that identifies the template if the Type member is WINBIO_ID_TYPE_GUID. [FieldOffset(0)] public Guid TemplateGuid; /// A structure that contains an account SID if the Type member is WINBIO_ID_TYPE_SID. [FieldOffset(0)] public ACCOUNTSID AccountSid; /// public byte[] SecureId { get { unsafe { fixed (void* d = &Null) { var ret = new byte[WINBIO_IDENTITY_SECURE_ID_SIZE]; Marshal.Copy((IntPtr)d, ret, 0, WINBIO_IDENTITY_SECURE_ID_SIZE); return ret; } } } } /// A structure that contains an account SID if the Type member is WINBIO_ID_TYPE_SID. [StructLayout(LayoutKind.Sequential, Size = 4 + SECURITY_MAX_SID_SIZE)] public struct ACCOUNTSID { /// The number of characters in the SID. public uint Size; private readonly byte _Data; /// An array of unsigned characters that contain the SID. The current maximum size of the array is 68 characters. public byte[] Data { get { unsafe { fixed (void* d = &_Data) { var ret = new byte[SECURITY_MAX_SID_SIZE]; Marshal.Copy((IntPtr)d, ret, 0, SECURITY_MAX_SID_SIZE); return ret; } } } } } } } /// Contains information about the presence of an individual whose presence is being monitored. /// /// /// The EngineAdapterIdentifyAll function creates an array of WINBIO_PRESENCE structures and sends this array to the /// biometric service. The biometric service uses the array to update its internal model of humans near the computer. /// /// /// Depending on the results of this update, the biometric service may generate a WINBIO_ASYNC_RESULT structure for the /// WinBioMonitorPresence function for any clients with active presence monitors. The WINBIO_ASYNC_RESULT.Operation /// member of the structure contains WINBIO_OPERATION_MONITOR_PRESENCE, and the /// WINBIO_ASYNC_RESULT.Parameters.MonitorPresence.ChangeType member provides additional information about the state of the individual. /// /// /// When an individual that the engine adapter associates with a particular tracking identifier appears in the input stream for the /// first time, the biometric service generates a client-side WINBIO_ASYNC_RESULT structure where the /// WINBIO_ASYNC_RESULT.Parameters.MonitorPresence.ChangeType member is WINBIO_CHANGE_TYPE_ARRIVAL. This structure is /// sent to your application callback function or application message queue before any other WINBIO_ASYNC_RESULT structures /// where the WINBIO_ASYNC_RESULT.Parameters.MonitorPresence.PresenceArray includes a WINBIO_PRESENCE structure with /// the same value for WINBIO_PRESENCE.TrackingId. /// /// /// The following combinations of values in the array of WINBIO_PRESENCE structures that the /// WINBIO_ASYNC_RESULT.Parameters.MonitorPresence.PresenceArray member indicate specific kinds of changes in the state of an individual. /// /// /// /// /// /// When an individual is visible in the camera frame, but the engine is still trying to identify the individual, the members of the /// WINBIO_PRESENCE structure have the values in the following table. /// /// /// In this case, the biometric service extends the expiry time for the individual, and does not generate a client-side /// WINBIO_ASYNC_RESULT structure for the tracking identifier where the /// WINBIO_ASYNC_RESULT.Parameters.MonitorPresence.ChangeType member is WINBIO_CHANGE_TYPE_RECOGNIZE. /// /// /// The first time that a WINBIO_ASYNC_RESULT structure includes WINBIO_PRESENCE structure where the Status /// member is S_OK and the Identity.Type member is WINBIO_ID_TYPE_NULL after one or more /// WINBIO_ASYNC_RESULT structures included a WINBIO_PRESENCE structure with a Status member of /// WINBIO_E_BAD_CAPTURE, the presence monitor generates a single WINBIO_ASYNC_RESULT structure for the tracking /// identifier where the WINBIO_ASYNC_RESULT.Parameters.MonitorPresence.ChangeType member is WINBIO_CHANGE_TYPE_TRACK. /// This WINBIO_ASYNC_RESULT structure where the WINBIO_ASYNC_RESULT.Parameters.MonitorPresence.ChangeType member is /// WINBIO_CHANGE_TYPE_TRACK informs the client that the problem that caused the WINBIO_E_BAD_CAPTURE error has /// resolved. For more information about the circumstances where a WINBIO_PRESENCE structure has Status member of /// WINBIO_E_BAD_CAPTURE, see the description about how the engine adapter provides feedback to the user to correct /// recognition failures later in these Remarks. /// /// /// /// /// /// /// When an individual is visible in the camera frame, but the engine is still trying to identify the individual and wants to /// provide feedback to the user about how to correct a recognition failure, the members of the WINBIO_PRESENCE structure /// have the values in the following table. /// /// /// In this case, the biometric service extends the expiry time for for the individual and generates a WINBIO_ASYNC_RESULT /// structure for the tracking identifier where the WINBIO_ASYNC_RESULT.Parameters.MonitorPresence.ChangeType member is WINBIO_CHANGE_TYPE_TRACK. /// /// /// /// /// /// /// When an individual is visible in the camera frame, and the engine adapter determines the identity of the individual, the members /// of the WINBIO_PRESENCE structure have the values in the following table. /// /// /// In this case, the biometric service associates the tracking identifier with the SID for the individual and generates a /// client-side WINBIO_ASYNC_RESULT structure for the tracking identifier where the /// WINBIO_ASYNC_RESULT.Parameters.MonitorPresence.ChangeType member is WINBIO_CHANGE_TYPE_RECOGNIZE. The biometric /// service does not generate additional client-side WINBIO_ASYNC_RESULT structures for the tracking identifier unless the /// individual leaves the camera frame. /// /// /// /// /// /// /// When an individual is visible in the camera frame, but the engine adapter determines for certain that the individual is not /// enrolled, the members of the WINBIO_PRESENCE structure have the values in the following table. /// /// /// In this case, the biometric service associates the tracking identifier of the individual with an identity of UNKNOWN, and /// generates a client-side WINBIO_ASYNC_RESULT structure for the tracking identifier where the /// WINBIO_ASYNC_RESULT.Parameters.MonitorPresence.ChangeType member is WINBIO_CHANGE_TYPE_RECOGNIZE. The biometric /// service does not generate additional client-side WINBIO_ASYNC_RESULT structures for the tracking identifier unless the /// individual leaves the camera frame. /// /// /// /// /// /// When an individual that the engine adapter associates with a particular tracking identifier leaves the camera frame and stops /// appearing in the values that the EngineAdapterIdentifyAll function returns, the tracking identifier eventually expires. /// When the tracking identifier expires, the biometric service generates a client-side WINBIO_ASYNC_RESULT structure where /// the WINBIO_ASYNC_RESULT.Parameters.MonitorPresence.ChangeType member is WINBIO_CHANGE_TYPE_DEPART. The engine /// adapter can prevent the biometric service from generating this structure with the WINBIO_CHANGE_TYPE_DEPART value by /// including a WINBIO_PRESENCE structure in the array that EngineAdapterIdentifyAll returns, where the /// WINBIO_PRESENCE.Status member is S_OK and the WINBIO_PRESENCE.Identity.Type member is /// WINBIO_ID_TYPE_NULL as described earlier in these Remarks. This action extends the expiry time for the tracking /// identifier without causing any client-side activity. /// /// // https://docs.microsoft.com/en-us/windows/win32/secbiomet/winbio-presence typedef struct _WINBIO_PRESENCE { WINBIO_BIOMETRIC_TYPE // Factor; WINBIO_BIOMETRIC_SUBTYPE SubFactor; HRESULT Status; WINBIO_REJECT_DETAIL RejectDetail; WINBIO_IDENTITY Identity; // ULONGLONG TrackingId; ulong Ticket; WINBIO_PRESENCE_PROPERTIES Properties; } WINBIO_PRESENCE, *PWINBIO_PRESENCE; [PInvokeData("winbio_types.h")] [StructLayout(LayoutKind.Sequential, Pack = 4)] public struct WINBIO_PRESENCE { /// The biometric factor used to monitor the presence of the individual. public WINBIO_BIOMETRIC_TYPE Factor; /// The biometric subfactor qualifier for the biometric factor used to monitor the presence of the individual. public WINBIO_BIOMETRIC_SUBTYPE SubFactor; /// The status of the identification procedure for the individual. public HRESULT Status; /// /// Additional information about the failure to recognize an individual, including feedback that explains how to correct the failure. /// public WINBIO_REJECT_DETAIL RejectDetail; /// The identity of the individual whose presence is being monitored, once that individual has been identified. public WINBIO_IDENTITY Identity; private readonly uint pad1; /// /// An integer that is generated by the adapter and uniquely identifies the individual. The tracking identifier that the adapter /// assigns to a particular individual is guaranteed to be constant as long as that person remains in the camera frame. /// public ulong TrackingId; /// Reserved. Set to 0 by the adapter. public ulong Ticket; /// Factor-specific information about the position of an individual. public WINBIO_PRESENCE_PROPERTIES Properties; /// public AUTHORIZATION Authorization; private readonly uint pad2; /// [StructLayout(LayoutKind.Sequential, Size = 4 + DATASIZE)] public struct AUTHORIZATION { private const int DATASIZE = 32; /// public uint Size; private readonly byte _Data; /// public byte[] Data { get { unsafe { fixed (void* d = &_Data) { var ret = new byte[DATASIZE]; Marshal.Copy((IntPtr)d, ret, 0, DATASIZE); return ret; } } } } } } /// Contains biometric values that the Windows Biometric Framework used to determine that an individual was present. // https://docs.microsoft.com/en-us/windows/win32/secbiomet/winbio-presence-properties typedef union _WINBIO_PRESENCE_PROPERTIES { // struct { RECT BoundingBox; LONG Distance; } FacialFeatures; struct { RECT EyeBoundingBox_1; RECT EyeBoundingBox_2; POINT // PupilCenter_1; POINT PupilCenter_2; LONG Distance; } Iris; } WINBIO_PRESENCE_PROPERTIES, *PWINBIO_PRESENCE_PROPERTIES; [PInvokeData("winbio_types.h")] [StructLayout(LayoutKind.Explicit)] public struct WINBIO_PRESENCE_PROPERTIES { /// /// Values for the location of facial features that the Windows Biometric Framework used to determine that an individual was present. /// [FieldOffset(0)] public FACIALFEATURES FacialFeatures; /// Values for iris location that the Windows Biometric Framework used to determine that an individual was present. [FieldOffset(0)] public IRIS Iris; /// /// Values for the location of facial features that the Windows Biometric Framework used to determine that an individual was present. /// [StructLayout(LayoutKind.Sequential)] public struct FACIALFEATURES { /// /// The position within the camera frame of the face of the individual, in pixels. The size of the camera frame determines /// the upper limit on the number of pixels for this position. Get the WINBIO_PROPERTY_EXTENDED_SENSOR_INFO property to /// determine the size of the camera frame. A client that uses the presence monitor must perform the scaling operation to /// map the position to the camera frame . /// public RECT BoundingBox; /// /// The distance between the actual location of the face and the ideal focal distance for the face. This value ranges from /// -100 to 100. 0 indicates the ideal distance, positive values indicate that the actual location of the face is too far /// away, and negative values indicate that the actual location is too close. /// public int Distance; /// public OPAQUEENGINEDATA OpaqueEngineData; /// [StructLayout(LayoutKind.Sequential, Size = 16 + (WINBIO_OPAQUE_ENGINE_DATA_ITEM_COUNT * 4))] public struct OPAQUEENGINEDATA { private const int WINBIO_OPAQUE_ENGINE_DATA_ITEM_COUNT = 77; /// public Guid AdapterId; /// private readonly uint _Data; /// public uint[] Data { get { unsafe { fixed (void* d = &_Data) { var ret = new SafeCoTaskMemHandle(WINBIO_OPAQUE_ENGINE_DATA_ITEM_COUNT * 4); InteropExtensions.CopyTo((IntPtr)d, ret, ret.Size); return ret.ToArray(WINBIO_OPAQUE_ENGINE_DATA_ITEM_COUNT); } } } } } } /// Values for iris location that the Windows Biometric Framework used to determine that an individual was present. [StructLayout(LayoutKind.Sequential)] public struct IRIS { /// /// The position within the camera frame of one of the irises of the individual to enroll, in pixels. If the /// iris-recognition system is only monitoring one eye, this position is of the iris of that eye. If the iris-recognition /// system is monitoring both eyes, but only one eye is in the camera frame, this position is of the iris of the eye in the /// camera frame. If the iris-recognition system is monitoring both eyes, and both eyes are in the camera frame, this /// position is probably of the iris of the right eye of the individual. /// /// The size of the camera frame determines the upper limit on the number of pixels for this position.Get the /// WINBIO_PROPERTY_EXTENDED_SENSOR_INFO property to determine the size of the camera frame.A client that uses the presence /// monitor must perform the scaling operation to map the position to the camera frame. /// /// public RECT EyeBoundingBox_1; /// /// The position within the camera frame of one of the irises of the individual to enroll, in pixels. If the /// iris-recognition system is only monitoring one eye, or if only one eye is in the camera frame, this value is empty. If /// the iris-recognition system is monitoring both eyes, and both eyes are in the camera frame, this position is probably of /// iris of the left eye of the individual. /// /// The size of the camera frame determines the upper limit on the number of pixels for this position.Get the /// WINBIO_PROPERTY_EXTENDED_SENSOR_INFO property to determine the size of the camera frame.A client that uses the presence /// monitor must perform the scaling operation to map the position to the camera frame. /// /// public RECT EyeBoundingBox_2; /// /// The position of the center of one of the pupils of the individual to enroll. If the iris-recognition system is only /// monitoring one eye, this position is of the center of the pupil of that eye. If the iris-recognition system is /// monitoring both eyes, but only one eye is in the camera frame, this position is of the center of the pupil of the eye in /// the camera frame. If the iris-recognition system is monitoring both eyes, and both eyes are in the camera frame, this /// position is probably of the center of the pupil of the right eye of the individual. /// public POINT PupilCenter_1; /// /// The position of the center of one of the pupils of the individual to enroll. If the iris-recognition system is only /// monitoring one eye, or if only one eye is in the camera frame, this value is empty. If the iris-recognition system is /// monitoring both eyes, and both eyes are in the camera frame, this position is probably of the center of the pupil of the /// left eye of the individual. /// public POINT PupilCenter_2; /// /// The distance between the actual location of the iris and the ideal focal distance for the iris. This value ranges from /// -100 to 100. 0 indicates the ideal distance, positive values indicate that the actual location of the iris is too far /// away, and negative values indicate that the actual location is too close. /// public int Distance; } } /// [PInvokeData("winbio_types.h")] [StructLayout(LayoutKind.Sequential, Pack = 4)] public struct WINBIO_PROTECTION_POLICY { /// public uint Version; /// public WINBIO_IDENTITY Identity; /// public Guid DatabaseId; /// public ulong UserState; /// public SizeT PolicySize; private readonly Guid _Policy1; private readonly Guid _Policy2; private readonly Guid _Policy3; private readonly Guid _Policy4; private readonly Guid _Policy5; private readonly Guid _Policy6; private readonly Guid _Policy7; private readonly Guid _Policy8; private readonly uint pad; /// public byte[] Policy { get { unsafe { fixed (void* d = &_Policy1) { var ret = new byte[128]; Marshal.Copy((IntPtr)d, ret, 0, 128); return ret; } } } } } /// The WINBIO_REGISTERED_FORMAT structure specifies a registered data format as an owner/format pair. /// /// /// Because Windows currently supports only fingerprint readers, the following values should be used in the /// WINBIO_REGISTERED_FORMAT structure. /// /// /// /// Constant /// Meaning /// /// /// WINBIO_ANSI_381_FORMAT_OWNER /// InterNational Committee for Information Technology Standards (INCITS) technical committee M1 (biometrics). /// /// /// WINBIO_ANSI_381_FORMAT_TYPE /// ANSI INCITS 381 finger image based data interchange format. /// /// /// // https://docs.microsoft.com/en-us/windows/win32/secbiomet/winbio-registered-format typedef struct _WINBIO_REGISTERED_FORMAT { // USHORT Owner; USHORT Type; } WINBIO_REGISTERED_FORMAT, *PWINBIO_REGISTERED_FORMAT; [PInvokeData("winbio_types.h")] [StructLayout(LayoutKind.Sequential)] public struct WINBIO_REGISTERED_FORMAT { /// An IBIA (International Biometric Industry Association) assigned owner value. public ushort Owner; /// An owner assigned format. public ushort Type; } /// /// The WINBIO_STORAGE_SCHEMA structure describes the capabilities of a biometric storage adapter. This structure is used by /// the WinBioEnumDatabases function. /// // https://docs.microsoft.com/en-us/windows/win32/secbiomet/winbio-storage-schema typedef struct _WINBIO_STORAGE_SCHEMA { // WINBIO_BIOMETRIC_TYPE BiometricFactor; WINBIO_UUID DatabaseId; WINBIO_UUID DataFormat; ULONG Attributes; WINBIO_STRING FilePath; // WINBIO_STRING ConnectionString; } WINBIO_STORAGE_SCHEMA, *PWINBIO_STORAGE_SCHEMA; [PInvokeData("winbio_types.h")] [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] public struct WINBIO_STORAGE_SCHEMA { /// The type of biometric measurement saved in the database. public WINBIO_BIOMETRIC_TYPE BiometricFactor; /// A GUID that identifies the database. public Guid DatabaseId; /// A GUID that identifies the format of the templates in the database. public Guid DataFormat; /// /// Information about the characteristics of the database. This can be a bitwise OR of the following constants. /// /// /// Value /// Meaning /// /// /// WINBIO_DATABASE_FLAG_MASK 0xFFFF0000 /// Represents a mask for the flag bits. /// /// /// WINBIO_DATABASE_FLAG_REMOTE 0x00020000 /// The database resides on a remote computer. /// /// /// WINBIO_DATABASE_FLAG_REMOVABLE 0x00010000 /// The database resides on a removable drive. /// /// /// WINBIO_DATABASE_TYPE_DBMS 0x00000002 /// The database is managed by a database management system. /// /// /// WINBIO_DATABASE_TYPE_FILE 0x00000001 /// The database is contained in a file. /// /// /// WINBIO_DATABASE_TYPE_MASK 0x0000FFFF /// Represents a mask for the type bits. /// /// /// WINBIO_DATABASE_TYPE_ONCHIP 0x00000003 /// The database resides on the biometric sensor. /// /// /// WINBIO_DATABASE_TYPE_SMARTCARD 0x00000004 /// The database resides on a smart card. /// /// /// public WINBIO_DATABASE Attributes; /// The path and file name of the database if it resides on the computer disk. [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] public string FilePath; /// A string value that can be sent to a database server to identify the database. [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] public string ConnectionString; } /// /// The WINBIO_UNIT_SCHEMA structure describes the capabilities of a biometric unit. It is used by the /// WinBioEnumBiometricUnits function. /// // https://docs.microsoft.com/en-us/windows/win32/secbiomet/winbio-unit-schema typedef struct _WINBIO_UNIT_SCHEMA { WINBIO_UNIT_ID // UnitId; WINBIO_POOL_TYPE PoolType; WINBIO_BIOMETRIC_TYPE BiometricFactor; WINBIO_BIOMETRIC_SENSOR_SUBTYPE SensorSubType; // WINBIO_CAPABILITIES Capabilities; WINBIO_STRING DeviceInstanceId; WINBIO_STRING Description; WINBIO_STRING Manufacturer; // WINBIO_STRING Model; WINBIO_STRING SerialNumber; WINBIO_VERSION FirmwareVersion; } WINBIO_UNIT_SCHEMA, *PWINBIO_UNIT_SCHEMA; [PInvokeData("winbio_types.h")] [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] public struct WINBIO_UNIT_SCHEMA { /// A value that identifies the biometric unit. public uint UnitId; /// /// A ULONG value that specifies the type of the biometric unit. This can be one of the following values: /// /// /// Value /// Meaning /// /// /// WINBIO_POOL_UNKNOWN /// The type is unknown. /// /// /// WINBIO_POOL_SYSTEM /// The session connects to a shared collection of biometric units managed by the service provider. /// /// /// WINBIO_POOL_PRIVATE /// The session connects to a collection of biometric units that are managed by the caller. /// /// /// public WINBIO_POOL_TYPE PoolType; /// A value that specifies the type of the biometric unit. Only WINBIO_TYPE_FINGERPRINT is currently supported. public WINBIO_BIOMETRIC_TYPE BiometricFactor; /// /// /// A sensor subtype defined for the biometric type specified by the BiometricFactor member. Only fingerprint types ( /// WINBIO_TYPE_FINGERPRINT) are currently supported. The following subtypes are currently defined for fingerprints: /// /// /// /// WINBIO_SENSOR_SUBTYPE_UNKNOWN /// /// /// WINBIO_FP_SENSOR_SUBTYPE_SWIPE /// /// /// WINBIO_FP_SENSOR_SUBTYPE_TOUCH /// /// /// public WINBIO_BIOMETRIC_SENSOR_SUBTYPE SensorSubType; /// /// A bitmask of the biometric sensor capabilities. This can be a bitwise OR of the following values: /// /// /// WINBIO_CAPABILITY_SENSOR /// /// /// WINBIO_CAPABILITY_MATCHING /// /// /// WINBIO_CAPABILITY_DATABASE /// /// /// WINBIO_CAPABILITY_PROCESSING /// /// /// WINBIO_CAPABILITY_ENCRYPTION /// /// /// WINBIO_CAPABILITY_NAVIGATION /// /// /// WINBIO_CAPABILITY_INDICATOR /// /// /// WINBIO_CAPABILITY_VIRTUAL_SENSOR /// /// /// public WINBIO_CAPABILITIES Capabilities; /// /// A string value that contains the device ID. The string can contain up to 256 Unicode characters including a terminating /// NULL character. /// [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] public string DeviceInstanceId; /// /// 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. /// [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] public string Description; /// /// A string value that contains the name of the manufacturer. The string can contain up to 256 Unicode characters including a /// terminating NULL character. /// [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] public string Manufacturer; /// /// 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. /// [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] public string Model; /// /// 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. /// [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] public string SerialNumber; /// A WINBIO_VERSION structure that contains the major and minor version numbers for the biometric unit. public WINBIO_VERSION FirmwareVersion; } /// The WINBIO_VERSION structure contains the software version number of a biometric service provider component. // https://docs.microsoft.com/en-us/windows/win32/secbiomet/winbio-version typedef struct _WINBIO_VERSION { DWORD MajorVersion; // DWORD MinorVersion; } WINBIO_VERSION, *PWINBIO_VERSION; [PInvokeData("winbio_types.h")] [StructLayout(LayoutKind.Sequential)] public struct WINBIO_VERSION { /// A DWORD that contains the major version number. public uint MajorVersion; /// A DWORD that contains the minor version number. public uint MinorVersion; /// public override string ToString() => $"{MajorVersion}.{MinorVersion}"; } }