IObjectWithSite::SetSiteIObjectWithSite::SetSite*
*Contents  *Index  *Topic Contents
*Previous Topic: IObjectWithSite::GetSite
*Next Topic: IPersistMemory

IObjectWithSite::SetSite

HRESULT SetSite(
    IUnknown *pUnkSite);

Provides the site's IUnknown pointer to the object. The object should hold onto this pointer, calling AddRef in doing so. If the object already has a site, it should first call pUnkSite->AddRef to secure the new site, call IUnknown::Release on the existing site, then save pUnkSite.

pUnkSite
[in] Interface pointer of the site managing this object. If NULL, the object should call IUnknown::Release on any existing site at which point the object no longer knows its site.

E_NOTIMPL is disallowed—without implementation of SetSite, the IObjectWithSite interface is unnecessary.


Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.