RegCopyTree function Null safety advapi32

int RegCopyTree(
  1. int hKeySrc,
  2. Pointer<Utf16> lpSubKey,
  3. int hKeyDest
)

Copies the specified registry key, along with its values and subkeys, to the specified destination key.

LSTATUS RegCopyTreeW(
  HKEY    hKeySrc,
  LPCWSTR lpSubKey,
  HKEY    hKeyDest
);

Implementation

int RegCopyTree(int hKeySrc, Pointer<Utf16> lpSubKey, int hKeyDest) {
  final _RegCopyTree = _advapi32.lookupFunction<
      Int32 Function(IntPtr hKeySrc, Pointer<Utf16> lpSubKey, IntPtr hKeyDest),
      int Function(
          int hKeySrc, Pointer<Utf16> lpSubKey, int hKeyDest)>('RegCopyTreeW');
  return _RegCopyTree(hKeySrc, lpSubKey, hKeyDest);
}