OleRenameClientDoc

3.1

  #include <ole.h>    

  OLESTATUS OleRenameClientDoc(lhClientDoc, lpszNewDocname)    
  LHCLIENTDOC lhClientDoc; /* handle of client document */
  LPCSTR lpszNewDocname; /* address of string for new document name */

The OleRenameClientDoc function informs the client library that a document has been renamed. A client application calls this function when a document name has changed—for example, when the user chooses the Save or Save As command from the File menu.

Parameters

lhClientDoc

Identifies the document that has been renamed.

lpszNewDocname

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

Return Value

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

Comments

Client applications should register open documents with the library and notify the library when a document is renamed, closed, saved, or restored to a changed state.

See Also

OleRegisterClientDoc, OleRevertClientDoc, OleRevokeClientDoc, OleSavedClientDoc