RegSetValueEx function advapi32

WIN32_ERROR RegSetValueEx(
  1. HKEY hKey,
  2. PCWSTR? lpValueName,
  3. REG_VALUE_TYPE dwType,
  4. Pointer<Uint8>? lpData,
  5. int cbData,
)

Sets the data and type of a specified value under a registry key.

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

Implementation

@pragma('vm:prefer-inline')
WIN32_ERROR RegSetValueEx(
  HKEY hKey,
  PCWSTR? lpValueName,
  REG_VALUE_TYPE dwType,
  Pointer<Uint8>? lpData,
  int cbData,
) => WIN32_ERROR(
  _RegSetValueEx(
    hKey,
    lpValueName ?? nullptr,
    NULL,
    dwType,
    lpData ?? nullptr,
    cbData,
  ),
);