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

  • 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 Logical View and Physical View.

  • grfIDO
    Type: System.UInt32

    [in] Flags that control what actions are performed on an open document. For more information, see __VSIDOFLAGS.

  • 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.

  • 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

See Also

Reference

IVsUIShellOpenDocument Interface

Microsoft.VisualStudio.Shell.Interop Namespace