public String[] FindDevice(String tDeviceType, params Object[] tParameter) { /*! check device ID */ if (tDeviceType != "ES_USB_HID") { m_strLastErrorInfo = "Unknown device type."; return(null); } if (null == tParameter) { m_strLastErrorInfo = "Illegal Vender ID and Product ID"; return(null); } else if (tParameter.Length < 2) { m_strLastErrorInfo = "Illegal Vender ID and Product ID"; return(null); } UInt16 tVenderID = 0; UInt16 tProductID = 0; if ((tParameter[0] is UInt16) || (tParameter[0] is Int16) || (tParameter[0] is UInt32) || (tParameter[0] is Int32)) { tVenderID = (UInt16)tParameter[0]; } else { m_strLastErrorInfo = "Illegal Vender ID and Product ID:"; return(null); } if ((tParameter[1] is UInt16) || (tParameter[1] is Int16) || (tParameter[1] is UInt32) || (tParameter[1] is Int32)) { tProductID = (UInt16)tParameter[1]; } else { m_strLastErrorInfo = "Illegal Vender ID and Product ID:"; return(null); } String[] tResult = DeviceManagement.FindHIDDevices((Int16)tVenderID, (Int16)tProductID); if (null == tResult) { m_strLastErrorInfo = "Could not find specified USB HID device!"; } return(tResult); }