IVsUIShellOpenDocument4::IsDocumentInAProject2 Method (String^, Boolean, IVsUIHierarchy^, UInt32, IServiceProvider^)

 

Determines whether the specified document is in a project.

Namespace:   Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop.12.0 (in Microsoft.VisualStudio.Shell.Interop.12.0.dll)

int IsDocumentInAProject2(
	String^ pszMkDocument,
	bool fSupportExternalItems,
	[OutAttribute] IVsUIHierarchy^% ppUIH,
	[OutAttribute] unsigned int% pitemid,
	[OutAttribute] IServiceProvider^% ppSP
)

Parameters

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.

fSupportExternalItems
Type: System::Boolean

true if the project supports external items, otherwise false.

ppUIH
Type: Microsoft.VisualStudio.Shell.Interop::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
Type: System::UInt32

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

ppSP
Type: Microsoft.VisualStudio.OLE.Interop::IServiceProvider^

[out] Pointer to the IServiceProvider interface for the project

Return Value

Type: System::Int32

Specifies whether the document is in a project.

This is the same as IVsUIShellOpenDocument.IsDocumentInAProject() except that it can support finding documents in a hierarchy that aren't in the hierarchy's physical project but can be associated with the hierarchy via IVsUIHierarchy.ParseCanonicalName() and the item's VSHPROPID_ExternalItem property is true.

Return to top
Show: