Freigeben über


IVsProject2.IsDocumentInProject Method (String, Int32%, array<VSDOCUMENTPRIORITY , UInt32%)

Determines whether a document is in the project.

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

Syntax

'Declaration
Function IsDocumentInProject ( _
    pszMkDocument As String, _
    <OutAttribute> ByRef pfFound As Integer, _
    <OutAttribute> pdwPriority As VSDOCUMENTPRIORITY(), _
    <OutAttribute> ByRef pitemid As UInteger _
) As Integer
'Usage
Dim instance As IVsProject2
Dim pszMkDocument As String
Dim pfFound As Integer
Dim pdwPriority As VSDOCUMENTPRIORITY()
Dim pitemid As UInteger
Dim returnValue As Integer

returnValue = instance.IsDocumentInProject(pszMkDocument, _
    pfFound, pdwPriority, pitemid)
int IsDocumentInProject(
    string pszMkDocument,
    out int pfFound,
    VSDOCUMENTPRIORITY[] pdwPriority,
    out uint pitemid
)
int IsDocumentInProject(
    [InAttribute] String^ pszMkDocument, 
    [OutAttribute] int% pfFound, 
    [OutAttribute] array<VSDOCUMENTPRIORITY>^ pdwPriority, 
    [OutAttribute] unsigned int% pitemid
)
abstract IsDocumentInProject : 
        pszMkDocument:string * 
        pfFound:int byref * 
        pdwPriority:VSDOCUMENTPRIORITY[] byref * 
        pitemid:uint32 byref -> int 
function IsDocumentInProject(
    pszMkDocument : String, 
    pfFound : int, 
    pdwPriority : VSDOCUMENTPRIORITY[], 
    pitemid : uint
) : int

Parameters

  • pszMkDocument
    Type: System.String
    [in] Pointer to the document moniker for which to search.
  • pfFound
    Type: System.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.
  • pitemid
    Type: System.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.

Return Value

Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Implements

IVsProject.IsDocumentInProject(String, Int32%, array<VSDOCUMENTPRIORITY[], UInt32%)

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 nulla null reference (Nothing in Visual Basic), set any non-null parameter to its error setting, and return E_INVALIDARG.

.NET Framework Security

See Also

Reference

IVsProject2 Interface

IVsProject2 Members

IsDocumentInProject Overload

Microsoft.VisualStudio.Shell.Interop Namespace