IVsUIShellOpenDocument4.IsDocumentInAProject2 Method
Determines whether the specified document is in a project.
Namespace: Microsoft.VisualStudio.Shell.Interop
Assemblies: Microsoft.VisualStudio.Shell.12.0 (in Microsoft.VisualStudio.Shell.12.0.dll)
Microsoft.VisualStudio.Shell.Interop.12.0 (in Microsoft.VisualStudio.Shell.Interop.12.0.dll)
Syntax
'Declaration
Function IsDocumentInAProject2 ( _
pszMkDocument As String, _
fSupportExternalItems As Boolean, _
<OutAttribute> ByRef ppUIH As IVsUIHierarchy, _
<OutAttribute> ByRef pitemid As UInteger, _
<OutAttribute> ByRef ppSP As IServiceProvider _
) As Integer
int IsDocumentInAProject2(
string pszMkDocument,
bool fSupportExternalItems,
out IVsUIHierarchy ppUIH,
out uint pitemid,
out IServiceProvider ppSP
)
int IsDocumentInAProject2(
[InAttribute] String^ pszMkDocument,
[InAttribute] bool fSupportExternalItems,
[OutAttribute] IVsUIHierarchy^% ppUIH,
[OutAttribute] unsigned int% pitemid,
[OutAttribute] IServiceProvider^% ppSP
)
abstract IsDocumentInAProject2 :
pszMkDocument:string *
fSupportExternalItems:bool *
ppUIH:IVsUIHierarchy byref *
pitemid:uint32 byref *
ppSP:IServiceProvider byref -> int
function IsDocumentInAProject2(
pszMkDocument : String,
fSupportExternalItems : boolean,
ppUIH : IVsUIHierarchy,
pitemid : uint,
ppSP : IServiceProvider
) : int
Parameters
pszMkDocument
Type: 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: Booleantrue 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 nulla null reference (Nothing in Visual Basic). You can call Query Interface From IVsUIHierarchy to obtain a pointer to the IVsHierarchy interface of the project.
pitemid
Type: 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: Int32
Specifies whether the document is in a project.
Remarks
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.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.