OLESTATUS OleRegisterClientDoc(lpszClass, lpszDoc, reserved, lplhDoc) | |||||
LPCSTR lpszClass; | /* pointer to string for class name | */ | |||
LPCSTR lpszDoc; | /* pointer to string for document name | */ | |||
LONG reserved; | /* reserved | */ | |||
LHCLIENTDOC FAR* lplhDoc; | /* pointer to handle to document | */ |
The OleRegisterClientDoc function registers an open client document with the library and returns a handle to that document.
lpszClass
Points to a null-terminated string specifying the class of the client document.
lpszDoc
Points to a null-terminated string specifying the path and name of the client document. (This value should be a fully-qualified path name.)
reserved
Reserved. Must be zero.
lplhDoc
Points to a handle to the client document, when the function returns. This handle is used to identify the document in other document-management functions.
The return value is OLE_OK if the function is successful. Otherwise, it is an error value, which can be OLE_ERROR_NAME, OLE_ERROR_ALREADY_REGISTERED, or OLE_ERROR_MEMORY.
The name specified in the lpszDoc parameter must be “Clipboard” when a document being copied to the clipboard exists only because the client application is copying Native data that contains objects.
Client applications should register open documents with the library and notify the library when a document is renamed, closed, saved, or reverted to a changed state.
OleRenameClientDoc, OleRevertClientDoc, OleRevokeClientDoc, OleSavedClientDoc