CallNtPowerInformation function Null safety powrprof

int CallNtPowerInformation (
  1. int InformationLevel,
  2. Pointer<NativeType> InputBuffer,
  3. int InputBufferLength,
  4. Pointer<NativeType> OutputBuffer,
  5. int OutputBufferLength
)

Sets or retrieves power information.

NTSTATUS CallNtPowerInformation(
  POWER_INFORMATION_LEVEL InformationLevel,
  PVOID                   InputBuffer,
  ULONG                   InputBufferLength,
  PVOID                   OutputBuffer,
  ULONG                   OutputBufferLength
);

Implementation

int CallNtPowerInformation(int InformationLevel, Pointer InputBuffer,
    int InputBufferLength, Pointer OutputBuffer, int OutputBufferLength) {
  final _CallNtPowerInformation = _powrprof.lookupFunction<
      Int32 Function(
          Int32 InformationLevel,
          Pointer InputBuffer,
          Uint32 InputBufferLength,
          Pointer OutputBuffer,
          Uint32 OutputBufferLength),
      int Function(
          int InformationLevel,
          Pointer InputBuffer,
          int InputBufferLength,
          Pointer OutputBuffer,
          int OutputBufferLength)>('CallNtPowerInformation');
  return _CallNtPowerInformation(InformationLevel, InputBuffer,
      InputBufferLength, OutputBuffer, OutputBufferLength);
}