共用方式為


IVsHierarchy.GetSite(IServiceProvider) Method

Definition

Gets the service provider from which to access the services.

public:
 int GetSite([Runtime::InteropServices::Out] Microsoft::VisualStudio::OLE::Interop::IServiceProvider ^ % ppSP);
public:
 int GetSite([Runtime::InteropServices::Out] Microsoft::VisualStudio::OLE::Interop::IServiceProvider ^ &  ppSP);
int GetSite([Runtime::InteropServices::Out] Microsoft::VisualStudio::OLE::Interop::IServiceProvider const & & ppSP);
public int GetSite (out Microsoft.VisualStudio.OLE.Interop.IServiceProvider ppSP);
abstract member GetSite : IServiceProvider -> int
Public Function GetSite (ByRef ppSP As IServiceProvider) As Integer

Parameters

ppSP
IServiceProvider

[out] Pointer to the IServiceProvider interface of the service provider.

Returns

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

Remarks

This method is not typically called directly, because sites are generally set.

COM Signature

From vsshell.idl:

HRESULT IVsHierarchy::GetSite(  
   [out] IServiceProvider **ppSP  
);  

Applies to