IPersistXMLFragment.Save Method

Base project system directs the project subtype to build the project subtype XML information and save it in the project or user file.

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

Syntax

'Declaration
Function Save ( _
    ByRef guidFlavor As Guid, _
    storage As UInteger, _
    <OutAttribute> ByRef pbstrXMLFragment As String, _
    fClearDirty As Integer _
) As Integer
int Save(
    ref Guid guidFlavor,
    uint storage,
    out string pbstrXMLFragment,
    int fClearDirty
)
int Save(
    [InAttribute] Guid% guidFlavor, 
    [InAttribute] unsigned int storage, 
    [OutAttribute] String^% pbstrXMLFragment, 
    [InAttribute] int fClearDirty
)
abstract Save : 
        guidFlavor:Guid byref * 
        storage:uint32 * 
        pbstrXMLFragment:string byref * 
        fClearDirty:int -> int
function Save(
    guidFlavor : Guid, 
    storage : uint, 
    pbstrXMLFragment : String, 
    fClearDirty : int
) : int

Parameters

  • guidFlavor
    Type: Guid%

    [in] Project subtype GUID.

  • storage
    Type: UInt32

    [in] Storage type for the file. Values taken from _PersistStorageType enumeration. The file type is either project file (.vsproj or .vbproj) or user file (.vsproj.user or .vbproj.user).

  • pbstrXMLFragment
    Type: String%

    [out] Pointer to the path of the new document containing the XML fragment.

  • fClearDirty
    Type: Int32

    [in] Indicates whether to clear the dirty flag after the save is complete. If true, the flag should be cleared. If false, the flag should be left unchanged.

Return Value

Type: 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::Save(
   [in] REFGUID guidFlavor,
   [in] PersistStorageType storage,
   [out] BSTR *pbstrXMLFragment,
   [in] BOOL fClearDirty
);

.NET Framework Security

See Also

Reference

IPersistXMLFragment Interface

Microsoft.VisualStudio.Shell.Interop Namespace