RegCopyTree function advapi32

WIN32_ERROR RegCopyTree(
  1. HKEY hKeySrc,
  2. PCWSTR? lpSubKey,
  3. HKEY hKeyDest
)

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

To learn more, see learn.microsoft.com/windows/win32/api/winreg/nf-winreg-regcopytreew.

Implementation

@pragma('vm:prefer-inline')
WIN32_ERROR RegCopyTree(HKEY hKeySrc, PCWSTR? lpSubKey, HKEY hKeyDest) =>
    .new(_RegCopyTree(hKeySrc, lpSubKey ?? nullptr, hKeyDest));