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
int SaveItemsViaDlg(
uint cItems,
VSSAVETREEITEM[] rgSaveItems
)
int SaveItemsViaDlg(
[InAttribute] unsigned int cItems,
[InAttribute] array<VSSAVETREEITEM>^ rgSaveItems
)
abstract SaveItemsViaDlg :
cItems:uint32 *
rgSaveItems:VSSAVETREEITEM[] -> int
function SaveItemsViaDlg(
cItems : uint,
rgSaveItems : VSSAVETREEITEM[]
) : int
Parameters
cItems
Type: 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: 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.
.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.