DevicePowerEnumDevices
[DllImport("powrprof.dll", SetLastError = true)]
public static extern bool DevicePowerEnumDevices(
uint QueryIndex,
uint QueryInterpretationFlags,
ref Guid SubGroupOfPowerSetting,
uint Flags,
ref IntPtr DeviceInformationSet
);
Microsoft documentation: Link
Last updated