How to read from registry key from inside driver code?

My machine is a Windows 10 machine. I want to read the registry key from HKEY_LOCAL_MACHINE.
Thanks in advance!

RtlQueryRegistryValues.

WDF has some very handy functions for this… WAY easier than using the (hideous) Rtl routines, IF you’re writing a WDF Driver.

Peter