WebRenameObject Function  
 
BOOL WINAPI WebRenameObject(
  HSTORAGE hStorage,  
  LPCTSTR lpszOldLabel,  
  LPCTSTR lpszNewLabel  
);

The WebRenameObject function changes the label associated with the storage object.

Parameters

hStorage
A handle to the storage container.
lpszOldLabel
A pointer to 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 pointer to 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 function succeeds, the return value is a non-zero. If the function fails, the return value is zero. To get extended error information, call WebGetLastError.

Remarks

The WebRenameObject function 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 WebCopyObject function. If you need to move the object to a different storage container, use the WebMoveObject function.

Requirements

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

See Also

WebCopyObject, WebDeleteObject, WebMoveObject