Answered by:
WinUSB universal API

Question
-
API WinUsb_GetDescriptor in winusb.dll is not a supported universal API. USBApplication3.exe calls this API.
I don't know what else to try. I have studio 2017 and only Fall Creators SDK and the single WDK that goes with 2017.
I create a project from the WINUSB template. and right out of the box it will not compile. I've seen this function call on the
microsoft site and it says it's a universal call. I'm guessing maybe i have something corrupted. I did at one point install VS 2015
and the WDK that goes with it. That install said i would not be able to make Universal stuff if i installed it. I have since
uninstall that. and uninstall VS 2017. and all my sdk. and resinstalled. and updated windows. I restarted the machine in between
each uninstall/reinstall. Please help
Monday, January 29, 2018 2:02 AM
Answers
-
The winusb api is Universal, it is an error in the tooling
d -- This posting is provided "AS IS" with no warranties, and confers no rights.
- Marked as answer by Doron Holan [MSFT] Monday, January 29, 2018 4:35 AM
Monday, January 29, 2018 4:35 AM
All replies
-
The winusb api is Universal, it is an error in the tooling
d -- This posting is provided "AS IS" with no warranties, and confers no rights.
- Marked as answer by Doron Holan [MSFT] Monday, January 29, 2018 4:35 AM
Monday, January 29, 2018 4:35 AM -
so I took this advice and created a new blank console project. I made a call to the function and put
C:\Program Files (x86)\Windows Kits\10\Lib\10.0.16299.0\km\x64
as an additional include directory.
It compiles just fine. How can i fix the template? Because it won't compile out of the box.
Tuesday, January 30, 2018 2:49 AM -
C:\Program Files (x86)\Windows Kits\10\Lib\10.0.16299.0\km\x64 is a lib directory, not a header directory. How is failing out of the box? what headers are you including that are not compiling?
d -- This posting is provided "AS IS" with no warranties, and confers no rights.
Tuesday, January 30, 2018 6:57 AM -
Sorry, i meant library. I create a new project.
Windows Drivers -> Applications -> WinUSB Application.
I let it create the project successfully.
I then click build and it errors out.
Severity Code Description Project File Line Suppression State
Warning API WinUsb_Free in winusb.dll is not a supported universal API. USBApplication4.exe calls this API. USB Application4 C:\Users\Admin\source\repos\USB Application4\USB Application4\ApiValidation 1
Warning API WinUsb_GetDescriptor in winusb.dll is not a supported universal API. USBApplication4.exe calls this API. USB Application4 C:\Users\Admin\source\repos\USB Application4\USB Application4\ApiValidation 1
Warning API WinUsb_Initialize in winusb.dll is not a supported universal API. USBApplication4.exe calls this API. USB Application4 C:\Users\Admin\source\repos\USB Application4\USB Application4\ApiValidation 1
Error MSB3721 The command ""C:\Program Files (x86)\Windows Kits\10\bin\10.0.16299.0\x64\ApiValidator.exe" -DriverPackagePath:"C:\Users\Admin\source\repos\USB Application4\Debug\\" -SupportedApiXmlFiles:"C:\Program Files (x86)\Windows Kits\10\build\universalDDIs\x86\UniversalDDIs.xml" -ModuleWhiteListXmlFiles:"C:\Program Files (x86)\Windows Kits\10\build\universalDDIs\x86\ModuleWhiteList.xml" -ApiExtractorExePath:"C:\Program Files (x86)\Windows Kits\10\bin\10.0.16299.0\x64"" exited with code -1. USB Application4 C:\Program Files (x86)\Windows Kits\10\build\WindowsDriver.common.targets 1746
Wednesday, January 31, 2018 3:38 AM -
like I said, it is a tooling error. the winusb API is universal even though the tool is reporting it is not
d -- This posting is provided "AS IS" with no warranties, and confers no rights.
Wednesday, January 31, 2018 7:11 AM -
how to fix this, suggestion welcome.
Thanks
Thursday, April 12, 2018 5:32 PM -
it should be fixed in the 1803 wdk
d -- This posting is provided "AS IS" with no warranties, and confers no rights.
Friday, April 13, 2018 1:47 AM -
Visual Studio 2017 and WDK 1803 installed just a week ago. The errors still are active. The only way I found to avoid them is disable ApiValidator.
Any news on another solution?
Thanks
Wednesday, July 4, 2018 12:58 PM