IVsRunningDocumentTable3::GetRelatedSaveTreeItems Method (UInt32, UInt32, UInt32, array<VSSAVETREEITEM>^)

 

Retrieves the related save tree items for a document.

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

unsigned int GetRelatedSaveTreeItems(
	unsigned int cookie,
	unsigned int grfSave,
	unsigned int celt,
	array<VSSAVETREEITEM>^ rgSaveTreeItems
)

Parameters

cookie
Type: System::UInt32

[in] Document from which to get the related save tree items.

grfSave
Type: System::UInt32

[in] Save options for the document in the running document table (RDT).

celt
Type: System::UInt32

[in] Size the related save tree items.

rgSaveTreeItems
Type: array<Microsoft.VisualStudio.Shell.Interop::VSSAVETREEITEM>^

[out, size_is(celt), length_is(*pcActual)] Array that contains the save options for the tree-view item.

Return Value

Type: System::UInt32

The actual number of related save tree items that was retrieved.

If celt is zero and the return value is not null, the number of VSSAVETREEITEM is returned in the return value. If celt is not zero, rgSaveTreeItems must not be null.

The following example shows a common way of using this method (omitting error checks for readability):

hr = pIVsRunningDocumentTable3->GetRelatedSaveTreeItems(cookie, grfSave, 0, NULL, &cExpected);
prgSaveTreeItems = ::CoTaskMemAlloc(cExpected * sizeof(VSSAVETREEITEM));
hr = pIVsRunningDocumentTable3->GetRelatedSaveTreeItems(cookie, grfSave, cExpected, prgSaveTreeItems, &cActual);

Return to top
Show: