IVsPersistSolutionProps::ReadSolutionProps Method (IVsHierarchy^, String^, String^, String^, Int32, IPropertyBag^)

 

Reads out solution properties from its .sln file.

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

int ReadSolutionProps(
	IVsHierarchy^ pHierarchy,
	String^ pszProjectName,
	String^ pszProjectMk,
	String^ pszKey,
	int fPreLoad,
	IPropertyBag^ pPropBag
)

Parameters

pHierarchy
Type: Microsoft.VisualStudio.Shell.Interop::IVsHierarchy^

[in] Pointer to the IVsHierarchy interface. null for preSolution or global sections because the hierarchy does not exist if the solution has yet to create it, or because the section being loaded is global.

pszProjectName
Type: System::String^

[in] null for global sections, which means a load for the global section of the solution (.sln) file.

pszProjectMk
Type: System::String^

[in] null for global sections, which means a load for the global section of the solution (.sln) file.

pszKey
Type: System::String^

[in] Name of the solution's property set, that is, its property bag.

fPreLoad
Type: System::Int32

[in] Indicator of whether a ReadSolutionProps call is from a pre- or post-load section.

pPropBag
Type: Microsoft.VisualStudio.OLE.Interop::IPropertyBag^

[in] Pointer to the IPropertyBag interface.

Return Value

Type: System::Int32

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

From vsshell.idl:

HRESULT IVsPersistSolutionProps::ReadSolutionProps(
   [in] IVsHierarchy *pHierarchy,
   [in] LPCOLESTR pszProjectName,
   [in] LPCOLESTR pszProjectMk,
   [in] LPCOLESTR pszKey,
   [in] BOOL fPreLoad,
   [in] IPropertyBag *pPropBag
);

Called by the environment when loading the solution file so it can use the registry to map the pszKey to a particular VSPackage.

Return to top
Show: