Lines Matching defs:dh
119 libusb_device_handle *dh = NULL;
121 if (ret = libusb_open(devs[i],&dh) == 0)
125 int n = libusb_get_string_descriptor_ascii(dh,desc.iSerialNumber,sernum,64);
131 libusb_close(dh);
148 libusb_device_handle* dh;
165 libusb_device_handle *dh = NULL;
167 if (libusb_open(devs[i],&dh) != 0) continue;
169 n = libusb_get_string_descriptor_ascii(dh,desc.iSerialNumber,serial,64);
174 libusb_close(dh);
178 if ((libusb_kernel_driver_active(dh,0)) && (libusb_detach_kernel_driver(dh,0) != 0))
180 libusb_close(dh);
184 if (libusb_set_configuration(dh,1) != 0)
186 libusb_close(dh);
190 if (libusb_claim_interface(dh,0) != 0)
192 libusb_close(dh);
198 return dh;