An OLE server supplies functions that the server library calls when a user works with an object. The server library, OLESVR.DLL, uses DDE commands to communicate with the client library. When the client application calls one of the functions in the OLE API, the client library informs the server library and the server library routes the request to the appropriate function in the server-supplied list of function pointers.
In addition to the specialized functions that the server creates and which are called by the server library, there are ten OLE functions that allow a server to control the library's ability to gain access to the server and the documents and objects it controls:
Function | Description |
OleBlockServer | Queues requests to the server until the server calls the OleUnblockServer function. |
OleRegisterServer | Registers the specified server with the library. Information registered includes the class name and instance and whether the server supports single or multiple instances. |
OleRegisterServerDoc | Registers a document with the server library. |
OleRenameServerDoc | Renames the specified document. |
OleRevertServerDoc | Restores a document to a previously saved state, without closing the document. |
OleRevokeObject | Revokes access to the specified object. |
OleRevokeServer | Revokes access to the specified server, closing any documents and ending communication with client applications. |
OleRevokeServerDoc | Revokes access to the specified document. |
OleSavedServerDoc | Informs the library that a document has been saved. Calling this function is equivalent to sending the OLE_SAVED notification. |
OleUnblockServer | Processes a request from a queue created when the server application called the OleBlockServer function. |
The OleRevokeServer and OleRevokeServerDoc functions can return OLE_WAIT_FOR_RELEASE. When a server application receives this error value, it should take the same action as a client application, dispatching messages until the server library calls the corresponding Release function.