IVsUIShell2.SaveItemsViaDlg(UInt32, VSSAVETREEITEM[]) Method

Definition

Handles the saving of one or more documents through the Save changes to following items dialog box.

public:
 int SaveItemsViaDlg(System::UInt32 cItems, cli::array <Microsoft::VisualStudio::Shell::Interop::VSSAVETREEITEM> ^ rgSaveItems);
int SaveItemsViaDlg(unsigned int cItems, std::Array <Microsoft::VisualStudio::Shell::Interop::VSSAVETREEITEM> const & rgSaveItems);
public int SaveItemsViaDlg (uint cItems, Microsoft.VisualStudio.Shell.Interop.VSSAVETREEITEM[] rgSaveItems);
abstract member SaveItemsViaDlg : uint32 * Microsoft.VisualStudio.Shell.Interop.VSSAVETREEITEM[] -> int
Public Function SaveItemsViaDlg (cItems As UInteger, rgSaveItems As VSSAVETREEITEM()) As Integer

Parameters

cItems
UInt32

[in] Count of items.

rgSaveItems
VSSAVETREEITEM[]

[in] Array of VSSAVETREEITEM structures representing the items to be saved.

Returns

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.

Applies to