IObjectWithSite::GetSite method (ocidl.h)
Retrieves the latest site passed using SetSite.
HRESULT GetSite( [in] REFIID riid, [out] void **ppvSite );
The IID of the interface pointer that should be returned in ppvSite.
Address of pointer variable that receives the interface pointer requested in riid. Upon successful return, *ppvSite contains the requested interface pointer to the site last seen in SetSite. The specific interface returned depends on the riid argument. In 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, this method must *ppvSite to NULL and return a failure code.
This method returns S_OK on success. Other possible return values include the following.
||There is no site, in which case *ppvSite contains NULL on return.|
||There is a site, but it does not support the interface requested by riid.|
E_NOTIMPL is not allowed. Any object implementing this interface must be able to return the last site seen in IObjectWithSite::SetSite.
|Minimum supported client||Windows 2000 Professional [desktop apps only]|
|Minimum supported server||Windows 2000 Server [desktop apps only]|