OleRenameServerDoc

  OLESTATUS OleRenameServerDoc(lhDoc, lpszDocname)    
  LHSERVERDOC lhDoc; /* handle to document */
  LPCSTR lpszDocname; /* pointer to string for new document name */

The OleRenameServerDoc function informs the server library that a document has been renamed.

Parameters

lhDoc

Identifies the document that has been renamed.

lpszDocname

Points to a null-terminated string specifying the new name of the document. This parameter is typically a path name.

Return Value

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

Comments

The OleRenameServerDoc function has the same effect as sending the OLE_RENAMED notification to the client application's callback function. The server application calls this function when it renames a document and active links to that document need to be reconnected.

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

See Also

OleRegisterServerDoc, OleRevokeServerDoc, OleRevertServerDoc, OleSavedServerDoc