• ×
    Information
    Need Windows 11 help?
    Check documents on compatibility, FAQs, upgrade information and available fixes.
    Windows 11 Support Center.
  • post a message
  • ×
    Information
    Need Windows 11 help?
    Check documents on compatibility, FAQs, upgrade information and available fixes.
    Windows 11 Support Center.
  • post a message
Guidelines
Seize the moment! nominate yourself or a tech enthusiast you admire & join the HP Community Experts!
HP Recommended

I didn't found any blue enveloppe.

HP Recommended

By using https://github.com/libusb/hidapi, it is possible to retreive serial number of USB device:

 

std::string ToNarrow(const wchar_t* s, char dfault = '?', const std::locale& loc = std::locale())
{
std::ostringstream stm;
while (*s != L'\0') {
stm << std::use_facet< std::ctype<wchar_t> >(loc).narrow(*s++, dfault);
}
return stm.str();
}

std::string HPPolyHandset::getSerialNummber(const char* pSoftphoneName)
{
struct hid_device_info* devs, * cur_dev;

devs = hid_enumerate(0x0, 0x0);
cur_dev = devs;
while (cur_dev) {

std::string name = ToNarrow(cur_dev->product_string);
if (name == pSoftphoneName) {
std::string sn = ToNarrow(cur_dev->serial_number);
return sn;
}
cur_dev = cur_dev->next;
}
return NULL;
}
† The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the <a href="https://www8.hp.com/us/en/terms-of-use.html" class="udrlinesmall">Terms of Use</a> and <a href="/t5/custom/page/page-id/hp.rulespage" class="udrlinesmall"> Rules of Participation</a>.