IVsRunningDocumentTable2.CloseDocuments(UInt32, IVsHierarchy, UInt32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
COM Signature
From vsshell80.idl:
HRESULT IVsRunningDocumentTable2::CloseDocuments(
[in] FRAMECLOSE grfSaveOptions,
[in] IVsHierarchy *pHierarchy,
[in] VSCOOKIE docCookie
);
The pHierarchy
and docCookie
parameters are mutually exclusive; only one or the other may be specified. Specifying the pHierarchy
parameter closes all open documents in that hierarchy while specifying the docCookie
parameter closes only that single document.
The docCookie
parameter is the same value that is returned from the FindAndLockDocument or RegisterAndLockDocument methods in the IVsRunningDocumentTable interface.