RegOpenKeyEx function advapi32

WIN32_ERROR RegOpenKeyEx(
  1. HKEY hKey,
  2. PCWSTR? lpSubKey,
  3. int? ulOptions,
  4. REG_SAM_FLAGS samDesired,
  5. Pointer<Pointer<NativeType>> phkResult,
)

Opens the specified registry key.

Note that key names are not case sensitive.

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

Implementation

@pragma('vm:prefer-inline')
WIN32_ERROR RegOpenKeyEx(
  HKEY hKey,
  PCWSTR? lpSubKey,
  int? ulOptions,
  REG_SAM_FLAGS samDesired,
  Pointer<Pointer> phkResult,
) => WIN32_ERROR(
  _RegOpenKeyEx(
    hKey,
    lpSubKey ?? nullptr,
    ulOptions ?? NULL,
    samDesired,
    phkResult,
  ),
);