VsShellUtilities.GetCfgProvider(IVsHierarchy) 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.
Utility function to retreive the config provider object for a given project. It will use the established (by build manager) alghoritm fo accessing the config provider
- If project provides a browse object - QI from the browse object
- else if project implements IVsGetCfgProvider - use IVsGetCfgProvider::GetCfgProvider()
- finally QI for IVsCfgProvider on the project hierarchy itself.
public:
static Microsoft::VisualStudio::Shell::Interop::IVsCfgProvider ^ GetCfgProvider(Microsoft::VisualStudio::Shell::Interop::IVsHierarchy ^ hierarchy);
public:
static Microsoft::VisualStudio::Shell::Interop::IVsCfgProvider ^ GetCfgProvider(Microsoft::VisualStudio::Shell::Interop::IVsHierarchy ^ hierarchy);
static Microsoft::VisualStudio::Shell::Interop::IVsCfgProvider GetCfgProvider(Microsoft::VisualStudio::Shell::Interop::IVsHierarchy const & hierarchy);
public static Microsoft.VisualStudio.Shell.Interop.IVsCfgProvider GetCfgProvider (Microsoft.VisualStudio.Shell.Interop.IVsHierarchy hierarchy);
static member GetCfgProvider : Microsoft.VisualStudio.Shell.Interop.IVsHierarchy -> Microsoft.VisualStudio.Shell.Interop.IVsCfgProvider
Public Shared Function GetCfgProvider (hierarchy As IVsHierarchy) As IVsCfgProvider
Public Function GetCfgProvider (hierarchy As IVsHierarchy) As IVsCfgProvider
Parameters
- hierarchy
- IVsHierarchy
The project hierarchy
Returns
IVsCfgProvider object for the given project
Remarks
This method uses the established (by build manager) algorithm for accessing the configuration provider:
If the project provides a browse object, QI from the browse object.
Otherwise, if the project implements IVsGetCfgProvider, use GetCfgProvider
Otherwise, QI for IVsCfgProvider