共用方式為


IObjectWithSiteImpl Class

This class provides methods allowing an object to communicate with its site.

template< 
   class T  
> 
class ATL_NO_VTABLE IObjectWithSiteImpl : 
   public IObjectWithSite

Parameters

  • T
    Your class, derived from IObjectWithSiteImpl.

Members

Public Methods

Name

Description

IObjectWithSiteImpl::GetSite

Queries the site for an interface pointer.

IObjectWithSiteImpl::SetChildSite

Provides the object with the site's IUnknown pointer.

IObjectWithSiteImpl::SetSite

Provides the object with the site's IUnknown pointer.

Public Data Members

Name

Description

IObjectWithSiteImpl::m_spUnkSite

Manages the site's IUnknown pointer.

Remarks

The IObjectWithSite interface allows an object to communicate with its site. Class IObjectWithSiteImpl provides a default implementation of this interface and implements IUnknown by sending information to the dump device in debug builds.

IObjectWithSiteImpl specifies two methods. The client first calls SetSite, passing the site's IUnknown pointer. This pointer is stored within the object, and can later be retrieved through a call to GetSite.

Typically, you derive your class from IObjectWithSiteImpl when you are creating an object that is not a control. For controls, derive your class from IOleObjectImpl, which also provides a site pointer. Do not derive your class from both IObjectWithSiteImpl and IOleObjectImpl.

Inheritance Hierarchy

IObjectWithSite

IObjectWithSiteImpl

Requirements

Header: atlcom.h

See Also

Other Resources

ATL Class Overview