Updates to make Sysvad and SimpleAudioSample Windows Drivers Compliant #845
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR updates both Sysvad and SimpleAudioSample to be Windows Drivers Compliant. This required several fixes, listed below. This PR also updates Sysvad/SimpleAudioSample with the latest changes made to the internal copies of the drivers since the last time we updated the sample on Github. I made sure only the changes that are compliant with NI wdk/sdk and can be made public went in.
The componentizedApoSample and tabletAudioSample inf's were using HKCR for APO registration which was causing an INF verifier failure. This was fixed by updating componentizedApoSample to use HKR for global APO registration. In TabletAudioSample however this won't work since it's monolithic, so the solution was to remove that inf from the public sample (since it is not necessary anyway).
SaveData.cpp was using an absolute path in its file operations which was causing a driver verifier error. The error was coming from the definition of DEFAULT_FILE_NAME, so I fixed this by changing this definition from an absolute path to be a path relative to the DriverData path. Before using this relative path, the folders must be created with ZwCreateFile.
The calls to RtlQueryRegistryValues in all of the public audio samples were using absolute paths which causes a driver verifier error. This was fixed by getting the parameters key for the driver using a call to IoOpenDriverRegistryKey and passing the key as a handle to RtlQueryRegistryValues rather than passing in the whole path.
All of these changes were validated, I built the samples using the latest public NI WDK and made sure they still installed and worked properly and HLK is passing. Also confirmed they are both Windows Drivers compliant now by using inf verifier, driver verifier, and api validator.