The GetSite method retrieves the last site set with IObjectWithSite::SetSite.
HRESULT GetSite ( REFIID riid, void ** ppvSite );
[in] Specifies the interface you want to use. This is the interface identifier (IID) of the interface pointer returned in the member variable ppvSite.
[out] The address of the pointer variable that receives the interface pointer returned in riid. On success, *ppvSite contains the requested interface pointer to the last site that was set with the method IObjectWithSite::SetSite. The specific interface that is returned depends on the riid argument. This makes riid and ppvSite perform the same functions as those in the Windows Embedded CE IUnknown::QueryInterfacemethod. If the appropriate interface pointer is available, the object must call the Windows Embedded CE IUnknown::AddRef method on that pointer before returning. If no site is available or if the requested interface is not supported, GetSite must cast *ppvSite to NULL and return an appropriate error code.
Indicates that GetSite was able to successfully return a site previously set with IObjectWithSite::SetSite. You must call IUnknown::Release when the site is no longer needed.
There is no site, and *ppvSite contains NULL.
There is a site, but it does not support the interface you requested in the member variable riid.
|Windows Embedded CE||Windows CE 3.0 and later|
|Windows Mobile||Pocket PC 2000 and later, Smartphone 2002 and later|