IShellFolder::SetNameOfIShellFolder::SetNameOf*
*Contents  *Index  *Topic Contents
*Previous Topic: IShellFolder::ParseDisplayName
*Next Topic: IShellIcon

IShellFolder::SetNameOf


HRESULT SetNameOf(
    HWND hwndOwner,
    LPCITEMIDLIST pidl,
    LPCOLESTR lpszName,
    DWORD uFlags,
    LPITEMIDLIST *ppidlOut
   );	

Sets the display name of a file object or subfolder, changing the item identifier in the process.

hwndOwner
Handle to the owner window of any dialog or message boxes that the client displays.
pidl
Address of an ITEMIDLIST structure that uniquely identifies the file object or subfolder relative to the parent folder.
lpszName
Address of a null-terminated string that specifies the new display name.
uFlags
Flags indicating the type of name specified by the lpszName parameter. For a list of possible values, see the description of the SHGNO enumerated type.
ppidlOut
Address of a pointer to the new ITEMIDLIST structure. This parameter can be NULL, and in that case, the method does not return the new ITEMIDLIST for the object.

If this parameter is not NULL, this method frees the specified ITEMIDLIST structure and allocates a new one using the task allocator. The calling application is responsible for freeing the new ITEMIDLIST structure. If an error occurs, the method returns NULL in this address.

Changing the display name of a file system object, or a folder within it, renames the file or directory.

See also IShellFolder


Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.