Share via


CComPtr::SetSite

HRESULT SetSite( IUnknown* punkParent );

Return value

A standard HRESULT value. Can be one of the following values:

  • **S_OK   **The site was set successfully.

  • **E_POINTER   **The pointer contained by this smart pointer is NULL.

  • **E_NOINTERFACE   **The pointer contained by this smart pointer does not implement .

Parameters

punkParent

[in] Pointer to the IUnknown interface pointer of the site managing this object.

Remarks

Sets the site for the internal pointer to punkParent. The internal pointer must point to an object that implements IObjectWithSite.

CComPtr OverviewClass Members