Export (0) Print
Expand All

IObjectWithSite Interface

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

IObjectWithSite Members

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.


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.

Interface Information

Stock Implementation None
Custom Implementation Yes
Inherits from IUnknown
Header and IDL files Ocidl.h, Ocidl.idl
Minimum availability Internet Explorer 4.0
Minimum operating systems Windows 95, Windows NT 4.0

Community Additions

© 2015 Microsoft