OLESTATUS OleRegisterServerDoc(lhsrvr, lpszDocName, lpdoc, lplhdoc)
LHSERVER lhsrvr;
LPCSTR lpszDocName;
LPOLESERVERDOC lpdoc;
LHSERVERDOC FAR * lplhdoc;
The OleRegisterServerDoc function registers a document with the server DLL in case other client applications have links to it.
Parameter | Description |
lhsrvr | Identifies the server. Server applications obtain this handle by calling the OleRegisterServer function. |
lpszDocName | Points to a null-terminated string specifying the permanent name for the document. This parameter should be a fully qualified path. |
lpdoc | Points to an OLESERVERDOC structure allocated and initialized by the server application. |
lplhdoc | Points to a handle that will identify the document. This parameter points to the handle when the function returns. |
A server application uses this function when the server is started with the /Embedding filename option or when it creates or opens a document that is not requested by the DLL.
If the document was created or opened in response to a request from the server DLL, the server should not register the document by using the OleRegisterServerDoc function. Instead, the server should return a pointer to the OLESERVERDOC structure through the parameter to the relevant function.
The return value is OLE_OK, if successful; otherwise, it could be one of the following:
OLE_ERROR_HANDLE
OLE_ERROR_MEMORY
OLE_ERROR_TERMINATE
See AlsoOleRegisterServer, OleRevokeServerDoc