//////////////////////////////////////////////////////////////////////// // SDKBiometrics functions //////////////////////////////////////////////////////////////////////// public static void OpenScanner() { try { uint nNumDevices = 0; _rc = LumiSDKWrapper.LumiQueryNumberDevices(ref nNumDevices, _ipAddress); if (_rc != LumiSDKWrapper.LumiStatus.LUMI_STATUS_OK) { throw new Exception("Failed to query number of devices. _rc = " + _rc); } if (nNumDevices == 0) { throw new Exception("There are no Lumidigm 1s connected to the PC.\r\nPlease close the application and connect a Lumidigm Sensor."); } dev = new LumiSDKWrapper.LUMI_DEVICE(); _rc = LumiSDKWrapper.LumiQueryDevice(0, ref dev); // Query the first device if (_rc != LumiSDKWrapper.LumiStatus.LUMI_STATUS_OK) { throw new Exception("Failed to query scanner. _rc = " + _rc + "\r\n"); } uint tmpHandle = 0; _rc = LumiSDKWrapper.LumiInit(dev.hDevHandle, ref tmpHandle); if (_rc != LumiSDKWrapper.LumiStatus.LUMI_STATUS_OK) { throw new Exception("Failed to init scanner. _rc = " + _rc + "\r\n"); } _hHandle = tmpHandle; } catch (Exception err) { throw err; } finally { } }