Delen via


IVsAddProjectItemDlg2.AddExistingProjectItems Method

Adds existing project items.

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

Syntax

'Declaration
Function AddExistingProjectItems ( _
    itemidLoc As UInteger, _
    ByRef rguidProject As Guid, _
    pProject As IVsProject, _
    grfEditorFlags As UInteger, _
    ByRef rguidEditorType As Guid, _
    pszPhysicalView As String, _
    ByRef rguidLogicalView As Guid, _
    cFilesToAdd As UInteger, _
    rgpszFilesToAdd As String() _
) As Integer
int AddExistingProjectItems(
    uint itemidLoc,
    ref Guid rguidProject,
    IVsProject pProject,
    uint grfEditorFlags,
    ref Guid rguidEditorType,
    string pszPhysicalView,
    ref Guid rguidLogicalView,
    uint cFilesToAdd,
    string[] rgpszFilesToAdd
)
int AddExistingProjectItems(
    [InAttribute] unsigned int itemidLoc, 
    [InAttribute] Guid% rguidProject, 
    [InAttribute] IVsProject^ pProject, 
    [InAttribute] unsigned int grfEditorFlags, 
    [InAttribute] Guid% rguidEditorType, 
    [InAttribute] String^ pszPhysicalView, 
    [InAttribute] Guid% rguidLogicalView, 
    [InAttribute] unsigned int cFilesToAdd, 
    [InAttribute] array<String^>^ rgpszFilesToAdd
)
abstract AddExistingProjectItems : 
        itemidLoc:uint32 * 
        rguidProject:Guid byref * 
        pProject:IVsProject * 
        grfEditorFlags:uint32 * 
        rguidEditorType:Guid byref * 
        pszPhysicalView:string * 
        rguidLogicalView:Guid byref * 
        cFilesToAdd:uint32 * 
        rgpszFilesToAdd:string[] -> int
function AddExistingProjectItems(
    itemidLoc : uint, 
    rguidProject : Guid, 
    pProject : IVsProject, 
    grfEditorFlags : uint, 
    rguidEditorType : Guid, 
    pszPhysicalView : String, 
    rguidLogicalView : Guid, 
    cFilesToAdd : uint, 
    rgpszFilesToAdd : String[]
) : int

Parameters

  • itemidLoc
    Type: UInt32

    [in] Item identifier of the folder in the project to which items should be added.

  • rguidProject
    Type: Guid%

    [in] Unique identifier of the project.

  • rguidEditorType
    Type: Guid%

    [in] Editor type with which to open (if supported).

  • pszPhysicalView
    Type: String

    [in] Physical view with which to open (if supported).

  • rguidLogicalView
    Type: Guid%

    [in] Logical view with which to open (if supported).

  • cFilesToAdd
    Type: UInt32

    [in] Number of files to add.

  • rgpszFilesToAdd
    Type: array<String[]

    [in, size_is(cFilesToAdd)] Array of files whose actual number is cFilesToAdd.

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 IVsAddProjectItemDlg2::AddExistingProjectItems(
   [in] VSITEMID itemidLoc,
   [in] REFGUID rguidProject,
   [in] IVsProject *pProject,
   [in] VSSPECIFICEDITORFLAGS grfEditorFlags,
   [in] REFGUID rguidEditorType,
   [in] LPCOLESTR pszPhysicalView,
   [in] REFGUID rguidLogicalView,
   [in] ULONG cFilesToAdd,
   [in, size_is(cFilesToAdd)] LPCOLESTR rgpszFilesToAdd[]
);

.NET Framework Security

See Also

Reference

IVsAddProjectItemDlg2 Interface

Microsoft.VisualStudio.Shell.Interop Namespace