OleRename

3.1

  #include <ole.h>    

  OLESTATUS OleRename(lpObject, lpszNewname)    
  LPOLEOBJECT lpObject; /* address of object being renamed */
  LPCSTR lpszNewname; /* address of string for new object name */

The OleRename function renames an object.

Parameters

lpObject

Points to the object that is being renamed.

lpszNewname

Points to a null-terminated string specifying the new name of the object.

Return Value

The return value is OLE_OK if the function is successful. Otherwise, it is an error value, which may be OLE_ERROR_OBJECT.

Comments

Object names need not be seen by the user. They must be unique within the containing document and must be preserved when the document is saved.

See Also

OleQueryName