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
'宣告
Function Save ( _
ByRef guidFlavor As Guid, _
storage As UInteger, _
<OutAttribute> ByRef pbstrXMLFragment As String, _
fClearDirty As Integer _
) As Integer
'用途
Dim instance As IPersistXMLFragment
Dim guidFlavor As Guid
Dim storage As UInteger
Dim pbstrXMLFragment As String
Dim fClearDirty As Integer
Dim returnValue As Integer
returnValue = instance.Save(guidFlavor, _
storage, pbstrXMLFragment, fClearDirty)
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
)
function Save(
guidFlavor : Guid,
storage : uint,
pbstrXMLFragment : String,
fClearDirty : int
) : int
Parameters
guidFlavor
Type: System.Guid%[in] Project subtype GUID.
storage
Type: System.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: System.String%[out] Pointer to the path of the new document containing the XML fragment.
fClearDirty
Type: System.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: 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::Save(
[in] REFGUID guidFlavor,
[in] PersistStorageType storage,
[out] BSTR *pbstrXMLFragment,
[in] BOOL fClearDirty
);
Permissions
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.