template< class T >
class IObjectWithSiteImpl
Parameters
T Your class, derived from IObjectWithSiteImpl.
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.
#include <atlcom.h>
See Also IObjectWithSite in the Win32 SDK
IObjectWithSite Methods | |
GetSite | Queries the site for an interface pointer. |
SetSite | Provides the object with the site's IUnknown pointer. |
Data Members | |
m_spUnkSite | Manages the site's IUnknown pointer. |
HRESULT GetSite( REFIID riid, void **ppvSite );
See IObjectWithSite::GetSite in the Win32 SDK.
Remarks
Queries the site for a pointer to the interface identified by riid. If the site supports this interface, the pointer is returned via ppvSite. Otherwise, ppvSite is set to NULL.
IObjectWithSiteImpl Overview | Class Members
See Also IObjectWithSiteImpl::SetSite
HRESULT SetSite( IUnknown* pUnkSite );
See IObjectWithSite::SetSite in the Win32 SDK.
Remarks
Provides the object with the sites IUnknown pointer.
IObjectWithSiteImpl Overview | Class Members
See Also IObjectWithSiteImpl::GetSite
CComPtr< IUnknown > m_spUnkSite;
Remarks
Manages the site's IUnknown pointer. m_spUnkSite initially receives this pointer through a call to SetSite.
IObjectWithSiteImpl Overview | Class Members
See Also CComPtr