Compartilhar via


IVsAddProjectItemDlg2.AddExistingProjectItems Method

Definition

Adds existing project items.

public:
 int AddExistingProjectItems(System::UInt32 itemidLoc, Guid % rguidProject, Microsoft::VisualStudio::Shell::Interop::IVsProject ^ pProject, System::UInt32 grfEditorFlags, Guid % rguidEditorType, System::String ^ pszPhysicalView, Guid % rguidLogicalView, System::UInt32 cFilesToAdd, cli::array <System::String ^> ^ rgpszFilesToAdd);
public int AddExistingProjectItems (uint itemidLoc, ref Guid rguidProject, Microsoft.VisualStudio.Shell.Interop.IVsProject pProject, uint grfEditorFlags, ref Guid rguidEditorType, string pszPhysicalView, ref Guid rguidLogicalView, uint cFilesToAdd, string[] rgpszFilesToAdd);
abstract member AddExistingProjectItems : uint32 * Guid * Microsoft.VisualStudio.Shell.Interop.IVsProject * uint32 * Guid * string * Guid * uint32 * string[] -> int
Public 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

Parameters

itemidLoc
UInt32

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

rguidProject
Guid

[in] Unique identifier of the project.

pProject
IVsProject

[in] Pointer to the IVsProject interface on which Add Item will be called.

grfEditorFlags
UInt32

[in] Flags whose values are taken from the __VSSPECIFICEDITORFLAGS enumeration.

rguidEditorType
Guid

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

pszPhysicalView
String

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

rguidLogicalView
Guid

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

cFilesToAdd
UInt32

[in] Number of files to add.

rgpszFilesToAdd
String[]

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

Returns

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[]  
);  

Applies to