SHSetLocalizedName function (shellapi.h)

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

Syntax

SHSTDAPI SHSetLocalizedName(
  [in] PCWSTR pszPath,
  [in] PCWSTR pszResModule,
       int    idsRes
);

Parameters

[in] pszPath

Type: PCWSTR

A pointer to a string that specifies the fully qualified path of the target file.

[in] pszResModule

Type: PCWSTR

A pointer to a string resource that specifies the localized version of the file name.

idsRes

Type: int

An integer ID that specifies the localized file name in the string resource.

Return value

Type: HRESULT

If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

When this string is set, Explorer displays this string instead of the file name. The path to the file is unchanged.

Applications can get the display (localized) name with IShellFolder::GetDisplayNameOf with the SIGDN_NORMALDISPLAY flag and the parsing (non-localized) name with IShellItem::GetDisplayName using the SIGDN_DESKTOPABSOLUTEPARSING flag.

Calling SHRemoveLocalizedName makes the display name identical to the parsing name.

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header shellapi.h
DLL Shell32.dll; Shell32.dll (version 5.6 or later)
API set ext-ms-win-shell-shell32-l1-2-0 (introduced in Windows 8.1)