Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates to make Sysvad and SimpleAudioSample Windows Drivers Compliant #845

Merged
merged 1 commit into from
Feb 2, 2023

Conversation

judzmura
Copy link
Contributor

@judzmura judzmura commented Jan 31, 2023

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.

@judzmura judzmura changed the base branch from main to develop February 2, 2023 18:01
@judzmura judzmura force-pushed the simpleSysvadUpdates branch from c213864 to b033e01 Compare February 2, 2023 20:33
@jasonknichel jasonknichel merged commit 54a98a7 into microsoft:develop Feb 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants