IVsUIShellOpenDocument.IsDocumentOpen Method
Determines whether a document is currently open.
Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
Syntax
'Declaration
Function IsDocumentOpen ( _
pHierCaller As IVsUIHierarchy, _
itemidCaller As UInteger, _
pszMkDocument As String, _
ByRef rguidLogicalView As Guid, _
grfIDO As UInteger, _
<OutAttribute> ByRef ppHierOpen As IVsUIHierarchy, _
<OutAttribute> pitemidOpen As UInteger(), _
<OutAttribute> ByRef ppWindowFrame As IVsWindowFrame, _
<OutAttribute> ByRef pfOpen As Integer _
) As Integer
'Usage
Dim instance As IVsUIShellOpenDocument
Dim pHierCaller As IVsUIHierarchy
Dim itemidCaller As UInteger
Dim pszMkDocument As String
Dim rguidLogicalView As Guid
Dim grfIDO As UInteger
Dim ppHierOpen As IVsUIHierarchy
Dim pitemidOpen As UInteger()
Dim ppWindowFrame As IVsWindowFrame
Dim pfOpen As Integer
Dim returnValue As Integer
returnValue = instance.IsDocumentOpen(pHierCaller, _
itemidCaller, pszMkDocument, rguidLogicalView, _
grfIDO, ppHierOpen, pitemidOpen, _
ppWindowFrame, pfOpen)
int IsDocumentOpen(
IVsUIHierarchy pHierCaller,
uint itemidCaller,
string pszMkDocument,
ref Guid rguidLogicalView,
uint grfIDO,
out IVsUIHierarchy ppHierOpen,
uint[] pitemidOpen,
out IVsWindowFrame ppWindowFrame,
out int pfOpen
)
int IsDocumentOpen(
[InAttribute] IVsUIHierarchy^ pHierCaller,
[InAttribute] unsigned int itemidCaller,
[InAttribute] String^ pszMkDocument,
[InAttribute] Guid% rguidLogicalView,
[InAttribute] unsigned int grfIDO,
[OutAttribute] IVsUIHierarchy^% ppHierOpen,
[OutAttribute] array<unsigned int>^ pitemidOpen,
[OutAttribute] IVsWindowFrame^% ppWindowFrame,
[OutAttribute] int% pfOpen
)
abstract IsDocumentOpen :
pHierCaller:IVsUIHierarchy *
itemidCaller:uint32 *
pszMkDocument:string *
rguidLogicalView:Guid byref *
grfIDO:uint32 *
ppHierOpen:IVsUIHierarchy byref *
pitemidOpen:uint32[] byref *
ppWindowFrame:IVsWindowFrame byref *
pfOpen:int byref -> int
function IsDocumentOpen(
pHierCaller : IVsUIHierarchy,
itemidCaller : uint,
pszMkDocument : String,
rguidLogicalView : Guid,
grfIDO : uint,
ppHierOpen : IVsUIHierarchy,
pitemidOpen : uint[],
ppWindowFrame : IVsWindowFrame,
pfOpen : int
) : int
Parameters
- pHierCaller
Type: Microsoft.VisualStudio.Shell.Interop.IVsUIHierarchy
[in] If the document is open, this is a pointer to the IVsUIHierarchy interface implementation of the project that contains the document. If the document is not open, this is nulla null reference (Nothing in Visual Basic). You can call Query Interface from IVsUIHierarchy to obtain a pointer to the IVsHierarchy interface of the project. Used with IDO_ActivateIfOpen.
- itemidCaller
Type: System.UInt32
[in] Hierarchy item identifier of the document in the project. Used with IDO_ActivateIfOpen. For more information, see VSITEMID.
- pszMkDocument
Type: System.String
[in] String form of the unique moniker identifier of the document in the project system, for example, the full path to the file. In non-file cases, this identifier is often in the form of a URL.
- rguidLogicalView
Type: System.Guid%
[in] GUID identifying the logical view. For a list of logical view GUIDS, see Single and Multi-tab Views.
- grfIDO
Type: System.UInt32
[in] Flags that control what actions are performed on an open document. For more information, see __VSIDOFLAGS.
- ppHierOpen
Type: Microsoft.VisualStudio.Shell.Interop.IVsUIHierarchy%
[out] Pointer to the IVsUIHierarchy interface of the project that contains the Open document. If pfOpen is false, then this parameter is nulla null reference (Nothing in Visual Basic).
- pitemidOpen
Type: array<System.UInt32[]
[out] Pointer to the hierarchy item identifier of the open document in the project system. For more information see VSITEMID.
- ppWindowFrame
Type: Microsoft.VisualStudio.Shell.Interop.IVsWindowFrame%
[out] Pointer to the IVsWindowFrame interface of the window frame that contains the editor in which the document is being edited. If pfOpen is false, then this parameter is nulla null reference (Nothing in Visual Basic).
- pfOpen
Type: System.Int32%
[out, retval] true if the document is currently open; false if the document is not open.
Return Value
Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.
Remarks
COM Signature
From vsshell.idl:
HRESULT IVsUIShellOpenDocument::IsDocumentOpen(
[in] IVsUIHierarchy *pHierCaller,
[in] VSITEMID itemidCaller,
[in] LPCOLESTR pszMkDocument,
[in] REFGUID rguidLogicalView,
[in] VSIDOFLAGS grfIDO,
[out] IVsUIHierarchy **ppHierOpen,
[out] VSITEMID *pitemidOpen,
[out] IVsWindowFrame **ppWindowFrame,
[out, retval] BOOL *pfOpen
);
.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.
See Also
Reference
IVsUIShellOpenDocument Interface