IVsRunningDocumentTable2.CloseDocuments(UInt32, IVsHierarchy, UInt32) Method

Definition

Closes one or more documents.

public:
 int CloseDocuments(System::UInt32 grfSaveOptions, Microsoft::VisualStudio::Shell::Interop::IVsHierarchy ^ pHierarchy, System::UInt32 docCookie);
public:
 int CloseDocuments(unsigned int grfSaveOptions, Microsoft::VisualStudio::Shell::Interop::IVsHierarchy ^ pHierarchy, unsigned int docCookie);
int CloseDocuments(unsigned int grfSaveOptions, Microsoft::VisualStudio::Shell::Interop::IVsHierarchy const & pHierarchy, unsigned int docCookie);
public int CloseDocuments (uint grfSaveOptions, Microsoft.VisualStudio.Shell.Interop.IVsHierarchy pHierarchy, uint docCookie);
abstract member CloseDocuments : uint32 * Microsoft.VisualStudio.Shell.Interop.IVsHierarchy * uint32 -> int
Public Function CloseDocuments (grfSaveOptions As UInteger, pHierarchy As IVsHierarchy, docCookie As UInteger) As Integer

Parameters

grfSaveOptions
UInt32

[in] Flags from the __FRAMECLOSE enumeration.

pHierarchy
IVsHierarchy

[in] A IVsHierarchy object whose documents are to be closed. See Remarks.

docCookie
UInt32

[in] An abstract value representing the document to be closed. See Remarks.

Returns

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

Remarks

This method must be accessed on the main thread.

Applies to