Package.IVsPackage.SetSite(IServiceProvider) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initializes the VSPackage in the Visual Studio environment.
virtual int Microsoft.VisualStudio.Shell.Interop.IVsPackage.SetSite(Microsoft::VisualStudio::OLE::Interop::IServiceProvider ^ sp) = Microsoft::VisualStudio::Shell::Interop::IVsPackage::SetSite;
virtual int Microsoft.VisualStudio.Shell.Interop.IVsPackage.SetSite(Microsoft::VisualStudio::OLE::Interop::IServiceProvider ^ sp) = Microsoft::VisualStudio::Shell::Interop::IVsPackage::SetSite;
int Microsoft.VisualStudio.Shell.Interop.IVsPackage.SetSite(Microsoft::VisualStudio::OLE::Interop::IServiceProvider const & sp);
int IVsPackage.SetSite (Microsoft.VisualStudio.OLE.Interop.IServiceProvider sp);
abstract member Microsoft.VisualStudio.Shell.Interop.IVsPackage.SetSite : Microsoft.VisualStudio.OLE.Interop.IServiceProvider -> int
override this.Microsoft.VisualStudio.Shell.Interop.IVsPackage.SetSite : Microsoft.VisualStudio.OLE.Interop.IServiceProvider -> int
Function SetSite (sp As IServiceProvider) As Integer Implements IVsPackage.SetSite
Parameters
IServiceProvider object.
Returns
If the method succeeds, it returns S_OK. If it fails, it returns an error code.