public BiometricSession(PWINBIO_IDENTIFY_CALLBACK callback) { _identifyCallback = callback; _sessionHandle = new ArrayPtr <WINBIO_SESSION_HANDLE>(); HRESULT hr = NativeFunctions.WinBioOpenSession(NativeConstants.WINBIO_TYPE_FINGERPRINT, NativeConstants.WINBIO_POOL_SYSTEM, NativeConstants.WINBIO_FLAG_DEFAULT, null, 0, null, _sessionHandle); if (hr != 0) { throw new Win32Exception(hr, "WinBioOpenSession failed"); } hr = NativeFunctions.WinBioIdentifyWithCallback(_sessionHandle[0], _identifyCallback, null); if (hr != 0) { throw new Win32Exception(hr, "WinBioIdentifyWithCallback failed"); } _isOpen = true; }
public BiometricSession(PWINBIO_IDENTIFY_CALLBACK callback) { _identifyCallback = callback; _sessionHandle = new ArrayPtr<WINBIO_SESSION_HANDLE>(); HRESULT hr = NativeFunctions.WinBioOpenSession(NativeConstants.WINBIO_TYPE_FINGERPRINT, NativeConstants.WINBIO_POOL_SYSTEM, NativeConstants.WINBIO_FLAG_DEFAULT, null, 0, null, _sessionHandle); if (hr != 0) throw new Win32Exception(hr, "WinBioOpenSession failed"); hr = NativeFunctions.WinBioIdentifyWithCallback(_sessionHandle[0], _identifyCallback, null); if (hr != 0) throw new Win32Exception(hr, "WinBioIdentifyWithCallback failed"); _isOpen = true; }
public Biometrics() { _identifyCallback = new PWINBIO_IDENTIFY_CALLBACK(IdentifyCallback); }