SetupDiOpenDevRegKey
[DllImport("setupapi.dll", SetLastError = true)]
public static extern IntPtr SetupDiOpenDevRegKey(
IntPtr DeviceInfoSet,
ref DeviceInfoData DeviceInfoData,
uint Scope,
uint HwProfile,
uint KeyType,
uint samDesired
);
Microsoft documentation: Link
Last updated