IVsRunningDocumentTable2.CloseDocuments Method
Closes one or more documents.
Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop.8.0 (in Microsoft.VisualStudio.Shell.Interop.8.0.dll)
Syntax
'Declaration
Function CloseDocuments ( _
grfSaveOptions As UInteger, _
pHierarchy As IVsHierarchy, _
docCookie As UInteger _
) As Integer
int CloseDocuments(
uint grfSaveOptions,
IVsHierarchy pHierarchy,
uint docCookie
)
int CloseDocuments(
[InAttribute] unsigned int grfSaveOptions,
[InAttribute] IVsHierarchy^ pHierarchy,
[InAttribute] unsigned int docCookie
)
abstract CloseDocuments :
grfSaveOptions:uint32 *
pHierarchy:IVsHierarchy *
docCookie:uint32 -> int
function CloseDocuments(
grfSaveOptions : uint,
pHierarchy : IVsHierarchy,
docCookie : uint
) : int
Parameters
grfSaveOptions
Type: UInt32[in] Flags from the __FRAMECLOSE enumeration.
pHierarchy
Type: Microsoft.VisualStudio.Shell.Interop.IVsHierarchy[in] A IVsHierarchy object whose documents are to be closed. See Remarks.
docCookie
Type: UInt32[in] An abstract value representing the document to be closed. See Remarks.
Return Value
Type: Int32
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.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.