OLESTATUS OleSetHostNames(lpObject, lpszClient, lpszClientObj)
LPOLEOBJECT lpObject;
LPCSTR lpszClient;
LPCSTR lpszClientObj;
The OleSetHostNames function specifies the name of the client application and the client's name for the specified object. This information is used in window titles when the object is being edited in the server application.
Parameter | Description |
lpObject | Points to the object for which a name is set. |
lpszClient | Points to a null-terminated string specifying the name of the client application. |
lpszClientObj | Points to a null-terminated string specifying the client's name for the object. |
The OleSetHostNames function returns OLE_ERROR_OBJECT when it is called for a linked object.
When a server application is started to edit an embedded object, it displays the string specified in the lpszClientObj parameter in its title bar. The object name specified in this string should be the name of the client document containing the object.
A client application uses the OleSetHostNames function to set the name of an object the first time that object is active. The client does not need to call OleSetHostNames every time a server is opened.
The return value is OLE_OK if successful; otherwise, it could be one of the following:
OLE_BUSY
OLE_ERROR_MEMORY
OLE_ERROR_OBJECT
OLE_WAIT_FOR_RELEASE