Share via


IObjectWithSite::SetSite

Send Feedback

The SetSite method passes the container site object's IUnknown pointer to the object being managed. Once the managed object has received the pointer, it should use it to call the Windows CE IUnknown::AddRef method. If the object already has a site, it should save the new site's pointer, call the Windows CE IUnknown::Release method with the original site's IUnknown pointer, and then call IUnknown::AddRef with the new site's pointer.

Syntax

HRESULT SetSite (
  IUnknown * pUnkSite
);

Parameters

  • pUnkSite
    [in] Reference to the IUnknown interface pointer belonging to the site that is managing this object. If pUnkSite is NULL, call IUnknown::Release on any existing site for which the object is no longer set.

Return Values

  • S_OK
    Indicates success.

Requirements

Pocket PC: Pocket PC 2000 and later.
Smartphone: Smartphone 2002 and later.
OS Versions: Windows CE 3.0 and later.
Header: Declared in ocidl.h.

See Also

IContextMenu | IObjectWithSite | IObjectWithSite::GetSite | IUnknown::AddRef | IUnknown::Release

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.