Freigeben über


IVsPersistSolutionProps.ReadSolutionProps Method

Reads out solution properties from its .sln file.

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

Syntax

'Declaration
Function ReadSolutionProps ( _
    pHierarchy As IVsHierarchy, _
    pszProjectName As String, _
    pszProjectMk As String, _
    pszKey As String, _
    fPreLoad As Integer, _
    pPropBag As IPropertyBag _
) As Integer
int ReadSolutionProps(
    IVsHierarchy pHierarchy,
    string pszProjectName,
    string pszProjectMk,
    string pszKey,
    int fPreLoad,
    IPropertyBag pPropBag
)
int ReadSolutionProps(
    [InAttribute] IVsHierarchy^ pHierarchy, 
    [InAttribute] String^ pszProjectName, 
    [InAttribute] String^ pszProjectMk, 
    [InAttribute] String^ pszKey, 
    [InAttribute] int fPreLoad, 
    [InAttribute] IPropertyBag^ pPropBag
)
abstract ReadSolutionProps : 
        pHierarchy:IVsHierarchy * 
        pszProjectName:string * 
        pszProjectMk:string * 
        pszKey:string * 
        fPreLoad:int * 
        pPropBag:IPropertyBag -> int
function ReadSolutionProps(
    pHierarchy : IVsHierarchy, 
    pszProjectName : String, 
    pszProjectMk : String, 
    pszKey : String, 
    fPreLoad : int, 
    pPropBag : IPropertyBag
) : int

Parameters

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

    [in] Pointer to the IVsHierarchy interface. nulla null reference (Nothing in Visual Basic) 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: String

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

  • pszProjectMk
    Type: String

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

  • pszKey
    Type: String

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

  • fPreLoad
    Type: Int32

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

Return Value

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

Remarks

COM Signature

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.

.NET Framework Security

See Also

Reference

IVsPersistSolutionProps Interface

Microsoft.VisualStudio.Shell.Interop Namespace