RegDeleteKey function Null safety advapi32

int RegDeleteKey(
  1. int hKey,
  2. Pointer<Utf16> lpSubKey
)

Deletes a subkey and its values. Note that key names are not case sensitive.

LSTATUS RegDeleteKeyW(
  HKEY    hKey,
  LPCWSTR lpSubKey);

Implementation

int RegDeleteKey(int hKey, Pointer<Utf16> lpSubKey) {
  final _RegDeleteKey = _advapi32.lookupFunction<
      Int32 Function(IntPtr hKey, Pointer<Utf16> lpSubKey),
      int Function(int hKey, Pointer<Utf16> lpSubKey)>('RegDeleteKeyW');
  return _RegDeleteKey(hKey, lpSubKey);
}