microsoft / Windows-driver-samples

This repo contains driver samples prepared for use with Microsoft Visual Studio and the Windows Driver Kit (WDK). It contains both Universal Windows Driver and desktop-only driver samples.
Microsoft Public License
7k stars 4.94k forks source link

[serial/serial] Fail to run HLK test for Serial device driver #1206

Closed longnhieu7 closed 3 months ago

longnhieu7 commented 3 months ago

I am getting in trouble with HLK testing on New Windows11 24H2 about DRIVER_ISOLATION_VIOLATION. I want to create PortName to Registry 'HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM’ in pnp.c (My program same as Window driver example on Github for W11 22H2) I caught errors "Registry operations should not use absolute paths. Detected creation of unisolated registry key..." and "Registry operations should only use key handles returned from WDF or WDM APIs. Detected creation of unisolated registry key...". My INF DIRIDS value is 12, is this point make my driver cannot set value into registry?

longnhieu7 commented 3 months ago

Mr @zlockard told me to test on HLK version 22H2 so I could pass this test. But I would like to make sure that the problem does not come from DIRIDS value and the API we are using to set value of COM port. Thank everyone for support!!!

zlockard commented 3 months ago

Using DIRD 13 is always recommended and won't cause any issues here

longnhieu7 commented 3 months ago

@zlockard coud you give me the evidence of your HLK test?