IVsUIShell2.SaveItemsViaDlg Method
Handles the saving of one or more documents through the Save changes to following items dialog box.
Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop.8.0 (in Microsoft.VisualStudio.Shell.Interop.8.0.dll)
Syntax
'Declaration
Function SaveItemsViaDlg ( _
cItems As UInteger, _
rgSaveItems As VSSAVETREEITEM() _
) As Integer
'Usage
Dim instance As IVsUIShell2
Dim cItems As UInteger
Dim rgSaveItems As VSSAVETREEITEM()
Dim returnValue As Integer
returnValue = instance.SaveItemsViaDlg(cItems, _
rgSaveItems)
int SaveItemsViaDlg(
uint cItems,
VSSAVETREEITEM[] rgSaveItems
)
int SaveItemsViaDlg(
[InAttribute] unsigned int cItems,
[InAttribute] array<VSSAVETREEITEM>^ rgSaveItems
)
function SaveItemsViaDlg(
cItems : uint,
rgSaveItems : VSSAVETREEITEM[]
) : int
Parameters
cItems
Type: System.UInt32[in] Count of items.
rgSaveItems
Type: array<Microsoft.VisualStudio.Shell.Interop.VSSAVETREEITEM[][in] Array of VSSAVETREEITEM structures representing the items to be 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 vsshell80.idl:
HRESULT IVsUIShell2::SaveItemsViaDlg(
[in] UINT cItems,
[in, size_is(cItems)] VSSAVETREEITEM rgSaveItems[]
);
This method displays the dialog box to the user and handles the saving of items the user chooses. Items to be saved can be identified by the Running Document Table docCookie or by pHier/itemid pair. This method is useful in scenarios where a single document window manages edits to multiple documents. Such a case would use a VSFPROPID_ViewHelper flag to listen for the OnClose event. When OnClose is called with *pgrfSaveOptions==FRAMECLOSE_PromptSave, the SaveItemsViaDlg dialog should be called to save the list of items, and the OnClose should set *pgrfSaveOptions==FRAMECLOSE_NoSave on return to indicate that all necessary saving has already been performed.
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.