RegDeleteTree function Null safety advapi32

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

Deletes the subkeys and values of the specified key recursively.

LSTATUS RegDeleteTreeW(
  HKEY    hKey,
  LPCWSTR lpSubKey);

Implementation

int RegDeleteTree(int hKey, Pointer<Utf16> lpSubKey) {
  final _RegDeleteTree = _advapi32.lookupFunction<
      Int32 Function(IntPtr hKey, Pointer<Utf16> lpSubKey),
      int Function(int hKey, Pointer<Utf16> lpSubKey)>('RegDeleteTreeW');
  return _RegDeleteTree(hKey, lpSubKey);
}