OleRevokeServer

  OLESTATUS OleRevokeServer(lhServer)    
  LHSERVER lhServer; /* server handle */

The OleRevokeServer function is called by a server application to close any documents that the server had opened on behalf of client applications and to terminate communications with those clients.

Parameters

lhServer

Identifies the server to revoke. A server application obtains this handle in a call to the OleRegisterServer function.

Return Value

The return value is OLE_OK if the function is successful. Otherwise, it is an error value, which can be OLE_ERROR_HANDLE or OLE_WAIT_FOR_RELEASE.

Comments

The OleRevokeServer function returns OLE_WAIT_FOR_RELEASE if communications between clients and the server are in the process of terminating. In this case, the server application should continue to send and dispatch messages until it receives the OLE_RELEASE notification.

See Also

OleRegisterServer, OleRevokeServerDoc, OleRevokeObject