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

IUnknown_GetSite function

Calls the specified object's IObjectWithSite::GetSite method.

Syntax


HRESULT IUnknown_GetSite(
  _In_   IUnknown *punk,
  _In_   REFIID riid,
  _Out_  VOID **ppvSite
);

Parameters

punk [in]

Type: IUnknown*

A pointer to the COM object whose IObjectWithSite::GetSite method is to be called.

riid [in]

Type: REFIID

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

ppvSite [out]

Type: VOID**

The address of the pointer to receive the requested interface pointer. If the function call is successful, ppvSite will contain the requested interface pointer. If no site is available or the requested interface is not supported, ppvSite is set to NULL and the function returns a COM error code.

Return value

Type: HRESULT

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

Remarks

This function calls the specified object's QueryInterface method to obtain the IObjectWithSite interface. If successful, the function calls the interface's IObjectWithSite::GetSite method to obtain the site.

Requirements

Minimum supported client

Windows 2000 Professional, Windows XP [desktop apps only]

Minimum supported server

Windows 2000 Server, Windows Server 2003 [desktop apps only]

Header

Shlwapi.h

DLL

Shlwapi.dll (version 5.0 or later)

 

 

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

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.