COleClientItem::SetHostNames

void SetHostNames( LPCTSTR lpszHost, LPCTSTR lpszHostObj );

Parameters

lpszHost

Pointer to the user-visible name of the container application.

lpszHostObj

Pointer to an identifying string of the container that contains the OLE item.

Remarks

Call this function to specify the name of the container application and the container’s name for an embedded OLE item. If the server application was written using the Microsoft Foundation Class Library, this function calls the OnSetHostNames member function of the COleServerDoc document that contains the OLE item. This information is used in window titles when the OLE item is being edited. Each time a container document is loaded, the framework calls this function for all the OLE items in the document. SetHostNames is applicable only to embedded items. It is not necessary to call this function each time an embedded OLE item is activated for editing.

This is also called automatically with the application name and document name when an object is loaded or when a file is saved under a different name. Accordingly, it is not usually necessary to call this function directly.

For more information, see IOleObject::SetHostNames in the OLE documentation.

COleClientItem OverviewClass MembersHierarchy Chart

See Also   COleServerDoc::OnSetHostNames