Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

IObjectWithSite::GetSite method

Retrieves the latest site passed using SetSite.

Syntax


HRESULT GetSite(
  [in]   REFIID riid,
  [out]  void **ppvSite
);

Parameters

riid [in]

The IID of the interface pointer that should be returned in ppvSite.

ppvSite [out]

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.

Return value

This method returns S_OK on success. Other possible return values include the following.

Return codeDescription
E_FAIL

There is no site, in which case *ppvSite contains NULL on return.

E_NOINTERFACE

There is a site, but it does not support the interface requested by riid.

 

Remarks

E_NOTIMPL is not allowed—any object implementing this interface must be able to return the last site seen in IObjectWithSite::SetSite.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

OCIdl.h

IDL

OCIdl.idl

IID

IID_IObjectWithSite is defined as FC4801A3-2BA9-11CF-A229-00AA003D7352

See also

IObjectWithSite

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.