IVsRunningDocumentTable::SaveDocuments Method (UInt32, IVsHierarchy^, UInt32, UInt32)

 

Saves the documents.

Namespace:   Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)

int SaveDocuments(
	unsigned int grfSaveOpts,
	IVsHierarchy^ pHier,
	unsigned int itemid,
	unsigned int docCookie
)

Parameters

grfSaveOpts
Type: System::UInt32

[in] Save options whose values are taken from the __VSRDTSAVEOPTIONS enumeration.

pHier
Type: Microsoft.VisualStudio.Shell.Interop::IVsHierarchy^

[in] The IVsHierarchy interface that owns the document.

itemid
Type: System::UInt32

[in] Item identifier of the saved documents. This is a unique identifier or it can be one of the following values: VSITEMID_NIL, VSITEMID_ROOT, or VSITEMID_SELECTION.

docCookie
Type: System::UInt32

[in] Abstract value representing the saved documents.

Return Value

Type: System::Int32

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

From vsshell.idl:

HRESULT IVsRunningDocumentTable::SaveDocuments(
   [in] VSRDTSAVEOPTIONS  grfSaveOpts,
   [in] IVsHierarchy     *pHier,
   [in] VSITEMID          itemid,
   [in] VSCOOKIE          docCookie
);

The docCookie parameter is same value that is returned from the FindAndLockDocument or RegisterAndLockDocument methods.

Return to top
Show: