Contents Index Topic Contents | ||
Previous Topic: IObjectWithSite Next Topic: IObjectWithSite::SetSite |
IObjectWithSite::GetSite
HRESULT GetSite([in] REFIID riid, [out, iid_is(riid)] void **ppvSite);Retrieves the last site set with IObjectWithSite::SetSite. If there's no known site, the object returns a failure code.
- Returns:
S_OK The site was returned successfully and the caller is responsible for calling ((IUnknown *)(*ppvSite))->Release() when the site is no longer needed. E_FAIL There is no site; in that case, *ppvSite contains NULL on return. E_NOINTERFACE There is a site, but it does not support the interface requested by riid.
- riid
- [in] The IID of the interface pointer that should be returned in ppvSite.
- ppvSite
- [out] The address of the caller's void* variable in which the object stores the interface pointer of the site last seen in IObjectWithSite::SetSite. The specific interface returned depends in the riid argumentin essence, the two arguments act identically to those in QueryInterface. If the appropriate interface pointer is available, the object must call AddRef on that pointer before returning successfully. If no site is available, or the requested interface is not supported, the object sets this argument to NULL and returns a failure code.
E_NOTIMPL is disallowedany object implementing this interface must be able to return the last site seen in SetSite.
Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.