RegDeleteKeyValue function Null safety advapi32

int RegDeleteKeyValue(
  1. int hKey,
  2. Pointer<Utf16> lpSubKey,
  3. Pointer<Utf16> lpValueName
)

Removes the specified value from the specified registry key and subkey.

LSTATUS RegDeleteKeyValueW(
  HKEY    hKey,
  LPCWSTR lpSubKey,
  LPCWSTR lpValueName);

Implementation

int RegDeleteKeyValue(
    int hKey, Pointer<Utf16> lpSubKey, Pointer<Utf16> lpValueName) {
  final _RegDeleteKeyValue = _advapi32.lookupFunction<
      Int32 Function(
          IntPtr hKey, Pointer<Utf16> lpSubKey, Pointer<Utf16> lpValueName),
      int Function(int hKey, Pointer<Utf16> lpSubKey,
          Pointer<Utf16> lpValueName)>('RegDeleteKeyValueW');
  return _RegDeleteKeyValue(hKey, lpSubKey, lpValueName);
}