RegCreateKey function advapi32

WIN32_ERROR RegCreateKey(
  1. HKEY hKey,
  2. PCWSTR? lpSubKey,
  3. Pointer<Pointer<NativeType>> phkResult
)

Creates the specified registry key.

If the key already exists in the registry, the function opens it.

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

Implementation

@pragma('vm:prefer-inline')
WIN32_ERROR RegCreateKey(
  HKEY hKey,
  PCWSTR? lpSubKey,
  Pointer<Pointer> phkResult,
) => .new(_RegCreateKey(hKey, lpSubKey ?? nullptr, phkResult));