SetFirmwareEnvironmentVariable function Null safety kernel32

int SetFirmwareEnvironmentVariable(
  1. Pointer<Utf16> lpName,
  2. Pointer<Utf16> lpGuid,
  3. Pointer<NativeType> pValue,
  4. int nSize
)

Sets the value of the specified firmware environment variable.

BOOL SetFirmwareEnvironmentVariableW(
  LPCWSTR lpName,
  LPCWSTR lpGuid,
  PVOID   pValue,
  DWORD   nSize
);

Implementation

int SetFirmwareEnvironmentVariable(
    Pointer<Utf16> lpName, Pointer<Utf16> lpGuid, Pointer pValue, int nSize) {
  final _SetFirmwareEnvironmentVariable = _kernel32.lookupFunction<
      Int32 Function(Pointer<Utf16> lpName, Pointer<Utf16> lpGuid,
          Pointer pValue, Uint32 nSize),
      int Function(Pointer<Utf16> lpName, Pointer<Utf16> lpGuid, Pointer pValue,
          int nSize)>('SetFirmwareEnvironmentVariableW');
  return _SetFirmwareEnvironmentVariable(lpName, lpGuid, pValue, nSize);
}