Share via


IVsUIShellOpenDocument.IsDocumentInAProject Method

Definition

Determines whether a document is part of the project.

public:
 int IsDocumentInAProject(System::String ^ pszMkDocument, [Runtime::InteropServices::Out] Microsoft::VisualStudio::Shell::Interop::IVsUIHierarchy ^ % ppUIH, [Runtime::InteropServices::Out] System::UInt32 % pitemid, [Runtime::InteropServices::Out] Microsoft::VisualStudio::OLE::Interop::IServiceProvider ^ % ppSP, [Runtime::InteropServices::Out] int % pDocInProj);
int IsDocumentInAProject(std::wstring const & pszMkDocument, [Runtime::InteropServices::Out] Microsoft::VisualStudio::Shell::Interop::IVsUIHierarchy const & & ppUIH, [Runtime::InteropServices::Out] unsigned int & pitemid, [Runtime::InteropServices::Out] Microsoft::VisualStudio::OLE::Interop::IServiceProvider const & & ppSP, [Runtime::InteropServices::Out] int & pDocInProj);
public int IsDocumentInAProject (string pszMkDocument, out Microsoft.VisualStudio.Shell.Interop.IVsUIHierarchy ppUIH, out uint pitemid, out Microsoft.VisualStudio.OLE.Interop.IServiceProvider ppSP, out int pDocInProj);
abstract member IsDocumentInAProject : string * IVsUIHierarchy * uint32 * IServiceProvider * int -> int
Public Function IsDocumentInAProject (pszMkDocument As String, ByRef ppUIH As IVsUIHierarchy, ByRef pitemid As UInteger, ByRef ppSP As IServiceProvider, ByRef pDocInProj As Integer) As Integer

Parameters

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.

ppUIH
IVsUIHierarchy

[out] 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, the value of this parameter is null. You can call Query Interface From IVsUIHierarchy to obtain a pointer to the IVsHierarchy interface of the project.

pitemid
UInt32

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

ppSP
IServiceProvider

[out] Pointer to the IServiceProvider interface for the project.

pDocInProj
Int32

[out, retval] Flags that indicate whether a document is part of a project. For more information, see __VSDOCINPROJECT.

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::IsDocumentInAProject(  
   [in] LPCOLESTR pszMkDocument,  
   [out] IVsUIHierarchy **ppUIH,  
   [out] VSITEMID *pitemid,  
   [out] IServiceProvider **ppSP,  
   [out, retval] VSDOCINPROJECT *pDocInProj  
);  

Applies to