Export (0) Print
Expand All
1 out of 2 rated this helpful - Rate this topic

IObjectWithSite::SetSite method

Enables a container to pass an object a pointer to the interface for its site.

Syntax


HRESULT SetSite(
  [in]  IUnknown *pUnkSite
);

Parameters

pUnkSite [in]

A pointer to the IUnknown interface pointer of the site managing this object. If NULL, the object should call Release on any existing site at which point the object no longer knows its site.

Return value

This method returns S_OK on success.

Remarks

The object should hold onto this pointer, calling IUnknown::AddRef in doing so. If the object already has a site, it should call that existing site's IUnknown::Release, save the new site pointer, and call the new site's IUnknown::AddRef.

E_NOTIMPL is not allowed—without implementation of the SetSite method, the IObjectWithSite interface is unnecessary.

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.