public static string getDeviceID() { string s = ""; Intermec.DeviceManagement.SmartSystem.ITCSSApi ssApi = new Intermec.DeviceManagement.SmartSystem.ITCSSApi(); try { int iSize = 1024; StringBuilder sb = new StringBuilder(iSize); string sQuery = "<Subsystem Name=\"SS_Client\"> \r\n<Group Name=\"Identity\"> \r\n<Field Name=\"UniqueId\">otto</Field> \r\n</Group> \r\n</Subsystem>"; uint uErr = ssApi.Get(sQuery, sb, ref iSize, 2000); if (uErr == Intermec.DeviceManagement.SmartSystem.ITCSSErrors.E_SS_SUCCESS) { string temp = ssAPIhelper.ssAPIhelper.getStrSetting(sb, "UniqueId"); s = temp; } else { s = "ssAPI err=" + uErr.ToString(); } } catch (Exception ex) { return "Exception! " + ex.Message; } return s; }
public void Dispose() { try { SSAPI.Dispose(); SSAPI = null; } catch (Exception) { } }
public void Dispose() { if (_ssAPI != null) { try { _ssAPI.Dispose(); _ssAPI = null; } catch (Exception) { } } }
public BTpower() { SSAPI = new ITCSSApi(); }