IVsProject2.IsDocumentInProject Method

Definition

Determines whether a document is in the project.

public:
 int IsDocumentInProject(System::String ^ pszMkDocument, [Runtime::InteropServices::Out] int % pfFound, cli::array <Microsoft::VisualStudio::Shell::Interop::VSDOCUMENTPRIORITY> ^ pdwPriority, [Runtime::InteropServices::Out] System::UInt32 % pitemid);
int IsDocumentInProject(std::wstring const & pszMkDocument, [Runtime::InteropServices::Out] int & pfFound, std::Array <Microsoft::VisualStudio::Shell::Interop::VSDOCUMENTPRIORITY> const & pdwPriority, [Runtime::InteropServices::Out] unsigned int & pitemid);
public int IsDocumentInProject (string pszMkDocument, out int pfFound, Microsoft.VisualStudio.Shell.Interop.VSDOCUMENTPRIORITY[] pdwPriority, out uint pitemid);
abstract member IsDocumentInProject : string * int * Microsoft.VisualStudio.Shell.Interop.VSDOCUMENTPRIORITY[] * uint32 -> int
Public Function IsDocumentInProject (pszMkDocument As String, ByRef pfFound As Integer, pdwPriority As VSDOCUMENTPRIORITY(), ByRef pitemid As UInteger) As Integer

Parameters

pszMkDocument
String

[in] Pointer to the document moniker for which to search.

pfFound
Int32

[out] Pointer to a BOOL. Implementer sets contents to true if the document is found in the project, false if otherwise or an error occurs.

pdwPriority
VSDOCUMENTPRIORITY[]

[out] Priority level whose value is taken from the VSDOCUMENTPRIORITY enumeration if the document is found; zero if not or an error occurs.

pitemid
UInt32

[out] Pointer to the item identifier of the document within the project. Should be VSITEMID_ROOT or other valid item identifier. See the enumeration VSITEMID. If the document is found, implementer sets contents to a value; if not found or an error occurs, implementer sets contents to zero.

Returns

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Implements

Remarks

COM Signature

From vsshell.idl:

HRESULT IVsProject2::IsDocumentInProject(  
   [in] LPCOLESTR pszMkDocument,  
   [out] BOOL *pfFound,  
   [out] VSDOCUMENTPRIORITY *pdwPriority,  
   [out] VSITEMID *pitemid  
);  

If any parameter is null, set any non-null parameter to its error setting, and return E_INVALIDARG.

Applies to