Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
Programmatically saves a document, a project, or the entire solution.
Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
Syntax
'Declaration
Function SaveSolutionElement ( _
grfSaveOpts As UInteger, _
pHier As IVsHierarchy, _
docCookie As UInteger _
) As Integer
'Usage
Dim instance As IVsSolution
Dim grfSaveOpts As UInteger
Dim pHier As IVsHierarchy
Dim docCookie As UInteger
Dim returnValue As Integer
returnValue = instance.SaveSolutionElement(grfSaveOpts, _
pHier, docCookie)
int SaveSolutionElement(
uint grfSaveOpts,
IVsHierarchy pHier,
uint docCookie
)
int SaveSolutionElement(
[InAttribute] unsigned int grfSaveOpts,
[InAttribute] IVsHierarchy^ pHier,
[InAttribute] unsigned int docCookie
)
abstract SaveSolutionElement :
grfSaveOpts:uint32 *
pHier:IVsHierarchy *
docCookie:uint32 -> int
function SaveSolutionElement(
grfSaveOpts : uint,
pHier : IVsHierarchy,
docCookie : uint
) : int
Parameters
- grfSaveOpts
Type: System.UInt32
[in] Save Options. For a list of grfSaveOpts, see __VSSLNSAVEOPTIONS.
- pHier
Type: Microsoft.VisualStudio.Shell.Interop.IVsHierarchy
[in] Pointer to the IVsHierarchy interface of the document to save.
- docCookie
Type: System.UInt32
[in] Abstract handle to the element that was saved.
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 vsshell.idl:
HRESULT IVsSolution::SaveSolutionElement(
[in] VSSLNSAVEOPTIONS grfSaveOpts,
[in] IVsHierarchy *pHier,
[in] VSCOOKIE docCookie
);
To save the entire solution, call SaveSolutionElement(grfSaveOpts, nulla null reference (Nothing in Visual Basic), nulla null reference (Nothing in Visual Basic)). To save a single project, call SaveSolutionElement(grfSaveOpts, phier, nulla null reference (Nothing in Visual Basic)). To save a single document, call SaveSolutionElement(grfSaveOpts, nulla null reference (Nothing in Visual Basic), docCookie).
.NET Framework Security
- 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.