Compartir a través de


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

'Declaración
Function SaveItemsViaDlg ( _
    cItems As UInteger, _
    rgSaveItems As VSSAVETREEITEM() _
) As Integer
'Uso
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
)
abstract SaveItemsViaDlg : 
        cItems:uint32 * 
        rgSaveItems:VSSAVETREEITEM[] -> int 
function SaveItemsViaDlg(
    cItems : uint, 
    rgSaveItems : VSSAVETREEITEM[]
) : int

Parameters

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.

.NET Framework Security

See Also

Reference

IVsUIShell2 Interface

IVsUIShell2 Members

Microsoft.VisualStudio.Shell.Interop Namespace