IUnknown_SetSite function (shlwapi.h)

Sets the specified object's site by calling its IObjectWithSite::SetSite method.

Syntax

LWSTDAPI IUnknown_SetSite(
  [in] IUnknown *punk,
  [in] IUnknown *punkSite
);

Parameters

[in] punk

Type: IUnknown*

A pointer to the IUnknown interface of the object whose site is to be changed.

[in] punkSite

Type: IUnknown*

A pointer to the IUnknown interface of the new site.

Return value

Type: HRESULT

Returns S_OK if the site was successfully set, or a COM error code otherwise.

Remarks

This function calls the specified object's IUnknown::QueryInterface method to obtain a pointer to the object's IObjectWithSite interface. If successful, the function calls IObjectWithSite::SetSite to set or change the site.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional, Windows XP [desktop apps only]
Minimum supported server Windows 2000 Server, Windows Server 2003 [desktop apps only]
Target Platform Windows
Header shlwapi.h
DLL Shlwapi.dll (version 5.0 or later)