Freigeben über


IVsUIShellOpenDocument.IsDocumentOpen Method

Definition

Determines whether a document is currently open.

public:
 int IsDocumentOpen(Microsoft::VisualStudio::Shell::Interop::IVsUIHierarchy ^ pHierCaller, System::UInt32 itemidCaller, System::String ^ pszMkDocument, Guid % rguidLogicalView, System::UInt32 grfIDO, [Runtime::InteropServices::Out] Microsoft::VisualStudio::Shell::Interop::IVsUIHierarchy ^ % ppHierOpen, cli::array <System::UInt32> ^ pitemidOpen, [Runtime::InteropServices::Out] Microsoft::VisualStudio::Shell::Interop::IVsWindowFrame ^ % ppWindowFrame, [Runtime::InteropServices::Out] int % pfOpen);
public int IsDocumentOpen (Microsoft.VisualStudio.Shell.Interop.IVsUIHierarchy pHierCaller, uint itemidCaller, string pszMkDocument, ref Guid rguidLogicalView, uint grfIDO, out Microsoft.VisualStudio.Shell.Interop.IVsUIHierarchy ppHierOpen, uint[] pitemidOpen, out Microsoft.VisualStudio.Shell.Interop.IVsWindowFrame ppWindowFrame, out int pfOpen);
abstract member IsDocumentOpen : Microsoft.VisualStudio.Shell.Interop.IVsUIHierarchy * uint32 * string * Guid * uint32 * IVsUIHierarchy * uint32[] * IVsWindowFrame * int -> int
Public Function IsDocumentOpen (pHierCaller As IVsUIHierarchy, itemidCaller As UInteger, pszMkDocument As String, ByRef rguidLogicalView As Guid, grfIDO As UInteger, ByRef ppHierOpen As IVsUIHierarchy, pitemidOpen As UInteger(), ByRef ppWindowFrame As IVsWindowFrame, ByRef pfOpen As Integer) As Integer

Parameters

pHierCaller
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 null. You can call Query Interface from IVsUIHierarchy to obtain a pointer to the IVsHierarchy interface of the project. Used with IDO_ActivateIfOpen.

itemidCaller
UInt32

[in] Hierarchy item identifier of the document in the project. Used with IDO_ActivateIfOpen. For more information, see VSITEMID.

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

[in] GUID identifying the logical view. For a list of logical view GUIDS, see Logical View and Physical View.

grfIDO
UInt32

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

ppHierOpen
IVsUIHierarchy

[out] Pointer to the IVsUIHierarchy interface of the project that contains the Open document. If pfOpen is false, then this parameter is null.

pitemidOpen
UInt32[]

[out] Pointer to the hierarchy item identifier of the open document in the project system. For more information see VSITEMID.

ppWindowFrame
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 null.

pfOpen
Int32

[out, retval] true if the document is currently open; false if the document is not open.

Returns

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

Applies to