Hello! MaxIsTaken, I found a solution to this problem by thinking about debugging my driver. To debug the Windows kernel, you first need to configure Windows. The settings needed for this are described here https://learn.microsoft.com/en-us/windows-hardware/drivers/debugger/setting-up-local-kernel-debugging-of-a-single-computer-manually . In the "Setting Up Local Kernel-Mode Debugging" section, I followed steps 1 and 2, then rebooted my PC according to step 3:
- Open a Command Prompt window as Administrator. Enter bcdedit /debug on
- If the computer is not already configured as the target of a debug transport, enter bcdedit /dbgsettings local
- Reboot the computer.
I was shocked when after rebooting the PC, my driver started working. But I don't understand why. Also, to avoid error 52 (bad sign), I run the PC with mandatory device driver signature verification disabled.
Hope this helps you