RegRestoreKey function Null safety advapi32

int RegRestoreKey(
  1. int hKey,
  2. Pointer<Utf16> lpFile,
  3. int dwFlags

Reads the registry information in a specified file and copies it over the specified key. This registry information may be in the form of a key and multiple levels of subkeys.

LSTATUS RegRestoreKeyW(
  HKEY    hKey,
  LPCWSTR lpFile,
  DWORD   dwFlags);


int RegRestoreKey(int hKey, Pointer<Utf16> lpFile, int dwFlags) {
  final _RegRestoreKey = _advapi32.lookupFunction<
      Int32 Function(IntPtr hKey, Pointer<Utf16> lpFile, Uint32 dwFlags),
      int Function(
          int hKey, Pointer<Utf16> lpFile, int dwFlags)>('RegRestoreKeyW');
  return _RegRestoreKey(hKey, lpFile, dwFlags);