Freigeben über


GlobalObjectProvider.IObjectWithSite.GetSite Method

Gets the service provider.

Namespace:  Microsoft.VisualStudio.Shell.Design
Assembly:  Microsoft.VisualStudio.Shell.Design (in Microsoft.VisualStudio.Shell.Design.dll)

Syntax

'Declaration
Private Sub GetSite ( _
    ByRef riid As Guid, _
    <OutAttribute> ByRef ppv As IntPtr _
) Implements IObjectWithSite.GetSite
'Usage
Dim instance As GlobalObjectProvider
Dim riid As Guid
Dim ppv As IntPtr

CType(instance, IObjectWithSite).GetSite(riid, _
    ppv)
void IObjectWithSite.GetSite(
    ref Guid riid,
    out IntPtr ppv
)
private:
virtual void GetSite(
    Guid% riid, 
    [OutAttribute] IntPtr% ppv
) sealed = IObjectWithSite::GetSite
private abstract GetSite : 
        riid:Guid byref * 
        ppv:IntPtr byref -> unit 
private override GetSite : 
        riid:Guid byref * 
        ppv:IntPtr byref -> unit 
JScript does not support explicit interface implementations.

Parameters

  • riid
    Type: System.Guid%
    The GUID of the service provider.

Implements

IObjectWithSite.GetSite(Guid%, IntPtr%)

Exceptions

Exception Condition
COMException

An internal IServiceProvider has not been set by a call to SetSite(Object) or the provider cannot be cast to the IObjectWithSite type.

Remarks

Before calling the GetSite(Guid%, IntPtr%) or the GetService methods, you must set the internal provider by a call to the SetSite(Object) method.

.NET Framework Security

See Also

Reference

GlobalObjectProvider Class

GlobalObjectProvider Members

Microsoft.VisualStudio.Shell.Design Namespace

SetSite(Object)