#include <ole.h> |
OLESTATUS OleRenameServerDoc(lhDoc, lpszDocName) | |||||
LHSERVERDOC lhDoc; | /* handle of document | */ | |||
LPCSTR lpszDocName; | /* address of string for path and filename | */ |
The OleRenameServerDoc function informs the server library that a document has been renamed.
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 fully qualified path.
The return value is OLE_OK if the function is successful. Otherwise, it is an error value, which may be one of the following:
OLE_ERROR_HANDLE OLE_ERROR_MEMORY
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 to which the active links need to be reconnected or when the user chooses the Save As command from the File menu while working with an embedded object.
Server applications should register open documents with the server library and notify the library when a document is renamed, closed, saved, or restored to a changed state.
OleRegisterServerDoc, OleRevertServerDoc, OleRevokeServerDoc, OleSavedServerDoc