From: Hermann H. <her...@we...> - 2016-10-11 09:27:41
|
<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div> <div> <div>Hi,</div> <div>The use of the pyusb0 service is a bit troublesome, because you have to specify the desired library by hand.<br/> I always had the dream of automatically use the installed library.</div> <div>Well, here is how.</div> <div>You must know the Vid and Pid of your device. With that you can look up the registry for the installed service.<br/> If it is winusb you need not care.</div> <div>If it is pyusb0 then you get the device descriptor and extract the device name.<br/> With it you go to the driverstore and scan the filerepository directory for a directory file name <br/> that starts with the device name.</div> <div>Then you walk under this tree until you find a dll name.</div> <div>This is the installed library.</div> <div>Was not so hard.</div> <div>I want to thank Xiaofan for his encouraging advice to dig deeper in this registry thingens.</div> <div>Now there is no more any need to pick a wrong library.</div> <div> </div> <div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"> <div name="quoted-content"> </div> </div> </div> </div></div></body></html> |