RegDeleteValue function Null safety advapi32

int RegDeleteValue(
  1. int hKey,
  2. Pointer<Utf16> lpValueName
)

Removes a named value from the specified registry key. Note that value names are not case sensitive.

LSTATUS RegDeleteValueW(
  HKEY    hKey,
  LPCWSTR lpValueName);

Implementation

int RegDeleteValue(int hKey, Pointer<Utf16> lpValueName) {
  final _RegDeleteValue = _advapi32.lookupFunction<
      Int32 Function(IntPtr hKey, Pointer<Utf16> lpValueName),
      int Function(int hKey, Pointer<Utf16> lpValueName)>('RegDeleteValueW');
  return _RegDeleteValue(hKey, lpValueName);
}