RegQueryMultipleValues function Null safety advapi32

int RegQueryMultipleValues(
  1. int hKey,
  2. Pointer<VALENT> val_list,
  3. int num_vals,
  4. Pointer<Utf16> lpValueBuf,
  5. Pointer<Uint32> ldwTotsize
)

Retrieves the type and data for a list of value names associated with an open registry key.

LSTATUS RegQueryMultipleValuesW(
  HKEY     hKey,
  PVALENTW val_list,
  DWORD    num_vals,
  LPWSTR   lpValueBuf,
  LPDWORD  ldwTotsize);

Implementation

int RegQueryMultipleValues(int hKey, Pointer<VALENT> val_list, int num_vals,
    Pointer<Utf16> lpValueBuf, Pointer<Uint32> ldwTotsize) {
  final _RegQueryMultipleValues = _advapi32.lookupFunction<
      Int32 Function(IntPtr hKey, Pointer<VALENT> val_list, Uint32 num_vals,
          Pointer<Utf16> lpValueBuf, Pointer<Uint32> ldwTotsize),
      int Function(
          int hKey,
          Pointer<VALENT> val_list,
          int num_vals,
          Pointer<Utf16> lpValueBuf,
          Pointer<Uint32> ldwTotsize)>('RegQueryMultipleValuesW');
  return _RegQueryMultipleValues(
      hKey, val_list, num_vals, lpValueBuf, ldwTotsize);
}