RegLoadMUIString function Null safety advapi32

int RegLoadMUIString(
  1. int hKey,
  2. Pointer<Utf16> pszValue,
  3. Pointer<Utf16> pszOutBuf,
  4. int cbOutBuf,
  5. Pointer<Uint32> pcbData,
  6. int Flags,
  7. Pointer<Utf16> pszDirectory
)

Loads the specified string from the specified key and subkey.

LSTATUS RegLoadMUIStringW(
  HKEY    hKey,
  LPCWSTR pszValue,
  LPWSTR  pszOutBuf,
  DWORD   cbOutBuf,
  LPDWORD pcbData,
  DWORD   Flags,
  LPCWSTR pszDirectory);

Implementation

int RegLoadMUIString(
    int hKey,
    Pointer<Utf16> pszValue,
    Pointer<Utf16> pszOutBuf,
    int cbOutBuf,
    Pointer<Uint32> pcbData,
    int Flags,
    Pointer<Utf16> pszDirectory) {
  final _RegLoadMUIString = _advapi32.lookupFunction<
      Int32 Function(
          IntPtr hKey,
          Pointer<Utf16> pszValue,
          Pointer<Utf16> pszOutBuf,
          Uint32 cbOutBuf,
          Pointer<Uint32> pcbData,
          Uint32 Flags,
          Pointer<Utf16> pszDirectory),
      int Function(
          int hKey,
          Pointer<Utf16> pszValue,
          Pointer<Utf16> pszOutBuf,
          int cbOutBuf,
          Pointer<Uint32> pcbData,
          int Flags,
          Pointer<Utf16> pszDirectory)>('RegLoadMUIStringW');
  return _RegLoadMUIString(
      hKey, pszValue, pszOutBuf, cbOutBuf, pcbData, Flags, pszDirectory);
}