Partager via


IPersistXMLFragment.Load Method

The project opens and reads the XML fragment and the project subtype GUID from a specified file type.

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

Syntax

'Déclaration
Function Load ( _
    ByRef guidFlavor As Guid, _
    storage As UInteger, _
    pszXMLFragment As String _
) As Integer
'Utilisation
Dim instance As IPersistXMLFragment
Dim guidFlavor As Guid
Dim storage As UInteger
Dim pszXMLFragment As String
Dim returnValue As Integer

returnValue = instance.Load(guidFlavor, _
    storage, pszXMLFragment)
int Load(
    ref Guid guidFlavor,
    uint storage,
    string pszXMLFragment
)
int Load(
    [InAttribute] Guid% guidFlavor, 
    [InAttribute] unsigned int storage, 
    [InAttribute] String^ pszXMLFragment
)
function Load(
    guidFlavor : Guid, 
    storage : uint, 
    pszXMLFragment : String
) : int

Parameters

  • guidFlavor
    Type: System.Guid%

    [in] GUID of the project subtype.

  • storage
    Type: System.UInt32

    [in] File storage type. Values are taken from _PersistStorageType enumeration. The file type is either project file (.vsproj or .vbproj) or user file (.vsproj.user or .vbproj.user).

  • pszXMLFragment
    Type: System.String

    [in] String containing the XML fragment.

Return Value

Type: System.Int32

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

Remarks

COM Signature

From vsshell80.idl:

HRESULT IPersistXMLFragment::Load(
   [in] REFGUID guidFlavor,
   [in] PersistStorageType storage,
   [in] LPCOLESTR pszXMLFragment
);

Base project system loads the appropriate XML fragment from the project subtype project or user file given the project subtype GUID and then calls on the project subtype to not persist its data.

In a common scenario, a project subtype implementation intercepts its own GUID and handles the call, and forwards all other calls to inner subtypes (with their associated GUIDs).

Permissions

See Also

Reference

IPersistXMLFragment Interface

IPersistXMLFragment Members

Microsoft.VisualStudio.Shell.Interop Namespace