IVsSolution.SaveSolutionElement(UInt32, IVsHierarchy, UInt32) Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Programmatically saves a document, a project, or the entire solution.
public:
int SaveSolutionElement(System::UInt32 grfSaveOpts, Microsoft::VisualStudio::Shell::Interop::IVsHierarchy ^ pHier, System::UInt32 docCookie);
public:
int SaveSolutionElement(unsigned int grfSaveOpts, Microsoft::VisualStudio::Shell::Interop::IVsHierarchy ^ pHier, unsigned int docCookie);
int SaveSolutionElement(unsigned int grfSaveOpts, Microsoft::VisualStudio::Shell::Interop::IVsHierarchy const & pHier, unsigned int docCookie);
public int SaveSolutionElement(uint grfSaveOpts, Microsoft.VisualStudio.Shell.Interop.IVsHierarchy pHier, uint docCookie);
abstract member SaveSolutionElement : uint32 * Microsoft.VisualStudio.Shell.Interop.IVsHierarchy * uint32 -> int
Public Function SaveSolutionElement (grfSaveOpts As UInteger, pHier As IVsHierarchy, docCookie As UInteger) As Integer
- grfSaveOpts
- UInt32
[in] Save Options. For a list of grfSaveOpts
, see __VSSLNSAVEOPTIONS.
- pHier
- IVsHierarchy
[in] Pointer to the IVsHierarchy interface of the document to save.
- docCookie
- UInt32
[in] Abstract handle to the element that was saved.
If the method succeeds, it returns S_OK. If it fails, it returns an error code.
From vsshell.idl:
HRESULT IVsSolution::SaveSolutionElement(
[in] VSSLNSAVEOPTIONS grfSaveOpts,
[in] IVsHierarchy *pHier,
[in] VSCOOKIE docCookie
);
To save the entire solution, call SaveSolutionElement
(grfSaveOpts
, null
, null
). To save a single project, call SaveSolutionElement
(grfSaveOpts
, phier
, null
). To save a single document, call SaveSolutionElement
(grfSaveOpts
, null
, docCookie
).
製品 | バージョン |
---|---|
Visual Studio SDK | 2015, 2017, 2019, 2022 |