GlobalObjectProvider::IObjectWithSite::GetSite Method (Guid, IntPtr)
Gets the service provider.
Assembly: Microsoft.VisualStudio.Shell.Design (in Microsoft.VisualStudio.Shell.Design.dll)
private: virtual void GetSite( Guid% riid, [OutAttribute] IntPtr% ppv ) sealed = IObjectWithSite::GetSite
Parameters
- riid
-
Type:
System::Guid
The GUID of the service provider.
- ppv
-
Type:
System::IntPtr
[out] Returns a pointer to the service provider as an IObjectWithSite.
Implements
IObjectWithSite::GetSite(Guid, IntPtr)| Exception | Condition |
|---|---|
| COMException | An internal IServiceProvider has not been set by a call to M:Microsoft.VisualStudio.Shell.Design.GlobalObjectProvider.Microsoft.VisualStudio.OLE.Interop.IObjectWithSite.SetSite(System.Object) or the provider cannot be cast to the IObjectWithSite type. |
Before calling the M:Microsoft.VisualStudio.Shell.Design.GlobalObjectProvider.Microsoft.VisualStudio.OLE.Interop.IObjectWithSite.GetSite(System.Guid@,System.IntPtr@) or the GetService methods, you must set the internal provider by a call to the M:Microsoft.VisualStudio.Shell.Design.GlobalObjectProvider.Microsoft.VisualStudio.OLE.Interop.IObjectWithSite.SetSite(System.Object) method.