#include <ole.h> |
OLESTATUS OleRegisterClientDoc(lpszClass, lpszDoc, reserved, lplhDoc) | |||||
LPCSTR lpszClass; | /* address of string for class name | */ | |||
LPCSTR lpszDoc; | /* address of string for document name | */ | |||
LONG reserved; | /* reserved | */ | |||
LHCLIENTDOC FAR* lplhDoc; | /* address of handle of document | */ |
The OleRegisterClientDoc function registers an open client document with the library and returns the handle of 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 location of the client document. (This value should be a fully qualified path.)
reserved
Reserved. Must be zero.
lplhDoc
Points to the handle of 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 may be one of the following:
OLE_ERROR_ALREADY_REGISTERED
OLE_ERROR_MEMORY
OLE_ERROR_NAME
When a document being copied onto the clipboard exists only because the client application is copying Native data that contains objects, the name specified in the lpszDoc parameter must be Clipboard.
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.
OleRenameClientDoc, OleRevertClientDoc, OleRevokeClientDoc, OleSavedClientDoc