次の方法で共有


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

'宣言
Private Sub GetSite ( _
    ByRef riid As Guid, _
    <OutAttribute> ByRef ppv As IntPtr _
) Implements IObjectWithSite.GetSite
void IObjectWithSite.GetSite(
    ref Guid riid,
    out IntPtr ppv
)

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 or the provider cannot be cast to the IObjectWithSite type.

Remarks

Before calling the GetSite or the GetService methods, you must set the internal provider by a call to the SetSite method.

.NET Framework Security

See Also

Reference

GlobalObjectProvider Class

Microsoft.VisualStudio.Shell.Design Namespace

SetSite