SHGetLocalizedName function shell32

void SHGetLocalizedName(
  1. PCWSTR pszPath,
  2. PWSTR pszResModule,
  3. int cch,
  4. Pointer<Int32> pidsRes,
)

Retrieves the localized name of a file in a Shell folder.

Throws a WindowsException on failure.

To learn more, see learn.microsoft.com/windows/win32/api/shellapi/nf-shellapi-shgetlocalizedname.

Implementation

@pragma('vm:prefer-inline')
void SHGetLocalizedName(
  PCWSTR pszPath,
  PWSTR pszResModule,
  int cch,
  Pointer<Int32> pidsRes,
) {
  final hr$ = HRESULT(_SHGetLocalizedName(pszPath, pszResModule, cch, pidsRes));
  if (hr$.isError) throw WindowsException(hr$);
}