Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
SetSite
Collapse the table of content
Expand the table of content

SetSite method

Provides the site's IUnknown pointer to the object.

Syntax


HRESULT retVal = object.SetSite(pUnkSite);

Parameters

pUnkSite [in]

Type: IUnknown

An interface pointer to the site managing this object. If NULL, the object should call IUnknown::Release to release the existing site.

Remarks

The object should hold the IUnknown 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, and then save pUnkSite.

E_NOTIMPL is disallowed. If the IObjectWithSite::SetSite method is not implemented, the IObjectWithSite interface is unnecessary.

 

 

Show:
© 2015 Microsoft