IVsUIShell2::SaveItemsViaDlg Method (UInt32, array<VSSAVETREEITEM>^)

 

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)

int SaveItemsViaDlg(
	unsigned int cItems,
	array<VSSAVETREEITEM>^ rgSaveItems
)

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.

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.

Return to top
Show: