Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

SHSetLocalizedName function

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

Syntax


HRESULT SHSetLocalizedName(
  _In_  PCWSTR pszPath,
  _In_  PCWSTR pszResModule,
  int idsRes
);

Parameters

pszPath [in]

Type: PCWSTR

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

pszResModule [in]

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

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Shellapi.h

DLL

Shell32.dll;
Shell32.dll (version 5.6 or later)

 

 

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.