Partager via


IVsRunningDocumentTable3.GetRelatedSaveTreeItems Method

Definition

Retrieves the related save tree items for a document.

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

Parameters

cookie
UInt32

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

grfSave
UInt32

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

celt
UInt32

[in] Size the related save tree items.

rgSaveTreeItems
VSSAVETREEITEM[]

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

Returns

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

Remarks

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);  

Applies to