IObjectWithSite interface

Provides simple objects with a lightweight siting mechanism (lighter than IOleObject).

Members

The IObjectWithSite interface inherits from the IUnknown interface. IObjectWithSite also has these types of members:

  • Methods

Methods

The IObjectWithSite interface has these methods.

Method Description
GetSite

Gets the last site set with IObjectWithSite::SetSite. If there is no known site, the object returns a failure code.

SetSite

Provides the site's IUnknown pointer to the object.

 

Remarks

Often, an object must communicate directly with a container site that is managing the object. Outside of IOleObject::SetClientSite, there is no generic means through which an object becomes aware of its site. The IObjectWithSite interface provides a siting mechanism. This interface should only be used when IOleObject is not already in use. By using IObjectWithSite, a container can pass the IUnknown pointer of its site to the object through SetSite. Callers can also get the latest site passed to SetSite by using GetSite.

Requirements

Minimum supported client

Windows XP

Minimum supported server

Windows 2000 Server

Header

Ocidl.h

IDL

Ocidl.idl