Empirical experience (from 
[libwdi](https://github.com/pbatard/libwdi/blob/master/libwdi/installer.c#L512))
 leads me to believe that we should be able to easily distinguish SetupAPI 
error codes from standard ones, as they should be in `0xE0000xxxx` or 
`0x0000xxxx`. So this is the I will be going with below.

Now, it is still possible that we may miss some codes, but I think doing it 
this way is better than having a separate function call, and we can always 
readjust as we go along.

Plus, the first thing `windows_error_str()` does is display the unmodified 
error code, so even if our assumption that SetupAPI codes can be differentiated 
from regular ones doesn't always hold, a quick internet search should return 
the meaning behind the error.

/Pete

---
Reply to this email directly or view it on GitHub:
https://github.com/libusbx/libusbx/pull/166#issuecomment-31370722
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
libusbx-devel mailing list
libusbx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusbx-devel

Reply via email to