IVsUIShellOpenDocument.IsDocumentInAProject Method
Determines whether a document is part of the project.
Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
Syntax
'Declaration
Function IsDocumentInAProject ( _
pszMkDocument As String, _
<OutAttribute> ByRef ppUIH As IVsUIHierarchy, _
<OutAttribute> ByRef pitemid As UInteger, _
<OutAttribute> ByRef ppSP As IServiceProvider, _
<OutAttribute> ByRef pDocInProj As Integer _
) As Integer
int IsDocumentInAProject(
string pszMkDocument,
out IVsUIHierarchy ppUIH,
out uint pitemid,
out IServiceProvider ppSP,
out int pDocInProj
)
int IsDocumentInAProject(
[InAttribute] String^ pszMkDocument,
[OutAttribute] IVsUIHierarchy^% ppUIH,
[OutAttribute] unsigned int% pitemid,
[OutAttribute] IServiceProvider^% ppSP,
[OutAttribute] int% pDocInProj
)
abstract IsDocumentInAProject :
pszMkDocument:string *
ppUIH:IVsUIHierarchy byref *
pitemid:uint32 byref *
ppSP:IServiceProvider byref *
pDocInProj:int byref -> int
function IsDocumentInAProject(
pszMkDocument : String,
ppUIH : IVsUIHierarchy,
pitemid : uint,
ppSP : IServiceProvider,
pDocInProj : int
) : 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.
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.
pDocInProj
Type: Int32%[out, retval] Flags that indicate whether a document is part of a project. For more information, see __VSDOCINPROJECT.
Return Value
Type: Int32
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
);
.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.