private void IdentifyCallback(PVOID IdentifyCallbackContext, HRESULT OperationStatus, WINBIO_UNIT_ID UnitId, WINBIO_IDENTITY Identity, WINBIO_BIOMETRIC_SUBTYPE SubFactor, WINBIO_REJECT_DETAIL RejectDetail) { switch (OperationStatus) { case S_OK: { var accountSid = Identity.Value.AccountSid[0]; var sid = new SecurityIdentifier(accountSid.Data.ToArray(accountSid.Size), 0); IdentityReference user = sid.Translate(typeof(NTAccount)); if (user != null) { IdentifySuccess(this, new AuthenticationSuccessEventArgs(user, (WinBioFinger)(int)SubFactor)); } else { IdentifyFailed(this, new AuthenticationFailedEventArgs(WinBioError.NoAccount, WinBioRejectDetail.None)); } break; } case WINBIO_E_UNKNOWN_ID: { IdentifyFailed(this, new AuthenticationFailedEventArgs(WinBioError.UnknownId, (WinBioRejectDetail)(int)RejectDetail)); break; } case WINBIO_E_BAD_CAPTURE: { IdentifyFailed(this, new AuthenticationFailedEventArgs(WinBioError.BadCapture, (WinBioRejectDetail)(int)RejectDetail)); break; } case WINBIO_E_CANCELED: break; default: { IdentifyFailed(this, new AuthenticationFailedEventArgs(WinBioError.Failed, (WinBioRejectDetail)(int)RejectDetail)); break; } } }
private void IdentifyCallback(PVOID IdentifyCallbackContext, HRESULT OperationStatus, WINBIO_UNIT_ID UnitId, WINBIO_IDENTITY Identity, WINBIO_BIOMETRIC_SUBTYPE SubFactor, WINBIO_REJECT_DETAIL RejectDetail) { switch (OperationStatus) { case S_OK: { var accountSid = Identity.Value.AccountSid[0]; var sid = new SecurityIdentifier(accountSid.Data.ToArray(accountSid.Size), 0); IdentityReference user = sid.Translate(typeof(NTAccount)); if (user != null) IdentifySuccess(this, new AuthenticationSuccessEventArgs(user, (WinBioFinger)(int)SubFactor)); else IdentifyFailed(this, new AuthenticationFailedEventArgs(WinBioError.NoAccount, WinBioRejectDetail.None)); break; } case WINBIO_E_UNKNOWN_ID: { IdentifyFailed(this, new AuthenticationFailedEventArgs(WinBioError.UnknownId, (WinBioRejectDetail)(int)RejectDetail)); break; } case WINBIO_E_BAD_CAPTURE: { IdentifyFailed(this, new AuthenticationFailedEventArgs(WinBioError.BadCapture, (WinBioRejectDetail)(int)RejectDetail)); break; } case WINBIO_E_CANCELED: break; default: { IdentifyFailed(this, new AuthenticationFailedEventArgs(WinBioError.Failed, (WinBioRejectDetail)(int)RejectDetail)); break; } } }
public static extern uint WinBioGetCredentialState(WINBIO_IDENTITY Identity, WINBIO_CREDENTIAL_TYPE Type, ref WINBIO_CREDENTIAL_STATE CredentialState);
public static extern uint WinBioEnumEnrollments(IntPtr SessionHandle, uint UnitId, WINBIO_IDENTITY Identity, ref IntPtr SubFactorArray, ref int SubFactorCount);
public static extern uint WinBioEnrollCommit(IntPtr SessionHandle, ref WINBIO_IDENTITY Identity, ref bool IsNewTemplate);
public static extern uint WinBioDeleteTemplate(IntPtr SessionHandle, uint UnitId, WINBIO_IDENTITY Identity, WINBIO_BIOMETRIC_SUBTYPE SubFactor);
public static extern uint WinBioVerify(IntPtr SessionHandle, WINBIO_IDENTITY Identity, WINBIO_BIOMETRIC_SENSOR_SUBTYPE SubFactor, ref uint UnitId, ref bool Match, ref WINBIO_REJECT_DETAIL RejectDetail);
public static extern uint WinBioRemoveCredential(WINBIO_IDENTITY Identity, WINBIO_CREDENTIAL_TYPE Type);
public static extern uint WinBioGetProperty(IntPtr SessionHandle, WINBIO_PROPERTY_TYPE PropertyType, uint PropertyId, [Optional()] uint UnidId, [Optional()] WINBIO_IDENTITY Identity, [Optional()] WINBIO_BIOMETRIC_SUBTYPE SubFactor, ref IntPtr PropertyBuffer, ref int PropertyBufferSize);