RegEnumValue function advapi32

WIN32_ERROR RegEnumValue(
  1. HKEY hKey,
  2. int dwIndex,
  3. PWSTR? lpValueName,
  4. Pointer<Uint32> lpcchValueName,
  5. Pointer<Uint32>? lpType,
  6. Pointer<Uint8>? lpData,
  7. Pointer<Uint32>? lpcbData,
)

Enumerates the values for the specified open registry key.

The function copies one indexed value name and data block for the key each time it is called.

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

Implementation

@pragma('vm:prefer-inline')
WIN32_ERROR RegEnumValue(
  HKEY hKey,
  int dwIndex,
  PWSTR? lpValueName,
  Pointer<Uint32> lpcchValueName,
  Pointer<Uint32>? lpType,
  Pointer<Uint8>? lpData,
  Pointer<Uint32>? lpcbData,
) => .new(
  _RegEnumValue(
    hKey,
    dwIndex,
    lpValueName ?? nullptr,
    lpcchValueName,
    nullptr,
    lpType ?? nullptr,
    lpData ?? nullptr,
    lpcbData ?? nullptr,
  ),
);