You can definitely fix InterlockedIncrement and InterlockedDecrement to be
OneCore-compatible by having them pull from the OneCore API set instead of
kernel32.dll.
winmm.dll doesn’t exist in OneCore so if you want to be a universal driver you
will probably need to give up on DriverCallback.
If you don’t care about being a universal driver (sounds like you don’t) then
you need to somehow tell HLK. I don’t know how that works. You might need to
ask on an HLK forum or contact HLK support. Or maybe somebody else on
wdmaudiodev knows.
________________________________
From: wdmaudiodev-bounce@xxxxxxxxxxxxx <wdmaudiodev-bounce@xxxxxxxxxxxxx> on
behalf of David A. Hoatson <dhoatson@xxxxxxxxxxxxxx>
Sent: Monday, June 10, 2019 2:39:55 PM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] Re: HLK ApiValidator Failure
Hello Matthew,
Actually, it is complaining about kernel32.dll::InterlockedIncrement
kernel32.dll::InterlockedDecrement and winmm.dll::DriverCallback. I figured
switching to the latest toolset might fix this, but alas it did not. I am
building the DLL (which is what HLK is complaining about) with VS2019 I can see
nowhere to set that the DLL is not a “Universal” driver. It is just building a
standard DLL. Any clues as to how to get this going?
Thank you,
David A. Hoatson
From: wdmaudiodev-bounce@xxxxxxxxxxxxx
[mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of Matthew van Eerde ;
(Redacted sender "Matthew.van.Eerde" for DMARC)
Sent: Friday, June 07, 2019 3:20 PM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] Re: HLK ApiValidator Failure
You need to figure out why the HLK thinks you’re trying to certify as
universal, and fix that.
It’s not complaining about InterlockedIncrement and InterlockedDecrement. It’s
complaining about kernelbase.dll. Your linker options are such that you’re
pulling InterlockedIncrement and IntelockedDecrement from kernelbase.dll rather
than whatever API set hosts it in the universal driver world.
________________________________
From: wdmaudiodev-bounce@xxxxxxxxxxxxx<mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx>
<wdmaudiodev-bounce@xxxxxxxxxxxxx<mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx>> on
behalf of David A. Hoatson
<dhoatson@xxxxxxxxxxxxxx<mailto:dhoatson@xxxxxxxxxxxxxx>>
Sent: Friday, June 7, 2019 1:55:02 PM
To: wdmaudiodev@xxxxxxxxxxxxx<mailto:wdmaudiodev@xxxxxxxxxxxxx>
Subject: [wdmaudiodev] Re: HLK ApiValidator Failure
Matthew,
Thanks for the quick reply. I have run ApiValidator.exe from the command
prompt and it only complains about DriverCallback not InterlockedIncrement /
InterlockedDecrement:
ApiValidation: Warning: API DriverCallback in winmm.dll is not a supported
universal API.
I’m not trying to make a Universal driver, as we can only run on desktop PCs
(we make a PCI Express card!), so how can I get around this failure in the HLK?
I guess another question is, why is ApiValidator in HLK complaining about our
use of InterlockedIncrement / InterlockedDecrement when those clearly were OK
for our competitors driver?
Thank you,
David A. Hoatson
Lynx Studio Technology, Inc.
www.lynxstudio.com<http://www.lynxstudio.com/>
From: wdmaudiodev-bounce@xxxxxxxxxxxxx<mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx>
[mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of Matthew van Eerde ;
(Redacted sender "Matthew.van.Eerde" for DMARC)
Sent: Friday, June 07, 2019 12:38 PM
To: wdmaudiodev@xxxxxxxxxxxxx<mailto:wdmaudiodev@xxxxxxxxxxxxx>
Subject: [wdmaudiodev] Re: HLK ApiValidator Failure
After searching the webs, this article might help you, especially the “link to
onecoreuap.lib” part.
https://docs.microsoft.com/en-us/windows-hardware/drivers/develop/validating-universal-drivers
________________________________
From: wdmaudiodev-bounce@xxxxxxxxxxxxx<mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx>
<wdmaudiodev-bounce@xxxxxxxxxxxxx<mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx>> on
behalf of Matthew van Eerde
<dmarc-noreply@xxxxxxxxxxxxx<mailto:dmarc-noreply@xxxxxxxxxxxxx>>
Sent: Friday, June 7, 2019 12:34:49 PM
To: wdmaudiodev@xxxxxxxxxxxxx<mailto:wdmaudiodev@xxxxxxxxxxxxx>
Subject: [wdmaudiodev] Re: HLK ApiValidator Failure
Sorry, I am not familiar with ApiValidator.
You can follow these steps to troubleshoot HLK failures in general:
https://docs.microsoft.com/en-us/windows-hardware/test/hlk/user/troubleshooting-windows-hlk<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows-hardware%2Ftest%2Fhlk%2Fuser%2Ftroubleshooting-windows-hlk&data=02%7C01%7Cmatthew.van.eerde%40microsoft.com%7C3b27305a6fd4405e08cb08d6edec70c2%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636957997158234683&sdata=1O7j9ybZoMOPRDYx79ik%2BduaNR0X%2FXe2J7N2aLIQick%3D&reserved=0>
In particular you can go to
https://support.microsoft.com/<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsupport.microsoft.com%2F&data=02%7C01%7Cmatthew.van.eerde%40microsoft.com%7C3b27305a6fd4405e08cb08d6edec70c2%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636957997158244691&sdata=DnnUWuJdX%2F7e9xllbIbvtUb33ZjQJYUJP1wmV%2BvR14M%3D&reserved=0>
Support for business > Get started > Select the product family: “DeveloperTools” > Select a product: “Windows Driver Kit (WDK, HLK)” > Select the product