IVsHierarchy.SetSite(IServiceProvider) Method

Definition

Sets the service provider from which to access the services.

public:
 int SetSite(Microsoft::VisualStudio::OLE::Interop::IServiceProvider ^ psp);
public:
 int SetSite(Microsoft::VisualStudio::OLE::Interop::IServiceProvider ^ psp);
int SetSite(Microsoft::VisualStudio::OLE::Interop::IServiceProvider const & psp);
public int SetSite (Microsoft.VisualStudio.OLE.Interop.IServiceProvider psp);
abstract member SetSite : Microsoft.VisualStudio.OLE.Interop.IServiceProvider -> int
Public Function SetSite (psp As IServiceProvider) As Integer

Parameters

psp
IServiceProvider

[in] Pointer to the IServiceProvider interface of the service provider to be set.

Returns

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

This method is used to manage the hierarchy, and may only be called by the Site (that is, the code that owns this instance of the hierarchy).

COM Signature

From vsshell.idl:

HRESULT IVsHierarchy::SetSite(  
   [in] IServiceProvider *pSP  
);  

Applies to