CWebStorage::RenameObject Method  
 
BOOL RenameObject(
  LPCTSTR lpszOldLabel,  
  LPCTSTR lpszNewLabel  
);

The RenameObject method changes the label associated with the storage object.

Parameters

lpszOldLabel
A null-terminated string which specifies the name of the existing storage object to be renamed. This parameter must specify a valid object label and cannot be a NULL pointer or an empty string.
lpszNewLabel
A null-terminated string which specifies a new label for the storage object being moved. This parameter may not be NULL or point to an empty string.

Return Value

If the method succeeds, the return value is non-zero. If the method fails, the return value is zero. To get extended error information, call the GetLastError method.

Remarks

The RenameObject method is used to change the label for an existing storage object. Although storage object labels are similar to Windows file names, they are case-sensitive. When renaming an object, your application must specify the original label name exactly as it was created. The object label cannot contain wildcard characters.

To duplicate an existing storage object, use the CopyObject method. If you need to move the object to a different storage container, use the MoveObject method.

Requirements

Minimum Desktop Platform: Windows 7 Service Pack 1
Minimum Server Platform: Windows Server 2008 R2 Service Pack 1
Header File: cstools12.h
Import Library: cswebv12.lib
Unicode: Implemented as Unicode and ANSI versions

See Also