コード例 #1
0
        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;
        }
コード例 #2
0
        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;
        }
コード例 #3
0
 public Biometrics()
 {
     _identifyCallback = new PWINBIO_IDENTIFY_CALLBACK(IdentifyCallback);
 }
コード例 #4
0
 public Biometrics()
 {
     _identifyCallback = new PWINBIO_IDENTIFY_CALLBACK(IdentifyCallback);
 }